473,594 Members | 2,854 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Regarding install_jar functioning

Hi,
Could any one please shed some light as to how an jar whose copy
has been deleted from the SQLLIB\FUNCTION s\JAR\<schema> still be
referred to from our projects?
Even after installing a fresh copy of the jar, the old copy is still
being referenced.

May 3 '06 #1
4 1355
"The Java class files that you use to implement a routine must reside
in either a JAR file you have installed in the database, or in the
correct CLASSPATH for your operating system. The DB2 classloader
searches the classes and JAR files in the CLASSPATH and will pick up
the first class it encounters with the specified name."

Are you sure that there are no simillar class in some other jar in
CLASS path or path registered with database ?

May 3 '06 #2

"annhere" <an************ *****@gmail.com > wrote in message
news:11******** **************@ i39g2000cwa.goo glegroups.com.. .
Hi,
Could any one please shed some light as to how an jar whose copy
has been deleted from the SQLLIB\FUNCTION s\JAR\<schema> still be
referred to from our projects?
Even after installing a fresh copy of the jar, the old copy is still
being referenced.


This sounds like a problem I had a while back when I was writing some course
materials about stored procedures for DB2 Version 7. I believe the same
problem occurs with respect to functions.

I did some research and experimentation on this problem at the time,
including some Google searches of the archives of this newsgroup, and wrote
some documentation about what I learned. I _think_ this documentation should
still be valid in DB2 Version 8. Here is what I wrote:

----------------------------------------------------------------------------------------------------------------
Stored Procedure Won't Refresh

This is the situation where the stored procedure is prepared without any
error messages arising but the stored procedure that is executed is clearly
an older version of the desired procedure, not the current version.

The most common reason for this is that the KEEPDARI setting in the database
manager configuration is 'YES'. A KEEPDARI setting of 'YES' is appropriate
for a production environment because it improves performance by cacheing
stored procedures. However, KEEPDARI should be 'NO' in a development or
training environment.

To determine the value of the KEEPDARI setting, follow these steps:

Launch a DB2 Command Window and execute the following command at the prompt:
db2 get dbm cfg | more

Scroll down through the result by pressing your space bar until you see a
line that starts "Keep DARI process (KEEPDARI) = ".
If the value of the KEEPDARI value is not appropriate for your environment,
you need to change it and then stop DB2 and restart it. This can be
accomplished by entering each of the following commands at the DB2 Command
Window prompt in this order:

db2 update dbm cfg using keepdari no (or 'db2 update dbm cfg using keepdari
yes' if you want to make the KEEPDARI value 'yes')

db2 terminate

db2 force application all

db2stop

db2start

Each of those commands should execute without displaying any error messages.

If the value of KEEPDARI was already 'NO' when the problem occurred, the
KEEPDARI setting was _NOT_ the reason that the stored procedure won't
refresh.

In that case, try entering this command at a DB2 Command Window: db2
terminate. Then try the stored procedure again.

If that doesn't work, execute the following command in a DB2 Command Window:
db2 call sqlj.refresh_cl asses(). Try the stored procedure again.

If that still doesn't work, execute the following commands in a DB2 Command
window in the sequence shown:

db2 force application all

db2stop

db2start

Then try the stored procedure again.

---

The other common reason for encountering this problem is that the
preparation procedures contain an error. For example, if the Java compile
step writes the class files to directory FOO and the jar step gathers the
class files from directory BAR, the code that is being compiled is different
from the code that is being jarred. In this case, no amount of recompiling
will refresh the code and the other measures discussed above will be
ineffective: the preparation procedures need to be revised so that the code
which is compiled is also the code which is jarred and installed in DB2.

----------------------------------------------------------------------------------------------------------------

--
Rhino
May 3 '06 #3
Hi ... thanx a lot for your suggestions... It has worked. As suggested
it was look up a jar of the same nae in another folder.

Because of some error, 2 functions of the same name 'A' had formed in 2
schemas.
So jars were formed in 2 schemas too ... one in SQLLIB\FUNCTION S\JARS\S
& SQLLIB\FUNCTION S\JARS\Y. We required the jar in Schema 'Y' . However
it was constantly referring to the jar in 'S' . After physically
deleting this jar & then running the script again the problem was
solved.

May 3 '06 #4

"annhere" <an************ *****@gmail.com > wrote in message
news:11******** **************@ i39g2000cwa.goo glegroups.com.. .
Hi ... thanx a lot for your suggestions... It has worked. As suggested
it was look up a jar of the same nae in another folder.

Because of some error, 2 functions of the same name 'A' had formed in 2
schemas.
So jars were formed in 2 schemas too ... one in SQLLIB\FUNCTION S\JARS\S
& SQLLIB\FUNCTION S\JARS\Y. We required the jar in Schema 'Y' . However
it was constantly referring to the jar in 'S' . After physically
deleting this jar & then running the script again the problem was
solved.

Excellent! I'm glad to hear that you solved your problem :-)

--
Rhino
May 3 '06 #5

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

Similar topics

4
5047
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 terminated abnormally. SQLSTATE=38503
1
3284
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 sqlj.install_jar('file:/home/db2inst1/jaf-1.0.2/activation.jar','ACTIVATION') This is running on: Linux RHEL AS 3 update 1,
5
1801
by: annhere | last post by:
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_CLASSES()@ call sqlj.install_jar( 'file:C:\AXML.jar', 'AXML' )@ CALL SQLJ.REFRESH_CLASSES()@ CREATE FUNCTION A(xml VARCHAR(3000),type VARCHAR(3000)) RETURNS VARCHAR(3000) EXTERNAL NAME 'AXML:com.AConvertXML.convertXML' LANGUAGE JAVA
3
3308
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
0
7946
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8253
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8374
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8009
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6661
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5739
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3867
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2389
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1216
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.