Has anyone experienced JDBCReconnect problems???
Looks like mysql db connection times out and JDBCRealm cannot
reopen it for some reason. 
Actually it tries to reopen it and somehow is able to authenticate
a user, but then dies completely...
Any ideas what can be wrong?

This is the error/exceptions from tomcat log file:


2001-03-16 11:20:33 - ContextManager: JDBCRealm: The database connection is null or was
found to be closed. Trying to re-open it.
2001-03-16 11:20:33 - ContextManager: JDBCRealm: There was an SQLException while in
authenticate: null
2001-03-16 11:20:33 - ContextManager: JDBCRealm: SQLException: java.sql.SQLException:
Error during query: Unexpected Exception: java.sql.SQLException message given:
Communication link failure: java.io.IOException
2001-03-16 11:20:38 - ContextManager: JDBCRealm: The database connection is null or was
found to be closed. Trying to re-open it.
2001-03-16 11:20:38 - ContextManager: JDBCRealm: JDBCRealm.authenticate: SELECT 
password
FROM profiles WHERE username = ?
2001-03-16 11:20:38 - ContextManager: JDBCRealm: Authentication unsuccessful for user 
null
2001-03-16 11:20:47 - ContextManager: JDBCRealm: Authentication successful for user 
Walter
2001-03-16 11:20:47 - ContextManager: JDBCRealm: Auth ok, user=Walter
2001-03-16 11:20:47 - ContextManager: JDBCRealm: Controled access for Walter R( 
/ngs_web +
/entering/buttons.jsp + null) Ct (jsp(org.apache.jasper.servlet.JspServlet/null) )
2001-03-16 11:20:47 - ContextManager: JDBCRealm: There was an SQLException while in
getUserRoles: Walter
2001-03-16 11:20:47 - ContextManager: JDBCRealm: SQLException: java.sql.SQLException:
Error during query: Unexpected Exception: java.sql.SQLException message given:
Communication link failure: java.io.IOException
2001-03-16 11:20:47 - ContextManager: JDBCRealm: Auth ok, user has no roles
2001-03-16 11:20:47 - ContextManager: JDBCRealm: UnAuthorized Y
2001-03-16 11:20:55 - ContextManager: JDBCRealm: The database connection is null or was
found to be closed. Trying to re-open it.
2001-03-16 11:20:55 - Ctx( /ngs_web ): Exception in: R( /ngs_web + 
/entering/buttons.jsp +
null) - java.lang.NullPointerException
        at org.gjt.mm.mysql.PreparedStatement.executeQuery(PreparedStatement.java:198)
        at org.apache.tomcat.request.JDBCRealm.authenticate(JDBCRealm.java:307)
        at org.apache.tomcat.request.JDBCRealm.authenticate(JDBCRealm.java:482)
        at 
org.apache.tomcat.core.ContextManager.doAuthenticate(ContextManager.java:837)
        at org.apache.tomcat.core.RequestImpl.getRemoteUser(RequestImpl.java:341)
        at org.apache.tomcat.request.JDBCRealm.authorize(JDBCRealm.java:503)
        at org.apache.tomcat.core.ContextManager.doAuthorize(ContextManager.java:855)
        at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:789)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
        at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
        at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
        at java.lang.Thread.run(Thread.java:498)

2001-03-16 11:21:00 - Ctx( /ngs_web ): Exception in: R( /ngs_web + 
/display/ngs_home.jsp +
null) - javax.servlet.ServletException
        at java.lang.Throwable.<init>(Throwable.java:96)
        at java.lang.Exception.<init>(Exception.java:44)
        at javax.servlet.ServletException.<init>(ServletException.java:161)
        at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
        at
display._0002fdisplay_0002fngs_0005fhome_0002ejspngs_0005fhome_jsp_4._jspService(_0002fdisplay_0002fngs_0005fhome_0002ejspngs_0005fhome_jsp_4.java:2404)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
        at org.apache.tomcat.core.Handler.service(Handler.java:286)
        at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
        at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
        at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
        at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
        at java.lang.Thread.run(Thread.java:498)
Root cause:
java.lang.NullPointerException
        at org.gjt.mm.mysql.PreparedStatement.executeQuery(PreparedStatement.java:198)
        at org.apache.tomcat.request.JDBCRealm.authenticate(JDBCRealm.java:307)
        at org.apache.tomcat.request.JDBCRealm.authenticate(JDBCRealm.java:482)
        at 
org.apache.tomcat.core.ContextManager.doAuthenticate(ContextManager.java:837)
        at org.apache.tomcat.core.RequestImpl.getRemoteUser(RequestImpl.java:341)
        at
org.apache.tomcat.facade.HttpServletRequestFacade.getRemoteUser(HttpServletRequestFacade.java:250)
        at
display._0002fdisplay_0002fngs_0005fhome_0002ejspngs_0005fhome_jsp_4._jspService(_0002fdisplay_0002fngs_0005fhome_0002ejspngs_0005fhome_jsp_4.java:1488)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
        at org.apache.tomcat.core.Handler.service(Handler.java:286)
        at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
       at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
        at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
        at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
        at java.lang.Thread.run(Thread.java:498)

Reply via email to