Skip to main content

developerWorks >  WebSphere  >  Forums  >  WebSphere Portal  >  developerWorks

Caused by: java.sql.SQLException: java.lang.UnsatisfiedLinkError:    Point your RSS reader here for a feed of the latest messages in this thread


Tags for this thread: 

     

 
 

My developerWorks
 Welcome, Guest
Sign in or register
This question is not answered.

Permlink Replies: 11 - Pages: 1 - Last Post: Nov 6, 2009 2:15 PM Last Post By: httweed
rakaku

Posts: 6
Registered: Nov 06, 2009 05:05:48 AM
Caused by: java.sql.SQLException: java.lang.UnsatisfiedLinkError:
Posted: Nov 06, 2009 05:11:29 AM
 
Click to report abuse...   Click to reply to this thread Reply
Hi All,

I got the below error in WAS 6.0 Base server,

Caused by: java.sql.SQLException: java.lang.UnsatisfiedLinkError: Can't find library db2jdbc (libdb2jdbc.so or .so) in sun.boot.library.path or java.library.path
sun.boot.library.path=/usr/IBM/WebSphere/AppServer/java/jre/bin

I see the db2 driver files are available in the lib32 path which is there on java.library path and also LIBPATH. But not sure why this error shows up?

Can any one help me?

Regards,
Ravi
Akash Bharti

Posts: 130
Registered: Jul 15, 2007 03:08:08 AM
Re: Caused by: java.sql.SQLException: java.lang.UnsatisfiedLinkError:
Posted: Nov 06, 2009 05:17:51 AM   in response to: rakaku in response to: rakaku's post
 
Click to report abuse...   Click to reply to this thread Reply
When do you get this error?? During server start-up or test connection or from some application??

Basically, it looks like db2 path is not set.Try running . db2profile from {INSTANCE_HOME}/sqllib/

Thanks
Akash
rakaku

Posts: 6
Registered: Nov 06, 2009 05:05:48 AM
Re: Caused by: java.sql.SQLException: java.lang.UnsatisfiedLinkError:
Posted: Nov 06, 2009 08:47:35 AM   in response to: rakaku in response to: rakaku's post
 
Click to report abuse...   Click to reply to this thread Reply
While starting the server I got this error. The db2profile is set in the .profile in the server.

I installed the application(ear file) successfully in the WAS 6.0. After the installing the application I tried to stop and start the server then I am getting this error.

Regards,
Ravi
httweed

Posts: 212
Registered: Feb 20, 2006 04:16:14 PM
Re: Caused by: java.sql.SQLException: java.lang.UnsatisfiedLinkError:
Posted: Nov 06, 2009 08:47:35 AM   in response to: rakaku in response to: rakaku's post
 
Click to report abuse...   Click to reply to this thread Reply
Can you upload the SystemOut.log file and show the output of:

env | grep db2

~HT
The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM
rakaku

Posts: 6
Registered: Nov 06, 2009 05:05:48 AM
Re: Caused by: java.sql.SQLException: java.lang.UnsatisfiedLinkError:
Posted: Nov 06, 2009 08:58:09 AM   in response to: rakaku in response to: rakaku's post
 
Click to report abuse...   Click to reply to this thread Reply
Output of the above command :

PATH=/usr/java14/bin:/usr/lpp/internet/server_root/java/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/opicmadm/bin:/usr/bin/X11:/sbin:.:/home/opicmdb2/sqllib/bin:/home/opicmdb2/sqllib/adm:/home/opicmdb2/sqllib/misc:/home/opicmdb2/sqllib/db2tss/bin
CLASSPATH=/home/opicmdb2/sqllib/java/db2java.zip:/home/opicmdb2/sqllib/java/db2jcc.jar:/home/opicmdb2/sqllib/java/sqlj.zip:/home/opicmdb2/sqllib/function:/home/opicmdb2/sqllib/java/db2jcc_license_cu.jar:.:/usr/java14/jre/lib/rt.jar:/home/opicmadm/taskmaster.sg/middleware.jar:/home/opicmadm/taskmaster.sg/abr.jar:/home/opicmdb2/sqllib/lib32/libdb2jdbc.so
DB2INSTANCE=opicmdb2
LIBPATH=/usr/lib:/lib:/home/opicmdb2/sqllib/lib32
LD_LIBRARY_PATH=/home/opicmdb2/sqllib/lib32

*************Error found on SystemOut.log*****************
Caused by: java.sql.SQLException: java.lang.UnsatisfiedLinkError: Can't find library db2jdbc (libdb2jdbc.so or .so) in sun.boot.library.path or java.library.path
sun.boot.library.path=/usr/IBM/WebSphere/AppServer/java/jre/bin
java.library.path=/usr/IBM/WebSphere/AppServer/java/jre/bin:/usr/IBM/WebSphere/AppServer/java/jre/bin/classic:/usr/IBM/WebSphere/AppServer/java/jre/bin:/usr/IBM/WebSphere/AppServer/bin:/usr/mqm/java/lib:/usr/opt/wemps/lib:/home/opicmdb2/sqllib/lib32:/home/opicmdb2/sqllib/bin:/usr/lib:/home/opicmdb2/sqllib/java
at COM.ibm.db2.jdbc.app.DB2Driver.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:80)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java(Compiled Code))
at java.lang.reflect.Constructor.newInstance(Constructor.java(Compiled Code))
at java.lang.Class.newInstance3(Class.java(Compiled Code))
at java.lang.Class.newInstance(Class.java(Compiled Code))
httweed

Posts: 212
Registered: Feb 20, 2006 04:16:14 PM
Re: Caused by: java.sql.SQLException: java.lang.UnsatisfiedLinkError:
Posted: Nov 06, 2009 08:58:09 AM   in response to: rakaku in response to: rakaku's post
 
Click to report abuse...   Click to reply to this thread Reply
Thanks for that but I had asked for the SystemOut.log to be uploaded. Could you please upload the full SystemOut.log? Thanks!

~HT
The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM
rakaku

Posts: 6
Registered: Nov 06, 2009 05:05:48 AM
Re: Caused by: java.sql.SQLException: java.lang.UnsatisfiedLinkError:
Posted: Nov 06, 2009 10:11:57 AM   in response to: rakaku in response to: rakaku's post
 
Click to report abuse...   Click to reply to this thread Reply
Attachment SystemOut.log (34.2 KB)
I attached systemout.log file.

Please check

thanks,
Ravi
httweed

Posts: 212
Registered: Feb 20, 2006 04:16:14 PM
Re: Caused by: java.sql.SQLException: java.lang.UnsatisfiedLinkError:
Posted: Nov 06, 2009 10:21:43 AM   in response to: rakaku in response to: rakaku's post
 
Click to report abuse...   Click to reply to this thread Reply
Thank you!

The problem appears to be that you're using a 64-bit WAS JVM and pointing to the 32 bit DB2 libraries.

Java version = J2RE 1.4.2 IBM AIX 5L for PowerPC (64 bit JVM) build caix64142ifx-20070604 (ifix 120916 : 142_SR8 + 119825) (JIT enabled: jitc), Java Compiler = jitc, Java VM name = Classic VM

It should be pointing to sqllib/lib instead of sqllib/lib32. What I would recommend you try is the following:

1. Edit db2profile and find where it's setting the libpath to lib32
2. Change this to point to lib
3. Do this for any other location in this db2profile file that I'm neglecting. I believe it's just LIBPATH.
4. Source the db2profile again so it's got the right settings
5. Restart server1

Alternatively, you could set up your application to use Type 4 DB2 drivers and avoid this issue altogether.

Hope that helps!

~HT
The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM
rakaku

Posts: 6
Registered: Nov 06, 2009 05:05:48 AM
Re: Caused by: java.sql.SQLException: java.lang.UnsatisfiedLinkError:
Posted: Nov 06, 2009 12:15:59 PM   in response to: rakaku in response to: rakaku's post
 
Click to report abuse...   Click to reply to this thread Reply
Hi,

I did the below ,

1. Created a softlink lib pointing to lib32
2. Added a line in setupCmdLine.sh for the LIBPATH pointing to lib

But giving again the same error

Regards,
Ravi
httweed

Posts: 212
Registered: Feb 20, 2006 04:16:14 PM
Re: Caused by: java.sql.SQLException: java.lang.UnsatisfiedLinkError:
Posted: Nov 06, 2009 12:15:59 PM   in response to: rakaku in response to: rakaku's post
 
Click to report abuse...   Click to reply to this thread Reply
Ok, could you please do what I asked?

Also it would be good to see the new SystemOut.log again.

~HT
The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM
rakaku

Posts: 6
Registered: Nov 06, 2009 05:05:48 AM
Re: Caused by: java.sql.SQLException: java.lang.UnsatisfiedLinkError:
Posted: Nov 06, 2009 01:17:17 PM   in response to: rakaku in response to: rakaku's post
 
Click to report abuse...   Click to reply to this thread Reply
Attachment SystemOut.log (34.3 KB)
Hi ,

Change the db2profile as well.

attaching the systemout.

Regards,
Ravi
httweed

Posts: 212
Registered: Feb 20, 2006 04:16:14 PM
Re: Caused by: java.sql.SQLException: java.lang.UnsatisfiedLinkError:
Posted: Nov 06, 2009 02:15:36 PM   in response to: rakaku in response to: rakaku's post
 
Click to report abuse...   Click to reply to this thread Reply
Ok, thanks for sending. The paths are set correctly so the next question would be does this path actually exist on the server:

/home/opicmdb2/sqllib/lib/libdb2jdbc.so

Also, this is a WebSphere Portal forum. You do not appear to have WebSphere Portal installed at all. You might have better luck posting this on a WAS or DB2 forum.

~HT
The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM
 Tags
Help

Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular type of content or application that you're viewing.

My tags shows your tags for this particular type of content or application that you're viewing.

 

MoreLess 


Point your RSS reader here for a feed of the latest messages in all forums