[opencms-dev] Closed PreparedStatement after long inactivity of opencms
Tarun Chaudhary
Tarun at switchfire.com
Tue Sep 29 17:30:27 CEST 2009
Hello All,
I am using OpenCms version 7.0.5 with mysql Db.
I run it under tomcat version 5.5.27 . When I leave the opencms inactive
for a long time specially at nights when no one access the opencms, in
the early morning, the first few access requests gives following
exception.
I understand its a Db connection statement problem and I understand
opencms uses dbcp connection pool and pool for prepared statements, to
eliminate few causes, I disabled the prepared statement pooling by
making db.statements.default.pooling=false in opencms.properties but the
problem still persists. I have seen various people are getting the same
exception but I couldnt find the solution online.
Before digging down myself deep into the problem, was just wondering
does anyone knows the real cause and the fix to this problem?
org.opencms.db.CmsDbSqlException: Error reading the user "Guest".
at
org.opencms.db.CmsDbSqlException.createException(CmsDbSqlException.java:
116)
at org.opencms.db.CmsDbContext.throwException(CmsDbContext.java:238)
at org.opencms.db.CmsDbContext.report(CmsDbContext.java:212)
at
org.opencms.db.CmsSecurityManager.readUser(CmsSecurityManager.java:4336)
at org.opencms.main.OpenCmsCore.initCmsObject(OpenCmsCore.java:1911)
at org.opencms.main.OpenCmsCore.initCmsObject(OpenCmsCore.java:827)
at org.opencms.main.OpenCmsCore.initCmsObject(OpenCmsCore.java:852)
at org.opencms.main.OpenCms.initCmsObject(OpenCms.java:606)
at
com.switchfire.cms.webservices.CmsServiceInitializer.getCmsObject(CmsSer
viceInitializer.java:67)
at
com.switchfire.cms.webservices.CmsServiceInitializer.login(CmsServiceIni
tializer.java:76)
at
com.switchfire.cms.servlet.CmsClientAlertServlet.doProcess(CmsClientAler
tServlet.java:47)
at
com.switchfire.cms.servlet.BaseCmsServlet.doPost(BaseCmsServlet.java:32)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:172)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
74)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
703)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.
java:895)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:689)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.opencms.db.CmsDbSqlException: An SQL error occurred when
executing the following query:
com.mysql.jdbc.PreparedStatement at 2eebc11d: statement has been closed, no
further internal information available.
at
org.opencms.db.generic.CmsUserDriver.readUser(CmsUserDriver.java:1379)
at org.opencms.db.CmsDriverManager.readUser(CmsDriverManager.java:6849)
at
org.opencms.db.CmsSecurityManager.readUser(CmsSecurityManager.java:4334)
... 25 more
Caused by: com.mysql.jdbc.CommunicationsException: Communications link
failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: Broken pipe
STACKTRACE:
java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2744)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1612)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3256)
at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:
1313)
at
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:144
8)
at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(Delegat
ingPreparedStatement.java:93)
at
org.opencms.db.generic.CmsUserDriver.readUser(CmsUserDriver.java:1362)
at org.opencms.db.CmsDriverManager.readUser(CmsDriverManager.java:6849)
at
org.opencms.db.CmsSecurityManager.readUser(CmsSecurityManager.java:4334)
at org.opencms.main.OpenCmsCore.initCmsObject(OpenCmsCore.java:1911)
at org.opencms.main.OpenCmsCore.initCmsObject(OpenCmsCore.java:827)
at org.opencms.main.OpenCmsCore.initCmsObject(OpenCmsCore.java:852)
at org.opencms.main.OpenCms.initCmsObject(OpenCms.java:606)
at
com.switchfire.cms.webservices.CmsServiceInitializer.getCmsObject(CmsSer
viceInitializer.java:67)
at
com.switchfire.cms.webservices.CmsServiceInitializer.login(CmsServiceIni
tializer.java:76)
at
com.switchfire.cms.servlet.CmsClientAlertServlet.doProcess(CmsClientAler
tServlet.java:47)
at
com.switchfire.cms.servlet.BaseCmsServlet.doPost(BaseCmsServlet.java:32)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:172)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
74)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
703)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.
java:895)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:689)
at java.lang.Thread.run(Thread.java:619)
** END NESTED EXCEPTION **
Last packet sent to the server was 1 ms ago.
at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2759)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1612)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3256)
at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:
1313)
at
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:144
8)
at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(Delegat
ingPreparedStatement.java:93)
at
org.opencms.db.generic.CmsUserDriver.readUser(CmsUserDriver.java:1362)
... 27 more
Regards,
Tarun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20090929/dc8a5656/attachment.htm>
More information about the opencms-dev
mailing list