Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create a UDR-procedure in java that will return multiple types data in

Status
Not open for further replies.

alx7

Technical User
Feb 19, 2009
1
We installed:

IBM Informix Dynamic Server Version 10.00.UC6
JDBC – 3.00
J2SE 1.4.2

On operational system Red Hat Enterprise Linux AS release 4 (Nahant) 2.6.9-5.EL

We create a UDR-procedure in java that will return multiple types data in IDS.

We realized java file. We compiled and created the jar.

class test {
public static int two_return(int i, String s){
i=5;
s=”OK”;
return 0;
}
}

Then we installed the jar:

EXECUTE PROCEDURE install_jar ("file:$INFORMIXDIR/extend/krakatoa/Test_j.jar", "Test_j", 0);

Created function for IDS:

CREATE FUNCTION test_return (OUT a integer, OUT s char(5)) returns int external name 'Test_jar:test.two_return (int, java.lang.String)' language java;

ALTER FUNCTION test_return (ADD HANDLESNULLS);

tried call function:

SELECT a, s FROM systable WHERE tabid=1 AND test_return (a#integer, s#char(5))=0;

result of execution select above, error appears:

Error (-937): Cannot find class for type().

LOG:
Installing jar test.informix.Test_j...
ADDING TO JARMAP: test.informix.Test_j + informix.jvp.dbapplet.impl.JVPClassLoader@5797b5ce
PARAM is not NULL


Questions:
Why appears the error and how to achieve the above-named task?
 
Did you ever find a solution to this? I am experiencing a similar problem. I can install my jar and create the udr but when I execute I get that same error:
SQL Error (-937): Cannot find class for type (java.lang.String).

I would appreciate any assistance you could give.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top