tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fabio <fa...@ccuec.unicamp.br>
Subject java.library.path and database connection
Date Tue, 16 Apr 2002 20:37:17 GMT
Hello,

    I have a problem and I'm having a hard time to figure out what is going on.

    Scenario: New machine. Solaris 2.8, all patches. J2SDK 1.4.0. Tomcat
4.0.3-LE-jdk1.4. DB2 7.1 (local, not db2client, but I think that it's not the
problem; I can connect via Java applications).

    I have several servlets on tomcat/webapps/some-dir/WEB-INF/classes. The DB2
driver (db2java.jar) is on tomcat/classes/lib. When I try to execute anything
(that connects to the database), I get the message:

java.sql.SQLException: java.lang.UnsatisfiedLinkError: no db2jdbc in
java.library.path

    Search on ibm.com. The needed .so is on /opt/IBMdb2/V7.1/java12. Tried to
add to setclasspath.sh

JAVA_OPTS="-Djava.library.path=/opt/IBMdb2/V7.1/java12"

    Same error. Created a servlet to show Java System.properties, and
java.library.path is there, with the correct value.

    Search in Google brought several pages with same instruction: "define
LD_LIBRARY_PATH or LIBPATH that points to the directory". No luck (does Tomcat
bother to look at LD_LIBRARY_PATH ?).

    I tried to run db2profile (a shell script full of environment definitions)
before tomcat/bin/startup.sh, put db2profile as /tomcat/bin/setenv.sh, tried
Tomcat 4.0.4b2, and got the same message.

    Of course I'm missing something, but I don't know what is it.

    Anyone has a clue ? Except giving up on DB2 :)

    Thanks a lot in advance.

Fabio.

--
Fabio Mengue - Centro de Computacao - Unicamp
fabio@ccuec.unicamp.br       fabio@unicamp.br
"Quem se mata de trabalhar merece mesmo morrer." - Millor




--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message