java.lang.IllegalAccessError or java.lang.VerifyError occurs when an application running on WebSphere Application Server V5 attempts to access DB2 using the DB2 Universal JDBC driver
 Technote (troubleshooting)
 
Problem(Abstract)
An application running on IBM® WebSphere® Application Server V5 (any release) attempts to use a datasource using the IBM DB2® Universal JDBC driver and receives one of the two following exceptions:

java.lang.IllegalAccessError
: com.ibm.db2.jcc.a.b tried to access method
com/ibm/db2/jcc/a/ub.<init>(Lcom/ibm/db2/jcc/a/a;Lcom/ibm/db2/jcc/a/b;Lj
ava/lang/String;III)V
at com.ibm.db2.jcc.a.b.b(b.java:1449)
at com.ibm.db2.jcc.c.o.a(o.java:1897)
at com.ibm.db2.jcc.c.o.prepareCall(o.java:829)
at com.ibm.db2.jcc.c.wb.prepareCall(wb.java:136)

or

java.lang.VerifyError
: (class: com/ibm/db2/jcc/a/ub, method: b
signature:
(Lcom/ibm/db2/jcc/c/ad;Lcom/ibm/db2/jcc/a/a;Lcom/ibm/db2/jcc/a/b;)
V) Bad type in putfield/putstatic
at com.ibm.db2.jcc.a.b.b(b.java:1449)
at com.ibm.db2.jcc.c.o.a(o.java:1897)
at com.ibm.db2.jcc.c.o.prepareCall(o.java:829)
at com.ibm.db2.jcc.c.wb.prepareCall(wb.java:136)
 
Cause
The problem is caused by multiple copies of the DB2 Universal JDBC driver's jar files appearing in the WebSphere Application Server classpath.
 
Resolving the problem
Ensure that there is only one set of the DB2 Universal JDBC driver's jar files (db2jcc.jar, db2jcc_license_cu.jar and db2jcc_license_cisuz.jar) in the WebSphere Application Server classpath.

You may want to check the following locations for copies of the driver's jar files:

- Application EAR files
- <install_root>/lib
- <install_root>/lib/ext
- Other non-WebSphere Application Server directories on the classpath

(where<install_root> is the directory where WebSphere Application Server is installed).

If any additional copies of the jars are found, stop the Application Server(s), remove the duplicate files, and restart the Application Servers.

To ensure that all instances of those jars are found, it is recommended to complete a full file system search of all subdirectories of <install_root>.

Note:
The configuration of JDBC providers contains the classpath of the JDBC Driver's jar files, so make sure these jars only exist in the paths specified on the JDBC provider configuration.

See the link in the "Related Information" section below for details on how to properly configure a datasource for DB2 using the Administrative Console.

 
Related information
Vendor-specific data sources minimum required settings
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


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