"java.lang.UnsatisfiedLinkError: SQLAllocEnv" when connecting to DB2 from within WebSphere Application Server 4.0.x
 Technote (FAQ)
 
Problem
When trying to connect to a DB2® database from a data source within WebSphere® Application Server 4.0.x on Windows NT® or Windows® 2000, the following error might occur:

java.lang.UnsatisfiedLinkError: SQLAllocEnv
at COM.ibm.db2.jdbc.app.DB2Driver.<init>(DB2Driver.java:299)
at COM.ibm.db2.jdbc.app.DB2Driver.<clinit>(DB2Driver.java:135)
at COM.ibm.db2.jdbc.DB2BaseDataSource.isLoaded(DB2BaseDataSource.java:327)
at COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource.getPooledConnection(DB2ConnectionPoolDataSource.java:102)
...
 
Cause
This problem occurs when there are multiple db2jdbc.dll files on the system.

The wrong db2jdbc.dll is loaded, and if it is incompatible with the db2java.zip in use, the error occurs.

 
Solution
Remove any extra db2jdbc.dll files on the system. The only db2jdbc.dll should be in the SQLLIB\bin directory.
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > DB Connections/Connection Pooling
Operating system(s): Windows
Software version: 4.0
Software edition:
Reference #: 1141639
IBM Group: Software Group
Modified date: Sep 7, 2004