我得到java.sql.SQLException:连接不存在

时间:2017-04-17 22:28:55

标签: java sql db2-400

当我想要查询时,我有这个错误,我的应用程序中的一切正常,直到晚上8点但凌晨3点,当我向基础查询时,它响应连接不存在,此外我无法复制开发环境中的错误

2017-04-09 20:23:01 | 6185 | 76 | LogSystemBS | println  >> finalizo proceso 
de ejecucion de proceso con id= 4 con intentos= 1
2017-04-10 03:50:41 | 6185 | 5890 | LogSystemBS | println  >> en la funcion 
configurarFabrica 7887
2017-04-10 03:50:41 | 6185 | 5890 | LogSystemBS | println  >> en la fabrica del:  fabricaSistemaSeguros
2017-04-10 03:50:41 | 6185 | 5890 | LogSystemBS | println  >> fecha 10/04/2017
2017-04-10 03:50:41 | 6185 | 5890 | LogSystemBS | println  >> nueva fecha 20170410
2017-04-10 03:50:41 | 6185 | 5890 | LogSystemBS | println  >> ****** 
parametros enviados a entorno*****
2017-04-10 03:50:41 | 6185 | 5890 | LogSystemBS | println  >> NPE--->048400000083960104217047
2017-04-10 03:50:41 | 6185 | 5890 | LogSystemBS | println  >> fecha--->20170410
2017-04-10 03:50:41 | 6185 | 5890 | LogSystemBS | println  >> aviso--->0
java.sql.SQLException: The connection does not exist.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:382)
at com.ibm.as400.access.AS400JDBCConnection.checkOpen(AS400JDBCConnection.java:387)
at com.ibm.as400.access.AS400JDBCConnection.send(AS400JDBCConnection.java:2239)
at com.ibm.as400.access.AS400JDBCStatement.close(AS400JDBCStatement.java:471)
at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.close(DelegatingStatement.java:168)
at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.close(DelegatingStatement.java:168)
at com.hsbc.sv.desarrollo.interconexion.impl.jdbcbasico.ServicioJDBCResultSet.ejecutar(ServicioJDBCResultSet.java:82)
at com.hsbc.sv.desarrollo.interconexion.Servicio.invocar(Servicio.java:150)
at com.hsbc.sv.desarrollo.interconexion.FabricaServicios.operacion(FabricaServicios.java:410)
at com.hsbc.sv.desarrollo.interconexion.FabricaServicios.obtenerDatos(FabricaServicios.java:357)
at com.hsbc.sv.desarrollo.interconexion.remoto.Escuchador.obtenerResultados(Escuchador.java:42)
at com.j2ee.sv.j2entorno.escuchador.servlets.http.OperacionesEscuchador$2.operacion(OperacionesEscuchador.java:61)
at com.j2ee.sv.j2entorno.escuchador.servlets.http.EscuchadorHTTPEntorno.doPost(EscuchadorHTTPEntorno.java:58)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
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.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
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:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
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:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1156)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:626)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:780)
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.hsbc.sv.desarrollo.interconexion.impl.jdbcbasico.ServicioJDBCResultSet.ejecutar(ServicioJDBCResultSet.java:87)
at com.hsbc.sv.desarrollo.interconexion.Servicio.invocar(Servicio.java:150)
at com.hsbc.sv.desarrollo.interconexion.FabricaServicios.operacion(FabricaServicios.java:410)
at com.hsbc.sv.desarrollo.interconexion.FabricaServicios.obtenerDatos(FabricaServicios.java:357)
at com.hsbc.sv.desarrollo.interconexion.remoto.Escuchador.obtenerResultados(Escuchador.java:42)
at com.j2ee.sv.j2entorno.escuchador.servlets.http.OperacionesEscuchador$2.operacion(OperacionesEscuchador.java:61)
at com.j2ee.sv.j2entorno.escuchador.servlets.http.EscuchadorHTTPEntorno.doPost(EscuchadorHTTPEntorno.java:58)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
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.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
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:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
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:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1156)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:626)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:780)

1 个答案:

答案 0 :(得分:1)

感谢您的帮助,只需将validationQuery=”SELECT CURRENT DATE FROM sysibm.sysdummy1”添加到我的context.xml

即可