项目运行一段时候之后就会出现数据库连接被关闭的问题,

om.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: Invalid state, the Connection object is closed.

at com.jfinal.plugin.activerecord.Model.find(Model.java:565)

at com.gxkj.backstage.model.LackWork.findAll(LackWork.java:34)

at com.gxkj.backstage.controller.MainIndexController.jqgz(MainIndexController.java:132)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at com.jfinal.aop.Invocation.invoke(Invocation.java:73)

at com.gxkj.core.interceptor.PermissionInterceptor.intercept(PermissionInterceptor.java:61)

at com.jfinal.aop.Invocation.invoke(Invocation.java:67)

at com.gxkj.core.interceptor.SessionInterceptor.intercept(SessionInterceptor.java:43)

at com.jfinal.aop.Invocation.invoke(Invocation.java:67)

at com.gxkj.core.interceptor.LogInterceptor.intercept(LogInterceptor.java:147)

at com.jfinal.aop.Invocation.invoke(Invocation.java:67)

at com.gxkj.core.interceptor.ExceptionInterceptor.intercept(ExceptionInterceptor.java:19)

at com.jfinal.aop.Invocation.invoke(Invocation.java:67)

at com.gxkj.core.interceptor.RequestInterceptor.intercept(RequestInterceptor.java:42)

at com.jfinal.aop.Invocation.invoke(Invocation.java:67)

at com.jfinal.core.ActionHandler.handle(ActionHandler.java:82)

at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)

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:219)

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

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

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

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

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

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

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

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

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

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

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

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

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

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

Caused by: java.sql.SQLException: Invalid state, the Connection object is closed.

at net.sourceforge.jtds.jdbc.ConnectionJDBC2.checkOpen(ConnectionJDBC2.java:1699)

at net.sourceforge.jtds.jdbc.ConnectionJDBC2.getCatalog(ConnectionJDBC2.java:2258)

at com.alibaba.druid.filter.FilterChainImpl.connection_getCatalog(FilterChainImpl.java:294)

at com.alibaba.druid.filter.FilterAdapter.connection_getCatalog(FilterAdapter.java:845)

at com.alibaba.druid.filter.FilterChainImpl.connection_getCatalog(FilterChainImpl.java:291)

at com.alibaba.druid.filter.FilterAdapter.connection_getCatalog(FilterAdapter.java:845)

at com.alibaba.druid.filter.FilterChainImpl.connection_getCatalog(FilterChainImpl.java:291)

at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.getCatalog(ConnectionProxyImpl.java:220)

at com.alibaba.druid.pool.DruidPooledConnection.getCatalog(DruidPooledConnection.java:907)

at com.alibaba.druid.pool.DruidPooledConnection.prepareStatement(DruidPooledConnection.java:336)

at com.jfinal.plugin.activerecord.Model.find(Model.java:544)

at com.jfinal.plugin.activerecord.Model.find(Model.java:563)

... 36 more


评论区

热门反馈

扫码入社