SJSAS 9 connect to DB2 9 error?

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!

[659 byte] By [Kidda] at [2007-11-27 7:57:20]
# 1

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

The above has nothing to do with the CLASSPATH, or with WEB-INF/lib. It has everything to do with the (on unix its called LD_LIBRARY_PATH on Windows maybe you use PATH) library path the Server (the SJSAS).

Add the directory containing the above listed library "db2jcct2" to the library path of the shell starting the SJSAS server and the problem should go away.

masijade.a at 2007-7-12 19:39:11 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...