2.3的版本数据库连接池泄露的感觉啊

[ERROR]-[Thread: main]-[com.jfinal.kit.LogKit.error()]: Plugin start error: com.jfinal.plugin.activerecord.ActiveRecordPlugin. 
java.sql.SQLException: Error
java.lang.RuntimeException: Plugin start error: com.jfinal.plugin.activerecord.ActiveRecordPlugin. 
java.sql.SQLException: Error
   at com.jfinal.core.Config.startPlugins(Config.java:93)
   at com.jfinal.core.Config.configJFinal(Config.java:45)
   at com.jfinal.core.JFinal.init(JFinal.java:63)
   at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)
   at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)
   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
   at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:724)
   at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
   at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
   at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706)
   at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
   at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
   at org.eclipse.jetty.server.Server.doStart(Server.java:277)
   at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
   at com.jfinal.server.JettyServer.doStart(JettyServer.java:131)
   at com.jfinal.server.JettyServer.start(JettyServer.java:70)
   at com.jfinal.core.JFinal.start(JFinal.java:155)
   at com.lauway.vigo.weixin.config.AppConfig.main(AppConfig.java:32)
Caused by: com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: Error
   at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:54)
   at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:226)
   at com.jfinal.core.Config.startPlugins(Config.java:84)
   ... 18 more
Caused by: java.sql.SQLException: Error
   at com.alibaba.druid.pool.DruidDataSource.handleConnectionException(DruidDataSource.java:1246)
   at com.alibaba.druid.pool.DruidPooledConnection.handleException(DruidPooledConnection.java:132)
   at com.alibaba.druid.pool.DruidPooledStatement.checkException(DruidPooledStatement.java:68)
   at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:154)
   at com.jfinal.plugin.activerecord.TableBuilder.doBuild(TableBuilder.java:70)
   at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:46)
   ... 20 more
Caused by: java.lang.IllegalAccessError: class sun.reflect.GeneratedConstructorAccessor16 cannot access its superclass sun.reflect.ConstructorAccessorImpl
   at sun.misc.Unsafe.defineClass(Native Method)
   at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:63)
   at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:399)
   at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:394)
   at java.security.AccessController.doPrivileged(Native Method)
   at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:393)
   at sun.reflect.MethodAccessorGenerator.generateConstructor(MethodAccessorGenerator.java:92)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:55)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
   at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
   at com.mysql.jdbc.ResultSetImpl.getInstance(ResultSetImpl.java:342)
   at com.mysql.jdbc.MysqlIO.buildResultSetWithRows(MysqlIO.java:3057)
   at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:469)
   at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3040)
   at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2288)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2681)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2547)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2505)
   at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1370)
   at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:143)
   ... 22 more



2016-09-25T11:35:12.557813Z 86 [Note] Aborted connection 86 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:35:12.558744Z 84 [Note] Aborted connection 84 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:35:12.558858Z 83 [Note] Aborted connection 83 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:35:12.558175Z 85 [Note] Aborted connection 85 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:35:12.560421Z 88 [Note] Aborted connection 88 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:35:12.561011Z 87 [Note] Aborted connection 87 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:36:18.402505Z 97 [Note] Aborted connection 97 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:36:18.403835Z 96 [Note] Aborted connection 96 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:36:18.403935Z 95 [Note] Aborted connection 95 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:36:18.404001Z 94 [Note] Aborted connection 94 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:36:18.404074Z 93 [Note] Aborted connection 93 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:36:18.404152Z 92 [Note] Aborted connection 92 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:36:18.404219Z 91 [Note] Aborted connection 91 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:36:18.404298Z 90 [Note] Aborted connection 90 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:36:18.404365Z 89 [Note] Aborted connection 89 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:36:18.419999Z 98 [Note] Aborted connection 98 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:37:51.608708Z 107 [Note] Aborted connection 107 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:37:51.609082Z 106 [Note] Aborted connection 106 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:37:51.609096Z 105 [Note] Aborted connection 105 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:37:51.609107Z 104 [Note] Aborted connection 104 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:37:51.609118Z 103 [Note] Aborted connection 103 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:37:51.609129Z 102 [Note] Aborted connection 102 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:37:51.609139Z 101 [Note] Aborted connection 101 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:37:51.609150Z 100 [Note] Aborted connection 100 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:37:51.609161Z 99 [Note] Aborted connection 99 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)

2016-09-25T11:37:51.615185Z 108 [Note] Aborted connection 108 to db: 'vigo' user: 'root' host: '192.168.99.1' (Got an error reading communication packets)




评论区

JFinal

2016-09-25 20:04

jfinal 2.3 还没出来呢,这个异常是怎么引发的?

Shylock

2016-09-25 21:47

@JFinal 2.3-SNAPSHOT/2.2 都有.

JFinal

2016-09-26 10:08

@Shylock 前面的异常表明是jdk的 classloader 在 define 方法时没法调用构造方法,后面的异常表明从数据库连接读到的数据不正确,数据库是否升级到了5.7? 这个版本有些坑

此外,jfinal 2.2 发布快一年了,很稳定,2.3-SNAPSHOT 只是改了很少的几处代码出问题的可能性很小

Shylock

2016-10-04 21:44

@JFinal jrebel + jfinal main方法调用 jetty 导致的.直接用maven 自带的jetty 插件 reload 不会出问题.

热门反馈

扫码入社