jfinal 查询报错,大多数是正确的,有少数情况报错

[ERROR]-[Thread: http-nio-80-exec-92]-[com.lsk.util.Syslog.error()]: com.lsk.common.interceptor.ExceptionInterceptor.intercept(18)com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: connection holder is null

at com.jfinal.plugin.activerecord.DbPro.find(DbPro.java:345)

at com.jfinal.plugin.activerecord.DbPro.find(DbPro.java:356)

at com.jfinal.plugin.activerecord.Db.find(Db.java:279)

at com.lsk.util.PageUtil.<init>(PageUtil.java:34)

at com.lsk.admin.shop.ShopServices.gatherService(ShopServices.java:966)

at com.lsk.admin.shop.ShopController.gather(ShopController.java:265)

at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

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

at com.lsk.admin.interceptor.SessionInterceptor.intercept(SessionInterceptor.java:28)

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

at com.lsk.common.interceptor.CacheInterceptor.intercept(CacheInterceptor.java:22)

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

at com.lsk.common.interceptor.ExceptionInterceptor.intercept(ExceptionInterceptor.java:16)

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

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

at com.lsk.handler.DruidStatViewHandlerRewrite.handle(DruidStatViewHandlerRewrite.java:75)

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

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

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

at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)

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

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

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

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

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

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

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

at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:651)

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

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

at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:498)

at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:796)

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1374)

at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

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

at java.lang.Thread.run(Unknown Source)

Caused by: java.sql.SQLException: connection holder is null

at com.alibaba.druid.pool.DruidPooledConnection.checkStateInternal(DruidPooledConnection.java:1140)

at com.alibaba.druid.pool.DruidPooledConnection.checkState(DruidPooledConnection.java:1131)

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

at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.jfinal.plugin.activerecord.SqlReporter.invoke(SqlReporter.java:58)

at com.sun.proxy.$Proxy6.prepareStatement(Unknown Source)

at com.jfinal.plugin.activerecord.DbPro.find(DbPro.java:328)

at com.jfinal.plugin.activerecord.DbPro.find(DbPro.java:343)


评论区

你妹啊

2019-10-21 09:52

很急,求帮助

青峰大辉

2019-10-21 11:58

你这个ID很棒

你妹啊

2019-10-21 14:41

热门反馈

扫码入社