users@glassfish.java.net

SJSAS 9 connect to DB2 9 error?

From: <glassfish_at_javadesktop.org>
Date: Sat, 16 Jun 2007 19:43:02 PDT

I hava a java class for connecting to DB2 9:

Class.forName("com.ibm.db2.jcc.DB2Driver");
conn = DriverManager.getConnection("jdbc:db2:POI",username,password);

I wirte a main() for this to validate the connection and it's ok. But when a jsp invoke it to connect to DB2 9, there is an error report:

Failure in loading T2 native library db2jcct2, reason: java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path

But I have imported the JDBC files to the WEB-INF\lib.
Why?

Also, when I code a web service in netbeans which connect to DB2 9, it seems importing the jdbc files isn't working.

Thanks!
[Message sent by forum member 'kiddkaka' (kiddkaka)]

http://forums.java.net/jive/thread.jspa?messageID=222597