java.sql.SQLException: Already closed.

JIRA | Gareth Woodham | 3 years ago
  1. 0

    This is not a new error. I have seen it for a few months in PPT and operation environments. I suspect it started appearing when we changed the database configuration to cure connection pool leaks with oracle. The core functionality of the message exchange between countries is not affected but it leaves a nasty mess in the NCP logs and there are no eADC records stored in the database, but perhaps this is not critical. Is it possible to switch off eADC? Or perhaps this is a simple configuration change that I need to make somewhere? {noformat} INFO 2013-11-21 12:12:12,559 com.spirit.epsos.cc.adc.extractor.AutomaticDataCollector extractDataAndCreateAccordingSqlInserts.202 - Current intermediaTransformer retrieved successfully DEBUG 2013-11-21 12:12:12,559 com.spirit.epsos.cc.adc.extractor.EasyXsltTransformer transform.80 - Entering snchronous part DEBUG 2013-11-21 12:12:12,561 com.spirit.epsos.cc.adc.extractor.EasyXsltTransformer transform.109 - Leaving snchronous part INFO 2013-11-21 12:12:12,561 com.spirit.epsos.cc.adc.extractor.AutomaticDataCollector processTransaction.88 - Insert the following sql-queries: INSERT INTO eTransaction(Transaction_PK,Direction,HomeISO,HomeNCP_OID,HomeHCID,HomeHost,HomeAddress,SndISO,SndNCP_OID,SndHCID,SndAddress,SndHost,SndMsgID,ReceivingISO,ReceivingNCP_OID,ReceivingHost,receivingAddr,ReceivingMsgID,TransactionCounter,HumanRequestor,UserId,POC,POC_ID,AuthentificationLevel,RequestAction,ResponseAction,ServiceType,ServiceName,StartTime,EndTime,Duration)VALUES('9a2833f7-674a-4e88-b5fa-53b3c9641086','OUTBOUND','SE','','2.16.17.710.807.1000.990.1','91.202.112.220','95.131.200.23','','','','','','','','','','','','','Jussi Lemmetty','','Pharmacy','','','urn:hl7-org:v3:PRPA_IN201305UV02:CrossGatewayPatientDiscovery','urn:hl7-org:v3:PRPA_IN201306UV02:CrossGatewayPatientDiscovery','','XCPD_Service','Thu, 21 Nov 2013 12:12:11 +0100','Thu, 21 Nov 2013 12:12:12 +0100','518'); ERROR 2013-11-21 12:12:12,562 com.spirit.epsos.cc.adc.extractor.AutomaticDataCollector runSqlScript.240 - The following error occurred during an SQL operation: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed. 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:525) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.Util.getInstance(Util.java:386) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1014) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919) at com.mysql.jdbc.ConnectionImpl.throwConnectionClosedException(ConnectionImpl.java:1269) at com.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1261) at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:5014) at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:371) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:328) at com.ibatis.common.jdbc.ScriptRunner.runScript(ScriptRunner.java:116) at com.spirit.epsos.cc.adc.extractor.AutomaticDataCollectorImpl.runSqlScript(AutomaticDataCollectorImpl.java:238) at com.spirit.epsos.cc.adc.extractor.AutomaticDataCollectorImpl.processTransaction(AutomaticDataCollectorImpl.java:89) at com.spirit.epsos.cc.adc.EadcReceiverImpl.process(EadcReceiverImpl.java:34) at eu.epsos.pt.eadc.util.EadcUtil.invokeEadc(EadcUtil.java:120) at eu.epsos.pt.eadc.EadcUtilWrapper.invokeEadc(EadcUtilWrapper.java:88) at _2009.xcpd.iti.ihe.XCPD_ServiceMessageReceiverInOut.invokeBusinessLogic(XCPD_ServiceMessageReceiverInOut.java:163) at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146) at javax.servlet.http.HttpServlet.service(HttpServlet.java:643) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:722) Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 79,576,903 milliseconds ago. The last packet sent successfully to the server was 79,576,903 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.GeneratedConstructorAccessor2499.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1117) at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3829) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2449) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2713) at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:5060) at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:371) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:328) at com.ibatis.common.jdbc.ScriptRunner.runScript(ScriptRunner.java:112) ... 25 more Caused by: java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109) at java.net.SocketOutputStream.write(SocketOutputStream.java:153) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3810) ... 32 more WARN 2013-11-21 12:12:12,563 com.spirit.epsos.cc.adc.db.EadcDbConnect closeConnection.57 - Unable to close DB connection (id:982528663) java.sql.SQLException: Already closed. at org.apache.tomcat.dbcp.dbcp.PoolableConnection.close(PoolableConnection.java:114) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:191) at com.spirit.epsos.cc.adc.db.EadcDbConnectImpl.closeConnection(EadcDbConnectImpl.java:53) at com.spirit.epsos.cc.adc.extractor.AutomaticDataCollectorImpl.runSqlScript(AutomaticDataCollectorImpl.java:245) at com.spirit.epsos.cc.adc.extractor.AutomaticDataCollectorImpl.processTransaction(AutomaticDataCollectorImpl.java:89) at com.spirit.epsos.cc.adc.EadcReceiverImpl.process(EadcReceiverImpl.java:34) at eu.epsos.pt.eadc.util.EadcUtil.invokeEadc(EadcUtil.java:120) at eu.epsos.pt.eadc.EadcUtilWrapper.invokeEadc(EadcUtilWrapper.java:88) at _2009.xcpd.iti.ihe.XCPD_ServiceMessageReceiverInOut.invokeBusinessLogic(XCPD_ServiceMessageReceiverInOut.java:163) at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146) at javax.servlet.http.HttpServlet.service(HttpServlet.java:643) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:722) ERROR 2013-11-21 12:12:12,566 _2009.xcpd.iti.ihe.XCPD_ServiceMessageReceiverInOut invokeBusinessLogic.173 - EADC INVOCATION FAILED! java.lang.Exception: The following error occurred during an SQL operation: at com.spirit.epsos.cc.adc.extractor.AutomaticDataCollectorImpl.runSqlScript(AutomaticDataCollectorImpl.java:242) at com.spirit.epsos.cc.adc.extractor.AutomaticDataCollectorImpl.processTransaction(AutomaticDataCollectorImpl.java:89) at com.spirit.epsos.cc.adc.EadcReceiverImpl.process(EadcReceiverImpl.java:34) at eu.epsos.pt.eadc.util.EadcUtil.invokeEadc(EadcUtil.java:120) at eu.epsos.pt.eadc.EadcUtilWrapper.invokeEadc(EadcUtilWrapper.java:88) at _2009.xcpd.iti.ihe.XCPD_ServiceMessageReceiverInOut.invokeBusinessLogic(XCPD_ServiceMessageReceiverInOut.java:163) at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146) at javax.servlet.http.HttpServlet.service(HttpServlet.java:643) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:722) Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed. 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:525) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.Util.getInstance(Util.java:386) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1014) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919) at com.mysql.jdbc.ConnectionImpl.throwConnectionClosedException(ConnectionImpl.java:1269) at com.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1261) at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:5014) at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:371) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:328) at com.ibatis.common.jdbc.ScriptRunner.runScript(ScriptRunner.java:116) at com.spirit.epsos.cc.adc.extractor.AutomaticDataCollectorImpl.runSqlScript(AutomaticDataCollectorImpl.java:238) ... 24 more Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 79,576,903 milliseconds ago. The last packet sent successfully to the server was 79,576,903 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.GeneratedConstructorAccessor2499.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1117) at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3829) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2449) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2713) at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:5060) at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:371) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:328) at com.ibatis.common.jdbc.ScriptRunner.runScript(ScriptRunner.java:112) ... 25 more Caused by: java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109) at java.net.SocketOutputStream.write(SocketOutputStream.java:153) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3810) ... 32 more {noformat} Here is the context.xml for tomcat (creds removed) {noformat} <Context> <!-- Default set of monitored resources --> <WatchedResource>WEB-INF/web.xml</WatchedResource> <Resource name="jdbc/TSAM" auth="Container" type="javax.sql.DataSource" maxActive="2" maxIdle="2" maxWait="-1" username="" password="" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/tsam?zeroDateTimeBehavior=convertToNull"/> <Resource name="jdbc/EADC_XCPD" auth="Container" type="javax.sql.DataSource" maxActive="2" maxIdle="2" maxWait="-1" username="" password="" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/eadc?zeroDateTimeBehavior=convertToNull"/> <Resource name="jdbc/EADC_XDR" auth="Container" type="javax.sql.DataSource" maxActive="2" maxIdle="2" maxWait="-1" username="" password="" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/eadc?zeroDateTimeBehavior=convertToNull"/> <Resource name="jdbc/EADC_XCA" auth="Container" type="javax.sql.DataSource" maxActive="2" maxIdle="2" maxWait="-1" username="" password="" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/eadc?zeroDateTimeBehavior=convertToNull"/> <Resource name="jdbc/ConfMgr" auth="Container" type="javax.sql.DataSource" maxActive="2" maxIdle="2" maxWait="-1" username="" password="" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/properties_ncp?zeroDateTimeBehavior=convertToNull"/> </Context> {noformat}

    JIRA | 3 years ago | Gareth Woodham
    java.sql.SQLException: Already closed.
  2. 0

    SE OpenNCP logs are cluttered with these exceptions from eADC. SE uses MySQL, has anybody else noticed the same problem? {noformat} INFO 2013-10-08 09:33:17,096 com.spirit.epsos.cc.adc.extractor.AutomaticDataCollector processTransaction.88 - Insert the following sql-queries: INSERT INTO eTransaction(Transaction_PK,Direction,HomeISO,HomeNCP_OID,HomeHCID,HomeHost,HomeAddress,SndISO,SndNCP_OID,SndHCID,SndAddress,SndHost,SndMsgID,ReceivingISO,ReceivingNCP_OID,ReceivingHost,receivingAddr,ReceivingMsgID,TransactionCounter,HumanRequestor,UserId,POC,POC_ID,AuthentificationLevel,RequestAction,ResponseAction,ServiceType,ServiceName,StartTime,EndTime,Duration)VALUES('6627f4be-04c7-4bd2-9862-b5b0e36a85de','OUTBOUND','SE','','2.16.17.710.807.1000.990.1','95.131.200.23','95.131.200.23','','','','','','','','','','','','','Annika Test','','Pharmacy','','','urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b','urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-bResponse','','XDR_Service','Tue, 08 Oct 2013 09:33:15 +0200','Tue, 08 Oct 2013 09:33:17 +0200','1905'); ERROR 2013-10-08 09:33:17,097 com.spirit.epsos.cc.adc.extractor.AutomaticDataCollector runSqlScript.240 - The following error occurred during an SQL operation: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed. 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:525) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.Util.getInstance(Util.java:386) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1014) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919) at com.mysql.jdbc.ConnectionImpl.throwConnectionClosedException(ConnectionImpl.java:1269) at com.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1261) at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:5014) at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:371) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:328) at com.ibatis.common.jdbc.ScriptRunner.runScript(ScriptRunner.java:116) at com.spirit.epsos.cc.adc.extractor.AutomaticDataCollectorImpl.runSqlScript(AutomaticDataCollectorImpl.java:238) at com.spirit.epsos.cc.adc.extractor.AutomaticDataCollectorImpl.processTransaction(AutomaticDataCollectorImpl.java:89) at com.spirit.epsos.cc.adc.EadcReceiverImpl.process(EadcReceiverImpl.java:34) at eu.epsos.pt.eadc.util.EadcUtil.invokeEadc(EadcUtil.java:120) at eu.epsos.pt.eadc.EadcUtilWrapper.invokeEadc(EadcUtilWrapper.java:88) at _2007.xds_b.iti.ihe.XDR_ServiceMessageReceiverInOut.invokeBusinessLogic(XDR_ServiceMessageReceiverInOut.java:148) at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146) at javax.servlet.http.HttpServlet.service(HttpServlet.java:643) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:722) Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 74,797,420 milliseconds ago. The last packet sent successfully to the server was 74,797,420 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:525) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1117) at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3829) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2449) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2713) at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:5060) at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:371) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:328) at com.ibatis.common.jdbc.ScriptRunner.runScript(ScriptRunner.java:112) ... 25 more Caused by: java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109) at java.net.SocketOutputStream.write(SocketOutputStream.java:153) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3810) ... 32 more WARN 2013-10-08 09:33:17,098 com.spirit.epsos.cc.adc.db.EadcDbConnect closeConnection.57 - Unable to close DB connection (id:28341531) java.sql.SQLException: Already closed. at org.apache.tomcat.dbcp.dbcp.PoolableConnection.close(PoolableConnection.java:114) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:191) at com.spirit.epsos.cc.adc.db.EadcDbConnectImpl.closeConnection(EadcDbConnectImpl.java:53) at com.spirit.epsos.cc.adc.extractor.AutomaticDataCollectorImpl.runSqlScript(AutomaticDataCollectorImpl.java:245) at com.spirit.epsos.cc.adc.extractor.AutomaticDataCollectorImpl.processTransaction(AutomaticDataCollectorImpl.java:89) at com.spirit.epsos.cc.adc.EadcReceiverImpl.process(EadcReceiverImpl.java:34) at eu.epsos.pt.eadc.util.EadcUtil.invokeEadc(EadcUtil.java:120) at eu.epsos.pt.eadc.EadcUtilWrapper.invokeEadc(EadcUtilWrapper.java:88) at _2007.xds_b.iti.ihe.XDR_ServiceMessageReceiverInOut.invokeBusinessLogic(XDR_ServiceMessageReceiverInOut.java:148) at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146) at javax.servlet.http.HttpServlet.service(HttpServlet.java:643) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:722) ERROR 2013-10-08 09:33:17,099 _2007.xds_b.iti.ihe.XDR_ServiceMessageReceiverInOut invokeBusinessLogic.158 - EADC INVOCATION FAILED! java.lang.Exception: The following error occurred during an SQL operation: at com.spirit.epsos.cc.adc.extractor.AutomaticDataCollectorImpl.runSqlScript(AutomaticDataCollectorImpl.java:242) at com.spirit.epsos.cc.adc.extractor.AutomaticDataCollectorImpl.processTransaction(AutomaticDataCollectorImpl.java:89) at com.spirit.epsos.cc.adc.EadcReceiverImpl.process(EadcReceiverImpl.java:34) at eu.epsos.pt.eadc.util.EadcUtil.invokeEadc(EadcUtil.java:120) at eu.epsos.pt.eadc.EadcUtilWrapper.invokeEadc(EadcUtilWrapper.java:88) at _2007.xds_b.iti.ihe.XDR_ServiceMessageReceiverInOut.invokeBusinessLogic(XDR_ServiceMessageReceiverInOut.java:148) at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146) at javax.servlet.http.HttpServlet.service(HttpServlet.java:643) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:722) Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed. 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:525) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.Util.getInstance(Util.java:386) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1014) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919) at com.mysql.jdbc.ConnectionImpl.throwConnectionClosedException(ConnectionImpl.java:1269) at com.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1261) at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:5014) at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:371) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:328) at com.ibatis.common.jdbc.ScriptRunner.runScript(ScriptRunner.java:116) at com.spirit.epsos.cc.adc.extractor.AutomaticDataCollectorImpl.runSqlScript(AutomaticDataCollectorImpl.java:238) ... 24 more Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 74,797,420 milliseconds ago. The last packet sent successfully to the server was 74,797,420 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:525) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1117) at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3829) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2449) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2713) at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:5060) at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:371) at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:328) at com.ibatis.common.jdbc.ScriptRunner.runScript(ScriptRunner.java:112) ... 25 more Caused by: java.net.SocketException: Broken pipe at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109) at java.net.SocketOutputStream.write(SocketOutputStream.java:153) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3810) ... 32 more {noformat}

    JIRA | 3 years ago | Gareth Woodham
    java.sql.SQLException: Already closed.
  3. 0

    Database access fails to work in the morning

    Stack Overflow | 3 years ago | Wolfman Joe
    java.sql.SQLException: Already closed.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Tomcat pooling connection to replication database

    Stack Overflow | 2 years ago | jelle
    java.sql.SQLException: Already closed.
  6. 0

    datasource + tomcat + postgres

    com.br | 1 year ago
    javax.faces.el.EvaluationException: org.hibernate.exception.GenericJDBCException: Cannot release connection

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.sql.SQLException

      Already closed.

      at org.apache.tomcat.dbcp.dbcp.PoolableConnection.close()
    2. org.apache.tomcat
      PoolingDataSource$PoolGuardConnectionWrapper.close
      1. org.apache.tomcat.dbcp.dbcp.PoolableConnection.close(PoolableConnection.java:114)
      2. org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:191)
      2 frames
    3. com.spirit.epsos
      EadcReceiverImpl.process
      1. com.spirit.epsos.cc.adc.db.EadcDbConnectImpl.closeConnection(EadcDbConnectImpl.java:53)
      2. com.spirit.epsos.cc.adc.extractor.AutomaticDataCollectorImpl.runSqlScript(AutomaticDataCollectorImpl.java:245)
      3. com.spirit.epsos.cc.adc.extractor.AutomaticDataCollectorImpl.processTransaction(AutomaticDataCollectorImpl.java:89)
      4. com.spirit.epsos.cc.adc.EadcReceiverImpl.process(EadcReceiverImpl.java:34)
      4 frames
    4. eu.epsos.pt
      EadcUtilWrapper.invokeEadc
      1. eu.epsos.pt.eadc.util.EadcUtil.invokeEadc(EadcUtil.java:120)
      2. eu.epsos.pt.eadc.EadcUtilWrapper.invokeEadc(EadcUtilWrapper.java:88)
      2 frames
    5. _2009.xcpd.iti
      XCPD_ServiceMessageReceiverInOut.invokeBusinessLogic
      1. _2009.xcpd.iti.ihe.XCPD_ServiceMessageReceiverInOut.invokeBusinessLogic(XCPD_ServiceMessageReceiverInOut.java:163)
      1 frame
    6. org.apache.axis2
      AxisEngine.receive
      1. org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
      2. org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114)
      3. org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
      3 frames
    7. Apache Axis2 - Transport - HTTP
      AxisServlet.doPost
      1. org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
      2. org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
      2 frames
    8. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
      2 frames
    9. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      5. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      6. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
      7. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      8. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
      8 frames
    10. Grizzly HTTP
      JIoEndpoint$Worker.run
      1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
      2. org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
      3. org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      3 frames
    11. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:722)
      1 frame