471,623 Members | 1,631 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,623 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 5479

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Kent Lewandowski | last post: by
reply views Thread by NoaGross | last post: by
5 posts views Thread by srinivasareddynr | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

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.