tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew R Feller" <afel...@lsu.edu>
Subject Tomcat DB2 JDBC issue
Date Thu, 15 Nov 2007 13:50:10 GMT
Database: DB2 v7 OS390
Server: DB2 Connect v9, Tomcat 6.0.14, Java 1.6
Issue: LoginModule unable to load driver; raises SQLException "No
suitable driver found"

Connection String: jdbc:db2:blah
Driver: COM.ibm.db2.jdbc.app.DB2Driver

 

I am developing a custom JAAS LoginModule to go against a database for
authorization information.  Each web application will have a JAAS realm
declared within its Context.  While developing the LoginModule, I am
halted by an issue using the DB2Java library provided by IBM in Tomcat.
Whenever the LoginModule is invoked and attempts to create a connection,
it throws a SQLException of "No suitable driver found for ...".


To test whether this was a DB2 Connect issue or not, I wrote a simply
Java program that doesn't run in Tomcat to load the driver and create a
connection to the server using the CLI settings the Tomcat code is
using. It ran successfully. I also ran my unit test in Eclipse, which
used the same exact settings, and it too performed successfully. There
is an issue with Tomcat somehow, but I am unable to determine what. The
DB2java.jar was placed within Tomcat's lib directory, which is handled
by the common loader.

Error Log:
Caused by: java.sql.SQLException: No suitable driver found for
jdbc:db2:LSU
at java.sql.DriverManager.getConnection(DriverManager.java:602)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
at
edu.lsu.infrastructure.java_authorization.sam_authorization.JDBCAuthoriz
ationModule.getConnection(JDBCAuthorizationModule.java:179)
... 23 more
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:872)
at
javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at
javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:362)
at
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAut
henticator.java:258)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:417)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:2
63)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:84
4)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Http11Protocol.java:584)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)

 

Thank you for any help offered as this on puzzles me,

 

Andrew R Feller, Analyst

Subversion Administrator

University Information Systems

Louisiana State University

afelle1@lsu.edu

(office) 225.578.3737

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message