Servlet Exceptions when connecting to DB2 Database
 Technote (troubleshooting)
 
Problem(Abstract)
Custom application fails to connect to DB with "SRVE0026E: [Servlet Error]-[SQLConnect] " messages.

. . .
[3/10/05 13:54:25:428 EST] 11c59cfd WebGroup E SRVE0026E: [Servlet Error]-[SQLConnect]: com.mycompany.database.DbConnectionException: SQLConnect
at com.mycompany.database.DbConnectionFactory.returnConnection(DbConnectionFactory.java:264)
at com.mycompany.database.DbConnectionFactory.createDbConnection(DbConnectionFactory.java:171)
at org.apache.jsp._enterChg._jspService(_enterChg.java:89)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:683)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:781)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 
Cause
If you are using the IBM® DB2® Type 2 JDBC driver, it has a native library that it uses in addition to the classes in the db2java.zip. If you use a 64-bit JDBC driver with a 32-bit sdk OR if you use a 32-bit JDBC driver with a 64-bit sdk, then an UnsatisfiedLinkError will result. For the preceding SRVE0026E error, the following UnsatisfiedLinkError was found about 70 lines above the servlet errors in SystemOut.log.

[3/10/05 13:54:24:085 EST] 11c59cfd SystemErr R java.lang.UnsatisfiedLinkError: SQLConnect

It is necessary to use a 32-bit driver with a 32-bit SDK and a 64-bit driver with a 64-bit SDK.

 
Resolving the problem
Use the 32-bit JDBC driver with the 32-bit sdk and the 64-bit driver with the 64-bit sdk.

To determine what version of the JDBC driver you are using, run the <DB2Instance_home>/sqllib/bin/db2level command.

To determine if the sdk you are using is 32-bit or 64-bit, you can view the startServer.log when you start your DMgr or Application Server. For example,

Java version = J2RE 1.4.1 IBM Windows 32 build cn1411-20031011 (JIT enabled: jitc), Java Compiler = jitc, Java VM name = Classic VM

The Windows® 32 shows that it is a 32-bit SDK.

Or you can refer to the following page on the IBM® WebSphere® Application Server support page.
Verify Java SDK version shipped with WebSphere Application Server Fix Packs

 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
Historical Number
47711
111
000
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > DB Connections/Connection Pooling
Operating system(s): AIX
Software version: 6.0
Software edition:
Reference #: 1204382
IBM Group: Software Group
Modified date: Apr 22, 2005