473,574 Members | 2,210 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Regarding install_jar ... Urgent

Hi we have a certain SQL script. From that script we have calls like:
DROP FUNCTION A@
call sqlj.remove_jar ( 'AXML')@
CALL SQLJ.REFRESH_CL ASSES()@
call sqlj.install_ja r( 'file:C:\AXML.j ar', 'AXML' )@
CALL SQLJ.REFRESH_CL ASSES()@
CREATE FUNCTION A(xml VARCHAR(3000),t ype VARCHAR(3000))
RETURNS VARCHAR(3000)
EXTERNAL NAME 'AXML:com.AConv ertXML.convertX ML'
LANGUAGE JAVA
PARAMETER STYLE DB2GENERAL
NOT DETERMINISTIC
FENCED
NO SQL
NO EXTERNAL ACTION
ALLOW PARALLEL
NO DBINFO@

However after running this script we notice that the old AXML jar
hasn't been removed and the newly changed AXML.jar is not being
installed so the changes are not taking effect.

The AXML.jar is kept in the C drive.
Do we need to keep the jar under SQLLIB\function s in the server?
What maybe the possible reasons for saj.install_jar not working?

May 2 '06 #1
5 1799
If jar file needs to be in server. But you can give a diffrent path
provided you give that path in the create procedure command (which
you have done). I am not sure if remove_jar would delete the file from
the server .It just removes from database catalogs .Its better you
manually remove the file or overwrite the file "AXML.jar" and then
issue create procedure. As DB2 searches classpath and path given using
install_jar.

Regards,
Kiran Nair

May 2 '06 #2

"annhere" <an************ *****@gmail.com > wrote in message
news:11******** **************@ j73g2000cwa.goo glegroups.com.. .
Hi we have a certain SQL script. From that script we have calls like:
DROP FUNCTION A@
call sqlj.remove_jar ( 'AXML')@
CALL SQLJ.REFRESH_CL ASSES()@
call sqlj.install_ja r( 'file:C:\AXML.j ar', 'AXML' )@
CALL SQLJ.REFRESH_CL ASSES()@
CREATE FUNCTION A(xml VARCHAR(3000),t ype VARCHAR(3000))
RETURNS VARCHAR(3000)
EXTERNAL NAME 'AXML:com.AConv ertXML.convertX ML'
LANGUAGE JAVA
PARAMETER STYLE DB2GENERAL
NOT DETERMINISTIC
FENCED
NO SQL
NO EXTERNAL ACTION
ALLOW PARALLEL
NO DBINFO@

However after running this script we notice that the old AXML jar
hasn't been removed and the newly changed AXML.jar is not being
installed so the changes are not taking effect.
If you are saying that AXML.jar is not being removed from C:\, then I'm not
surprised. It has been my experience that sqlj.install_ja r *COPIES* a jar
from wherever you have it, C:\ in your case, to the appropriate directory
within DB2, SQLLIB\FUNCTION \JAR\<schema-name>. Then, sqlj.remove_jar removes
*ONLY THE COPY*, not the original of that jar. I haven't found this
documented anywhere but I believe it to be true since the jars that I put
into DB2 via sqlj.install_ja r are still wherever they started out after the
sqlj.install_ja r has executed and sqlj._remove_ja r doesn't touch the
originals of the jars either.

On the other hand, if you are saying that sqlj.remove_jar is not removing
the DB2 copy of the jar, then there is a problem. Try going to your command
line and simply doing the sqlj.remove_jar from there, then inspect the file
system to make sure the jar is gone. If the sqlj.remove_jar fails, you
should get an error message that you can look up in the Information Center.
For example, you will get SQL20202N if you try to remove a jar that contains
stored procedures which haven't been dropped via DROP PROCEDURE or DROP
SPECIFIC PROCEDURE.

If you get no error message but the DB2 copy of the jar is still there
afterwards, then something very weird is going on that may have more to do
with your operating system than with DB2.
The AXML.jar is kept in the C drive.
Do we need to keep the jar under SQLLIB\function s in the server?
It is fine to leave the original copy of AXML.jar where it is. Just remember
that sqlj.install_ja r copies that jar and places it in the appropriate
directory of SQLLIB, which is SQLLIB\FUNCTION \JAR\<schema-name>.
What maybe the possible reasons for saj.install_jar not working?

When sqlj.install_ja r fails to work, you should always get an error message.
That message should help you track down why the command failed. You can
prove this to yourself by going to your command line and trying to do a
sqlj.install_ja r with an invalid URL; the command should fail with a
reasonably clear error message. An incorrect URL is the most common reason
that sqlj.install_ja r would fail, assuming you don't have a syntax error in
the command itself; there must be other reasons but I can't think of any
that are very likely to occur. For example, the command might fail if the
file system was completely full but that isn't likely to happen very often.

--
Rhino
May 2 '06 #3
hi anindita,
As Rhino said , you need to check out the error message. And even you
can check the SQLLIB\FUNCTION \JAR\<schema-name> if the copy is
happening .
Thanks for the details Rhino.

May 2 '06 #4

"Kiran Nair" <ki************ @gmail.com> wrote in message
news:11******** *************@e 56g2000cwe.goog legroups.com...
hi anindita,
As Rhino said , you need to check out the error message. And even you
can check the SQLLIB\FUNCTION \JAR\<schema-name> if the copy is
happening .
Thanks for the details Rhino.

My pleasure!

--
Rhino
May 2 '06 #5
Hi,
I have tried all that u said. It is indeed removing the copy of the jar
(with sqlj_remove) and installing a fresh copy with sqlj_install
however the changes made in the new jar files still are not being
reflected.
Rhino wrote:
"annhere" <an************ *****@gmail.com > wrote in message
news:11******** **************@ j73g2000cwa.goo glegroups.com.. .
Hi we have a certain SQL script. From that script we have calls like:
DROP FUNCTION A@
call sqlj.remove_jar ( 'AXML')@
CALL SQLJ.REFRESH_CL ASSES()@
call sqlj.install_ja r( 'file:C:\AXML.j ar', 'AXML' )@
CALL SQLJ.REFRESH_CL ASSES()@
CREATE FUNCTION A(xml VARCHAR(3000),t ype VARCHAR(3000))
RETURNS VARCHAR(3000)
EXTERNAL NAME 'AXML:com.AConv ertXML.convertX ML'
LANGUAGE JAVA
PARAMETER STYLE DB2GENERAL
NOT DETERMINISTIC
FENCED
NO SQL
NO EXTERNAL ACTION
ALLOW PARALLEL
NO DBINFO@

However after running this script we notice that the old AXML jar
hasn't been removed and the newly changed AXML.jar is not being
installed so the changes are not taking effect.

If you are saying that AXML.jar is not being removed from C:\, then I'm not
surprised. It has been my experience that sqlj.install_ja r *COPIES* a jar
from wherever you have it, C:\ in your case, to the appropriate directory
within DB2, SQLLIB\FUNCTION \JAR\<schema-name>. Then, sqlj.remove_jar removes
*ONLY THE COPY*, not the original of that jar. I haven't found this
documented anywhere but I believe it to be true since the jars that I put
into DB2 via sqlj.install_ja r are still wherever they started out after the
sqlj.install_ja r has executed and sqlj._remove_ja r doesn't touch the
originals of the jars either.

On the other hand, if you are saying that sqlj.remove_jar is not removing
the DB2 copy of the jar, then there is a problem. Try going to your command
line and simply doing the sqlj.remove_jar from there, then inspect the file
system to make sure the jar is gone. If the sqlj.remove_jar fails, you
should get an error message that you can look up in the Information Center.
For example, you will get SQL20202N if you try to remove a jar that contains
stored procedures which haven't been dropped via DROP PROCEDURE or DROP
SPECIFIC PROCEDURE.

If you get no error message but the DB2 copy of the jar is still there
afterwards, then something very weird is going on that may have more to do
with your operating system than with DB2.
The AXML.jar is kept in the C drive.
Do we need to keep the jar under SQLLIB\function s in the server?


It is fine to leave the original copy of AXML.jar where it is. Just remember
that sqlj.install_ja r copies that jar and places it in the appropriate
directory of SQLLIB, which is SQLLIB\FUNCTION \JAR\<schema-name>.
What maybe the possible reasons for saj.install_jar not working?

When sqlj.install_ja r fails to work, you should always get an error message.
That message should help you track down why the command failed. You can
prove this to yourself by going to your command line and trying to do a
sqlj.install_ja r with an invalid URL; the command should fail with a
reasonably clear error message. An incorrect URL is the most common reason
that sqlj.install_ja r would fail, assuming you don't have a syntax error in
the command itself; there must be other reasons but I can't think of any
that are very likely to occur. For example, the command might fail if the
file system was completely full but that isn't likely to happen very often.

--
Rhino


May 3 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
5046
by: Paul Reddin | last post by:
Hi, (V8.1 FP2) Trying to run SQLJ.INSTALL_JAR, we get the following error SQL1131N DARI (Stored Procedure) process has been terminated abnormally. SQLSTATE=38503 Not sure why this has started failing now (we did upgrade to fp2 fairly
6
2434
by: gaetan | last post by:
Hi everybody, I have several stored procedure developped in Java that ran fine when I was in DB2 7.2 FP6 (on Windows) but since I have passed the FP11, I'm not able to call any of my stored procedure or call an install_JAR, replace_jar or whatever. I always get the following error : SQL1131N DARI (Stored Procedure) process has been...
1
3283
by: Jack | last post by:
I am trying to get javamail running with DB2 and am running into a problem with the sqlj.install_jar. When I go to install the jar, I get a SQL1131 error message which is unhelpful. This is a fresh DB2 install and the first jar file I've tried to install on this system. This is one the command I am issuing: call...
8
5223
by: Mike | last post by:
Hello, I have a few rather urgent questions that I hope someone can help with (I need to figure this out prior to a meeting tomorrow.) First, a bit of background: The company I work for is developing a web-based application, one part of which involves allowing the user the ability to page through transaction "history" information. The...
8
2976
by: Xela | last post by:
Hi A have a very annoying problem. I have written java strored procedures for DB2 v8.1. Their deployement and usage is fine as long as the server is a Windows one. But under Solaris 8 and Linux RH, the call of sqlj.install_jar fails. It correctly create a directiory with the correct schema name, but the jar is not copied in it. The error is...
4
2488
by: tomtailor | last post by:
Hello! I try to create a Java Procedure in DB2 running under SuSE 9.3. But the install_jar command fails with: Error 58004 Error starting the Java Interpeter. a db2set -all command results in: db2inst1@linux:/usr/share/java> db2set -all DB2COMM=tcpip DB2AUTOSTART=YES
4
1388
by: archana | last post by:
Hi all, I am having one confusion regarding invoking web method of web service asychronously through windows applicaiton. What i am doing is i am having one long runing web method whose one way attribute is set as i don't want any return value from that method. What i observered is when my window application start calling web method...
3
3306
by: tol7481 | last post by:
Hi, I'm trying to deploy a Java stored procedure on DB2 V8 on a Linux box, but I have some problems. I've added to the classpath the following JARs sqllib/java/db2java.zip sqllib/java/db2jcc.jar sqllib/java/db2jcc_license_cu.jar sqllib/java/sqlj.zip
5
2302
by: meenu_susi | last post by:
doubt regarding select box....urgent in the below code i am getting data from database..according to the condition.. i want the available data in database to get displayed in selectbox.. for ex... in the code i am getting color=rs("color")according to the condtion if(shirt=name) if i get red, blue as result the i want these two colors to...
0
7803
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8044
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8230
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8096
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5618
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5299
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3739
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1337
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1056
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.