Jason,
I have had trouble with database drives as
well.
What I did was to institute a timeout. If
the connection to the database is older than say 5 minutes, I throw it away and
try to log into the database again.
My guess is that the connection has closed
and the driver is not handling things properly. I found this to be true when
working with SQL Server and my guess is that your having the same problem. I do
the throw away and establish a new connection without the user knowing what
happened. My logs show the event, but that is the only indication that
something was done.
Best of luck!
From: Jason
Kretzer/STAR BASE Consulting Inc. [mailto:JKretzer@xxxxxxxxxxxxxxx]
Sent: Wednesday, August 04, 2004
2:08 PM
To: users@xxxxxxxxxx
Subject: [cinjug-users] JDBC
driver problems on session expiration
Hello all,
I
am having an intermittent problem with session expiration handling.
First,
my background specs.
WSAD
5.1.1
Windows
XP Pro
using
WSAD testing server
using
a DB2 backend
using
jcc DB2 driver
Here
is my scenario which happens maybe 5% of the time:
I
log in to my webapp. I let the session expire. When I click on a
link, it goes to my error screen and tells me the session is expired. So,
I go back to the login(html) page which posts to the LoginVerification servlet.
When it gets to line 305(lines 304 and 305 are below for reference), I
get the following(labelled First Error below) in my console window. Upon
seeing this, I type the url for my login page again and try to log in again.
This action produces another error in my console window, labelled Second
Error below. I then must restart the test server because the JVM core
dumps.
Any
ideas? I would hate to have this happen when the application goes live.
Thanks,
-Jason
LINE
304: Class.forName("com.ibm.db2.jcc.DB2Driver");
LINE
305: conn = DriverManager.getConnection("jdbc:db2://ssbc10:50000/ASSESS",
usernameStr ,passwordStr );
===========================================
First
Error
[8/4/04 12:53:05:790 GMT-05:00]
55e731f5 WebGroup E SRVE0026E: [Servlet Error]-[Class
com/ibm/db2/jcc/SQLJLogWriter violates loader constraints: definition
mismatch between parent and child loaders]: java.lang.LinkageError: Class
com/ibm/db2/jcc/SQLJLogWriter violates loader constraints: definition
mismatch between parent and child loaders
at
com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:244)
at
java.sql.DriverManager.getConnection(DriverManager.java:538)
at
java.sql.DriverManager.getConnection(DriverManager.java:188)
at
com.starbaseinc.www.online.teckchek.administration.common.LoginVerification.doPost(LoginVerification.java:305)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at
com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
======================================================
Second
Error
JVMDG217: Dump Handler is Processing a
Signal - Please Wait.
JVMDG303: JVM Requesting Java core file
JVMDG304: Java core file written to
C:\Program Files\IBM\WebSphere Studio\Application
Developer\v5.1.1\javacore.20040804.135626.3884.txt
JVMDG215: Dump Handler has Processed
Exception Signal 11.