473,246 Members | 1,268 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,246 software developers and data experts.

Problem when connecting to DB2 from standalone java application

Hii ,

I am trying to use a type 2 driver to connect to DB2 0n AIX 5
I have a small java test to class to establish a conneciton with the db
.. I am NOT using WAS or any appserver
When I try to connect to the DB I get the following exception

[Signaling in VM: java/lang/UnsatisfiedLinkError, message:
/usr/java14/jre/bin/libdb2jdbc.a: A file or directory in the path name
does not exist.]
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.jav a:2120)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java :1986)
at java.lang.Runtime.loadLibrary0(Runtime.java:824)
at java.lang.System.loadLibrary(System.java:908)
at COM.ibm.db2.jdbc.app.DB2Driver$3.run(Unknown Source)
at java.security.AccessController.doPrivileged1(Nativ e Method)
at
java.security.AccessController.doPrivileged(Access Controller.java:287)
at COM.ibm.db2.jdbc.app.DB2Driver.<init>(Unknown Source)
at COM.ibm.db2.jdbc.app.DB2Driver.<clinit>(Unknown Source)
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:180)
at test.main(test.java:11)
[Loaded java.lang.ClassLoader$4 from /usr/java14/jre/lib/core.jar]
[Signaling in VM: java/lang/UnsatisfiedLinkError, message:
/usr/java14/jre/bin/libdb2jdbc.a: A file or directory in the path name
does not exist.]
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.jav a:2120)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java :1998)
at java.lang.Runtime.loadLibrary0(Runtime.java:824)
at java.lang.System.loadLibrary(System.java:908)
at COM.ibm.db2.jdbc.app.DB2Driver$3.run(Unknown Source)
at java.security.AccessController.doPrivileged1(Nativ e Method)
at
java.security.AccessController.doPrivileged(Access Controller.java:287)
at COM.ibm.db2.jdbc.app.DB2Driver.<init>(Unknown Source)
at COM.ibm.db2.jdbc.app.DB2Driver.<clinit>(Unknown Source)
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:180)
at test.main(test.java:11)
[Signaling in VM: java/lang/UnsatisfiedLinkError, message:
/usr/java14/jre/bin/classic/libdb2jdbc.a: A file or directory in the
path name does not exist.]
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.jav a:2120)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java :1998)
at java.lang.Runtime.loadLibrary0(Runtime.java:824)
at java.lang.System.loadLibrary(System.java:908)
at COM.ibm.db2.jdbc.app.DB2Driver$3.run(Unknown Source)
at java.security.AccessController.doPrivileged1(Nativ e Method)
at
java.security.AccessController.doPrivileged(Access Controller.java:287)
at COM.ibm.db2.jdbc.app.DB2Driver.<init>(Unknown Source)
at COM.ibm.db2.jdbc.app.DB2Driver.<clinit>(Unknown Source)
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:180)
at test.main(test.java:11)
[Signaling in VM: java/lang/UnsatisfiedLinkError, message:
/usr/java14/jre/bin/libdb2jdbc.a: A file or directory in the path name
does not exist.]
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.jav a:2120)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java :1998)
at java.lang.Runtime.loadLibrary0(Runtime.java:824)
at java.lang.System.loadLibrary(System.java:908)
at COM.ibm.db2.jdbc.app.DB2Driver$3.run(Unknown Source)
at java.security.AccessController.doPrivileged1(Nativ e Method)
at
java.security.AccessController.doPrivileged(Access Controller.java:287)
at COM.ibm.db2.jdbc.app.DB2Driver.<init>(Unknown Source)
at COM.ibm.db2.jdbc.app.DB2Driver.<clinit>(Unknown Source)
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:180)
at test.main(test.java:11)
[Signaling in VM: java/lang/UnsatisfiedLinkError, message:
/usr/lib/libdb2jdbc.a: A file or directory in the path name does not
exist.]
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.jav a:2120)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java :1998)
at java.lang.Runtime.loadLibrary0(Runtime.java:824)
at java.lang.System.loadLibrary(System.java:908)
at COM.ibm.db2.jdbc.app.DB2Driver$3.run(Unknown Source)
at java.security.AccessController.doPrivileged1(Nativ e Method)
at
java.security.AccessController.doPrivileged(Access Controller.java:287)
at COM.ibm.db2.jdbc.app.DB2Driver.<init>(Unknown Source)
at COM.ibm.db2.jdbc.app.DB2Driver.<clinit>(Unknown Source)
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:180)
at test.main(test.java:11)

Follwoing is the CLASSPATH and the PATH variables in by .profile

PATH=/home1/db2inst4/sqllib/lib:/usr/java14/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:/home1/db2inst4/
sqllib/bin:.
CLASSPATH=/home1/prisma/sk143379/prismabatches/dwh/lib/log4j-1.2.8.jar:/home1/prisma/sk143379/prismabatches/dwh/lib/RaboLogger
..jar:/home1/prisma/sk143379/prismabatches/dwh/srinath:/home1/db2inst4/sqllib/java/db2java.zip:/home1/prisma/sk143379/prismabat
ches/dwh/config/rabologger:/home1/prisma/sk143379/prismabatches/dwh/classes:/home1/prisma/sk143379/prismabatches
LD_LIBRARY_PATH=:/home1/db2inst4/sqllib/lib

The java class only contains the statement to connect to the
Database.
In case someone has encountered the same problem please
Thanks

-Neeraj

Nov 12 '05 #1
0 5629

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

Similar topics

1
by: kaiwing18 | last post by:
Hi , I have a problem relate to java and database. Could anyone answer me ?Please see the following code. import java.sql.*; public class Result { public static void main(String args) {
0
by: Ali | last post by:
I'm trying to write a really basic chat program that allows 2 client programs to send messages to each other via a server. I've managed to write the code so that both clients can connect to the...
5
by: Jeppe | last post by:
Hi @ll, I'm investigating the possibility to call a struts action on a web environment from a standalone java application. I need to make this call automatically, from a crontab (on unix)....
5
by: Robin Johnson | last post by:
Hi, I've written an engine in Javascript for running text adventure games on a web page: http://www.robinjohnson.f9.co.uk/adventure/hamlet.html (That's the only game I've written with it so...
2
by: Kent Lewandowski | last post by:
hi all, Recently I wrote some stored procedures using java jdbc code (admittedly my first stab) and then tried to implement the same within java packages (for code reuse). I encountered...
8
by: Kevin D. | last post by:
Please note, I already posted this on the MySQL official forum, but received no response. I thought I'd try again in another location. My apologies to anyone reading this twice... Despite...
0
by: NoaGross | last post by:
Hi, I'm relly new in java and I have a problem. I'm using java applet. When using http all ok, but when trying to use https i get: Java Plug-in 1.5.0_10 Using JRE version 1.5.0_10 Java...
5
by: Ananthu | last post by:
Hi I have done all the codings part for connecting mysql server with java application but when i try to compile,the compilation is successful and during execution i get the following message, ...
5
by: srinivasareddynr | last post by:
Hi, I am trying to parse an xml using xpath. I dont have any problem when i try it as a standalone java application, but when I try the same code with in a servlet I am getting the below error. Can...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...

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.