[opencms-dev] SQL error in OpenCms 9.0.1 workplace

Schliemann, Kai K.Schliemann at comundus.com
Fri Aug 29 14:16:04 CEST 2014


Hi Chris,
wait_timeout:
http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_wait_timeout
JDBC:
http://www.oracle.com/technetwork/java/javase/jdbc/index.html

AFAIK, this error occurs, if the time between two database "requests" is longer than wait_timeout.

HTH
Best regards
Kai


Von: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] Im Auftrag von Christoph Kukulies
Gesendet: Freitag, 29. August 2014 11:56
An: opencms >> The OpenCms mailing list
Betreff: Re: [opencms-dev] SQL error in OpenCms 9.0.1 workplace

I got this same error this morning when I tried to log into the workplace again. This time it is the
8.0.4 to 9.0.1 updated workplace server.

It looks something wants to run a JDBC4 prepared statement?

Which component is using JDBC anyway?

restarting tomcat was not necessary. Only after two other login attempts the workplace came up.

Any ideas?



Am 27.08.2014 um 09:02 schrieb Christoph Kukulies:
I tried to login into the 9.0.1 workplace this morning and got:

An SQL error occurred when executing the following query: com.mysql.jdbc.JDBC4PreparedStatement at 191b0b1<mailto:com.mysql.jdbc.JDBC4PreparedStatement at 191b0b1>: EXCEPTION: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after statement closed..
Reason: The last packet successfully received from the server was 47,922,526 milliseconds ago. The last packet sent successfully to the server was 47,922,526 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
Reason: Broken pipe

org.opencms.db.CmsDbSqlException: An SQL error occurred when executing the following query: com.mysql.jdbc.JDBC4PreparedStatement at 191b0b1<mailto:com.mysql.jdbc.JDBC4PreparedStatement at 191b0b1>: EXCEPTION: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after statement closed..

  at org.opencms.db.generic.CmsVfsDriver.readResource(CmsVfsDriver.java:2330)

  at org.opencms.db.CmsDriverManager.readResource(CmsDriverManager.java:7500)

  at org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager.java:7241)

  at org.opencms.db.CmsSecurityManager.readResource(CmsSecurityManager.java:4898)

  at org.opencms.file.CmsObject.readResource(CmsObject.java:2957)

  at org.opencms.file.CmsObject.readResource(CmsObject.java:2924)

  at org.opencms.file.CmsObject.readDefaultFile(CmsObject.java:2252)

  at org.opencms.main.OpenCmsCore.initResource(OpenCmsCore.java:1493)

  at org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1716)

  at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:153)

  at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)

  at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)

  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)

  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)

  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)

  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)

  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)

  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)

  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)

  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)

  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)

  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)

  at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)

  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

  at java.lang.Thread.run(Thread.java:745)

Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 47,922,526 milliseconds ago.  The last packet sent successfully to the server was 47,922,526 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.

  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

  at java.lang.reflect.Constructor.newInstance(Constructor.java:526)

  at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)

  at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1121)

  at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3941)

  at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2551)

  at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2731)

  at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2818)

  at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2157)

  at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2324)

  at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)

  at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)

  at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)

  at org.opencms.db.generic.CmsVfsDriver.readResource(CmsVfsDriver.java:2309)

  ... 27 more

Caused by: java.net.SocketException: Broken pipe

  at java.net.SocketOutputStream.socketWrite0(Native Method)

  at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113)

  at java.net.SocketOutputStream.write(SocketOutputStream.java:159)

  at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)

  at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)

  at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3922)

  ... 36 more
Only restarting Tomcat7 again made it possible to login again.

--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de


--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20140829/d4727028/attachment.htm>


More information about the opencms-dev mailing list