stacker stacker - 4 months ago 25x
Java Question

java.lang.UnsatisfiedLinkError while loading DB2 JDBC driver

I try to use jboss-seam with a db2 database, the following error occurs [jcc][10389][12245][3.52.95] while loading the native
library db2jcct2, java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path
an error occurred ERRORCODE=-4472, SQLSTATE=null

I tried setting
as well as


Both paths include

I also tried to set
with no effect.

OS is MacOs

I also tried to use a JDBC4 driver , db2jcc4.jar since jdbc4 drivers shouldn't rely on native libs.


The IBM Data Server Driver for JDBC and SQLJ includes both Type 2 and Type 4 JDBC drivers. Please check the following:

1) Make sure the driver is in your classpath: db2jcc.jar. Alternatively you can use the JDBC4 driver (db2jcc4.jar), but don't put both in the classpath.

2) Make sure that you're specifying the JCC driver ( in your app configuration.

3) Use a Type-4 URL like jdbc:db2://server:port/database. If you specify a Type-2 URL like jdbc:db2:database then the driver will start looking for native libraries.