Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > Informix > How to call the store procedure(sqlj.install_jar) using jdbc?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-05-03, 02:49
chet199308 chet199308 is offline
Registered User
 
Join Date: Dec 2003
Posts: 11
How to call the store procedure(sqlj.install_jar) using jdbc?

Client OS: Windows 2000
Server OS : Redhat Linux 8.0
Database: Informix 9.4

How to call the store procedure(sqlj.install_jar) using jdbc?

My code as following but doesn't work.

private CallableStatement cblStatement = null;

cblStatement = cn_any.prepareCall("{call sqlj.install_jar(?,?)}");
cblStatement.setString(1,"file:C:/UDR/myudr.jar");
cblStatement.setString(2,"myudr.class");
cblStatement.executeUpdate();

Is there anyone can help me?

Thanks.
Reply With Quote
  #2 (permalink)  
Old 12-05-03, 16:19
Amit Dandekar Amit Dandekar is offline
Registered User
 
Join Date: Oct 2003
Posts: 29
How to call the store procedure(sqlj.install_jar) using jdbc?
Client OS: Windows 2000
Server OS : Redhat Linux 8.0
Database: Informix 9.4

How to call the store procedure(sqlj.install_jar) using jdbc?

My code as following but doesn't work.

private CallableStatement cblStatement = null;

cblStatement = cn_any.prepareCall("{call sqlj.install_jar(?,?)}");
cblStatement.setString(1,"file:C:/UDR/myudr.jar");
cblStatement.setString(2,"myudr.class");
cblStatement.executeUpdate();

Is there anyone can help me?

Thanks.
Reply With Quote
  #3 (permalink)  
Old 12-05-03, 16:28
Amit Dandekar Amit Dandekar is offline
Registered User
 
Join Date: Oct 2003
Posts: 29
Make sure you have taken care of these things

1) the jar you have provided seems to be
on windows while your engine is on linux box.
I think you need to put you jar on same linux box or some place
where engine can find it.
for exaple you can copy it to
/tmp/myudr.jar and set first parameter as "file:/tmp/myudr.jar"

2) Secondly wonder if using alias "myudr.class" causing any problem .
try and use "myudr_class" intead.
3) Make sure you have setup Java UDR support in your engine
by setting necessary parameters in onconfig etc.
Refer to admin guide for same
4) Make sure you have defined SYSSBSPACE and added same to the
instance.
Reply With Quote
  #4 (permalink)  
Old 12-08-03, 01:06
chet199308 chet199308 is offline
Registered User
 
Join Date: Dec 2003
Posts: 11
Hi Amit Dandekar ,
Thank you for your reply.
I've run the install_jar successfully with your solution #1.
But I've got another error, the situation as following:

case 1: My java source code has the package
package com.my.udr;
public class Hello{
public static String HelloWorld() throws Exception{
String str = "Hello World!";
return str;
}
}

case 2: My java source code has no the package
public class Hello{
public static String HelloWorld() throws Exception{
String str = "Hello World!";
return str;
}
}

Step 1. compile the source.
Step 2. make the jar file.
Step 3. run the procedure sqlj.install_jar(...).
Step 4. execute the function HelloWorld().

Case 2. is no problem but it got an error in the step 4 of the Case 1.

9479: Unknown throwable: (Cannot convert param:zh_tw).

What is the problem of the package?

Thanks...
Reply With Quote
  #5 (permalink)  
Old 12-09-03, 03:32
chet199308 chet199308 is offline
Registered User
 
Join Date: Dec 2003
Posts: 11
I've fixed my problem. It was a problem of $LANG.

Thanks
Reply With Quote
  #6 (permalink)  
Old 12-09-03, 23:11
chet199308 chet199308 is offline
Registered User
 
Join Date: Dec 2003
Posts: 11
Quote:
Originally posted by Amit Dandekar
Make sure you have taken care of these things

1) the jar you have provided seems to be
on windows while your engine is on linux box.
I think you need to put you jar on same linux box or some place
where engine can find it.
for exaple you can copy it to
/tmp/myudr.jar and set first parameter as "file:/tmp/myudr.jar"

2) Secondly wonder if using alias "myudr.class" causing any problem .
try and use "myudr_class" intead.
3) Make sure you have setup Java UDR support in your engine
by setting necessary parameters in onconfig etc.
Refer to admin guide for same
4) Make sure you have defined SYSSBSPACE and added same to the
instance.


Hi Amit Dandekar ,
Thank you for your reply.
I've run the install_jar successfully with your solution #1.
But I've got another error, the situation as following:

case 1: My java source code has the package
package com.my.udr;
public class Hello{
public static String HelloWorld() throws Exception{
String str = "Hello World!";
return str;
}
}

case 2: My java source code has no the package
public class Hello{
public static String HelloWorld() throws Exception{
String str = "Hello World!";
return str;
}
}

Step 1. compile the source.
Step 2. make the jar file.
Step 3. run the procedure sqlj.install_jar(...).
Step 4. execute the function HelloWorld().

Case 2. is no problem but it got an error in the step 4 of the Case 1.

9479: Unknown throwable: (Cannot convert param:zh_tw).

What is the problem of the package?
I still have the problem.

Thanks...
Reply With Quote
  #7 (permalink)  
Old 12-10-03, 00:19
chet199308 chet199308 is offline
Registered User
 
Join Date: Dec 2003
Posts: 11
Quote:
Originally posted by Amit Dandekar
Make sure you have taken care of these things

1) the jar you have provided seems to be
on windows while your engine is on linux box.
I think you need to put you jar on same linux box or some place
where engine can find it.
for exaple you can copy it to
/tmp/myudr.jar and set first parameter as "file:/tmp/myudr.jar"

2) Secondly wonder if using alias "myudr.class" causing any problem .
try and use "myudr_class" intead.
3) Make sure you have setup Java UDR support in your engine
by setting necessary parameters in onconfig etc.
Refer to admin guide for same
4) Make sure you have defined SYSSBSPACE and added same to the
instance.

I've checked the jvp.log as following:
loading native library /u/informix/extend/krakatoa/libjvp.so
Read JVP property file/u/informix/extend/krakatoa/.jvpprops
2003/12/10 12:12:18.595 JVP#3: TraceableImpl: trace settings property is null
DBAThread Pool is enabled with size = 20 with patrol interval = 5
2003/12/10 12:12:18.758 JVP#3: DBA API: binding to '/anonymous:3/ServiceDirector
y'
Alarm Time set to 3
2003/12/10 12:12:18.762 JVP#3: ServiceDirectory rebind err: Connection refused t
o host: 10.20.11.233; nested exception is:
java.net.ConnectException: ?s?u?Q???
2003/12/10 12:12:18.778 JVP#3: Could not connect to RMI, rmiregistry probably no
t running
2003/12/10 12:12:18.788 JVP#3: Registering service Logger
2003/12/10 12:12:18.789 JVP#3: Registering service Tracer
PARAM is not NULL
Reply With Quote
  #8 (permalink)  
Old 12-13-03, 00:03
chet199308 chet199308 is offline
Registered User
 
Join Date: Dec 2003
Posts: 11
I've solved my problem already.

Thanks

Last edited by chet199308 : 12-14-03 at 22:13.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On