tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Herchel Wojciech <W.Herc...@pzuzycie.com.pl>
Subject ODP: JDBCRealm reconnect problems?
Date Mon, 19 Mar 2001 08:50:53 GMT
i had a similar problem and solved it by changing connectionURL to:
connectionURL="jdbc:mysql://localhost/dbase?user=somebody&amp;password=secre
t"
and commenting connectionName and Password.

vVolf


> -----Oryginalna wiadomooeæ-----
> Od: Vladimir Grishchenko [mailto:vladg@std.teradyne.com]
> Wys³ano: 16 marca 2001 20:45
> Do: tomcat-user@jakarta.apache.org
> Temat: JDBCRealm reconnect problems?
> 
> 
> 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(PreparedStatem
> ent.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(ContextMa
> nager.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(ContextManag
> er.java:855)
>         at 
> org.apache.tomcat.core.ContextManager.internalService(ContextM
> anager.java:789)
>         at 
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>         at
> org.apache.tomcat.service.http.HttpConnectionHandler.processCo
> nnection(HttpConnectionHandler.java:210)
>         at 
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoin
> t.java:416)
>         at 
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPo
> ol.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_0002ejspng
> s_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(ContextM
> anager.java:797)
>         at 
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>         at
> org.apache.tomcat.service.http.HttpConnectionHandler.processCo
> nnection(HttpConnectionHandler.java:210)
>         at 
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoin
> t.java:416)
>         at 
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPo
> ol.java:498)
>         at java.lang.Thread.run(Thread.java:498)
> Root cause:
> java.lang.NullPointerException
>         at 
> org.gjt.mm.mysql.PreparedStatement.executeQuery(PreparedStatem
> ent.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(ContextMa
> nager.java:837)
>         at 
> org.apache.tomcat.core.RequestImpl.getRemoteUser(RequestImpl.java:341)
>         at
> org.apache.tomcat.facade.HttpServletRequestFacade.getRemoteUse
> r(HttpServletRequestFacade.java:250)
>         at
> display._0002fdisplay_0002fngs_0005fhome_0002ejspngs_0005fhome
> _jsp_4._jspService(_0002fdisplay_0002fngs_0005fhome_0002ejspng
> s_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(ContextM
> anager.java:797)
>         at 
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>         at
> org.apache.tomcat.service.http.HttpConnectionHandler.processCo
> nnection(HttpConnectionHandler.java:210)
>         at 
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoin
> t.java:416)
>         at 
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPo
> ol.java:498)
>         at java.lang.Thread.run(Thread.java:498)
> 

Mime
View raw message