- This topic has 13 replies, 3 voices, and was last updated 20 years, 2 months ago by
Riyad Kalla.
-
AuthorPosts
-
mclarryMemberHi guys,
I’m trying to use DB2 version 7 JDBC driver with MyEclipse tomcat 5.0 or/and resin 3.0 startup plug-in. When I start the server, it always crash when it tries to load the COM.ibm.db2.jdbc.app.DB2Driver.I’ve got a java.sql.SQLException: java.lang.UnsatisfiedLinkError: no db2jdbc in java.library.path
But I’m sure the library (db2java.jar driver) is in the classpath! It is in Tomcat 5.0\common\lib and just to make sure, I also added it manually in the Plug-in configuration classpath (My eclipse app server preferences).
Note that when I run resin or tomcat without MyEclipse plugin, the connection to the database works perfectly. I “googled” the exception and my feeling is that there’s a IBM dll that doesn’t initialize. Any ideas would be much appreciated.
I’ve got Eclipse 3.8.1 with the quick fix 20040825 and the Application server is running on Windows XP.
Regards,
Larry
Riyad KallaMemberLarry,
You are correct there is a DLL that you likely need to “Append to Library Path” on the Paths prefrences fro your app server connector.
mclarryMemberRight!
For those who will have the same problem:
I added the SQL 7.x bin directory (in my case: C:\Program Files\SQLLIB\bin) to MyEclipse app server library path and it’s now working!What I found strange is that this \bin folder is already in my “PATH”system variable. <i>The plug-in should have access to that, no!???</i> Doesn’t seems like it…
Many thanks,
Larry
Riyad KallaMemberLarry,
Thank you for posting back your solution it is very helpful for all our users.As far as the BIN dir being in your path, the “System Path” that Java uses to resolve DLL and native system resources is different than your path. So while it certainly has access to your path, it wasn’t looking there for the directory/resources.
sully74MemberI was suffering from the same symptoms and found this post. But since I added the /SQLLIB/bin to my Tomcat 4’s library path, I started getting a javaw.exe popup dialog stating the message ‘This application has failed to start because DB2CLI.dll was not found. Re-installing the application may fix this problem’.
Unfortunately, re-installing the db2 client didn’t solve the problem.
Any thoghts?
I’m running Eclipse 3.0.1 with MyEclipse 3.8.0
Riyad KallaMemberDB2CLI.dll
Where does this file live? Make sure to append it to your LIbrary Path.
sully74MemberMy DB2CLI.dll is in my
c:\program files\sqllib\bin
directory which I’d added to my Tomcat 4’s library path when I first encountered the
java.sql.SQLException: java.lang.UnsatisfiedLinkError: no db2jdbc in java.library.path
message.
Now I no longer get the UnsatisfiedLinkError, but get the DB2CLI.dll not found error.
sully74MemberMy DB2CLI.dll is in my
c:\program files\sqllib\bin
directory which I’d added to my Tomcat 4’s library path when I first encountered the
java.sql.SQLException: java.lang.UnsatisfiedLinkError: no db2jdbc in java.library.path
message.
Now I no longer get the UnsatisfiedLinkError, but get the DB2CLI.dll not found dialog error. When the Eclipse gets control back, The following exception message is there:
java.sql.SQLException: java.lang.UnsatisfiedLinkError: C:\Program Files\SQLLIB\bin\db2jdbc.dll: Can't find dependent libraries
Riyad KallaMemberHmm, can you try adding the file itself to the library path, not the dir?
Riyad KallaMemberCan’t find dependent libraries
Oh wait this is diff, the db2jdbc.dll likely needs more DLLs that live someplace else in the SQLLIB dir, look for those and add that dir as well to lib path. Also check maybe your Window’s system dir.
sully74MemberI added every item from my system’s PATH definition to MyEclipse’s library path configuration and still no dice. If I run Tomcat outside of Eclipse/MyEclipse, it gets past the DB2 call successfully, however, I’d like to step through the code and debug it.
Thanks!
Riyad KallaMemberSully,
There is something setup with your normal Tomcat install that is not being conveyed in your MyEclipse connector install. Did you customize your Tomcat startup scripts at all? We need to figure out what the difference is.Our of curiosirty, what are all the files that the db2 JDBC driver install, installs? Where do they go? Did you add all these dirs to your Library Path?
sully74MemberNot sure what happened, but last night before I left, my setup wasn’t working. Without making any changes, except logging off, powering down last night and then rebooting and logging back in (plus a good nights sleep), all is well this morning.
Thanks for your help!
Riyad KallaMemberWithout making any changes, except logging off, powering down last night and then rebooting and logging back in (plus a good nights sleep), all is well this morning.
I bet it had something to do with Windows library loading with the DLL… never the less, glad it is working!
-
AuthorPosts