物竞天择 适者生存

我们不是代码的搬运工,我们只生产代码

JFinal 入门踩坑

使用final3.0之后,使用DemoConfig中的main方法启动项目时,出现如下错误:

[ERROR]-[Thread: main]-[com.alibaba.druid.pool.DruidDataSource.init()]: init datasource error, url: jdbc:mysql://127.0.0.1:3306/jfinal_demo?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull

java.sql.SQLException: java.lang.IllegalAccessError: class sun.reflect.GeneratedConstructorAccessor2 cannot access its superclass sun.reflect.ConstructorAccessorImpl

eclipse 开发jfinal

使用eclipse 开发jfinal

构建工具maven

下载官方demo 3.2

运行

报错信息

Starting JFinal 3.2
Starting scanner at interval of 5 seconds.
Starting web server on port: 8080

2017-11-12 22:13:42
[ERROR]-[Thread: main]-[com.alibaba.druid.pool.DruidDataSource.init()]: init datasource error, url: jdbc:mysql://127.0.0.1:3306/jfinal_demo?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull
java.sql.SQLException: java.lang.IllegalAccessError: class sun.reflect.GeneratedConstructorAccessor2 cannot access its superclass sun.reflect.ConstructorAccessorImpl
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:435)
	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:389)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
	at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1461)
	at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1525)
	at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:734)
	at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1060)
	at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1056)
	at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:104)
	at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:43)
	at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:226)
	at com.jfinal.core.Config.startPlugins(Config.java:107)
	at com.jfinal.core.Config.configJFinal(Config.java:53)
	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:157)
	at demo.common.DemoConfig.main(DemoConfig.java:38)
Can not create Table object, maybe the table blog is not exists.

2017-11-12 22:13:42
[ERROR]-[Thread: main]-[com.jfinal.core.Config.startPlugins()]: Plugin start error: com.jfinal.plugin.activerecord.ActiveRecordPlugin. 
java.sql.SQLException: Error
com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: Error
	at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:55)
	at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:226)
	at com.jfinal.core.Config.startPlugins(Config.java:107)
	at com.jfinal.core.Config.configJFinal(Config.java:53)
	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:157)
	at demo.common.DemoConfig.main(DemoConfig.java:38)
Caused by: java.sql.SQLException: Error
	at com.alibaba.druid.pool.DruidDataSource.handleConnectionException(DruidDataSource.java:1330)
	at com.alibaba.druid.pool.DruidPooledConnection.handleException(DruidPooledConnection.java:136)
	at com.alibaba.druid.pool.DruidPooledStatement.checkException(DruidPooledStatement.java:65)
	at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:151)
	at com.jfinal.plugin.activerecord.TableBuilder.doBuild(TableBuilder.java:71)
	at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:47)
	... 20 more
Caused by: java.lang.IllegalAccessError: class sun.reflect.GeneratedConstructorAccessor3 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.MethodAccessorGenerator1.run(MethodAccessorGenerator.java:399)  	at sun.reflect.MethodAccessorGenerator1.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:423)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
	at com.mysql.jdbc.ResultSetImpl.getInstance(ResultSetImpl.java:383)
	at com.mysql.jdbc.MysqlIO.buildResultSetWithRows(MysqlIO.java:3140)
	at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:491)
	at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3118)
	at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2288)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2709)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2677)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2627)
	at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1556)
	at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:140)
	... 22 more
2017-11-12 22:13:42.289:WARN:oejuc.AbstractLifeCycle:FAILED jfinal: java.lang.RuntimeException: 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:116)
	at com.jfinal.core.Config.configJFinal(Config.java:53)
	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:157)
	at demo.common.DemoConfig.main(DemoConfig.java:38)
Caused by: 
com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: Error
	at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:55)
	at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:226)
	at com.jfinal.core.Config.startPlugins(Config.java:107)
	at com.jfinal.core.Config.configJFinal(Config.java:53)
	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:157)
	at demo.common.DemoConfig.main(DemoConfig.java:38)
Caused by: 
java.sql.SQLException: Error
	at com.alibaba.druid.pool.DruidDataSource.handleConnectionException(DruidDataSource.java:1330)
	at com.alibaba.druid.pool.DruidPooledConnection.handleException(DruidPooledConnection.java:136)
	at com.alibaba.druid.pool.DruidPooledStatement.checkException(DruidPooledStatement.java:65)
	at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:151)
	at com.jfinal.plugin.activerecord.TableBuilder.doBuild(TableBuilder.java:71)
	at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:47)
	at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:226)
	at com.jfinal.core.Config.startPlugins(Config.java:107)
	at com.jfinal.core.Config.configJFinal(Config.java:53)
	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:157)
	at demo.common.DemoConfig.main(DemoConfig.java:38)
Caused by: 
java.lang.IllegalAccessError: class sun.reflect.GeneratedConstructorAccessor3 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.MethodAccessorGenerator1.run(MethodAccessorGenerator.java:399)  	at sun.reflect.MethodAccessorGenerator1.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:423)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
	at com.mysql.jdbc.ResultSetImpl.getInstance(ResultSetImpl.java:383)
	at com.mysql.jdbc.MysqlIO.buildResultSetWithRows(MysqlIO.java:3140)
	at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:491)
	at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3118)
	at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2288)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2709)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2677)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2627)
	at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1556)
	at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:140)
	at com.jfinal.plugin.activerecord.TableBuilder.doBuild(TableBuilder.java:71)
	at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:47)
	at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:226)
	at com.jfinal.core.Config.startPlugins(Config.java:107)
	at com.jfinal.core.Config.configJFinal(Config.java:53)
	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:157)
	at demo.common.DemoConfig.main(DemoConfig.java:38)
2017-11-12 22:13:42.290:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/,file:/Users/admxj/Desktop/eclipse-workspace/JFinalDemo/src/main/webapp/}
java.lang.RuntimeException: Plugin start error: com.jfinal.plugin.activerecord.ActiveRecordPlugin. |java.sql.SQLException: Error
	at com.jfinal.core.Config.startPlugins(Config.java:116)
	at com.jfinal.core.Config.configJFinal(Config.java:53)
	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:157)
	at demo.common.DemoConfig.main(DemoConfig.java:38)
Caused by: 
com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: Error
	at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:55)
	at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:226)
	at com.jfinal.core.Config.startPlugins(Config.java:107)
	at com.jfinal.core.Config.configJFinal(Config.java:53)
	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:157)
	at demo.common.DemoConfig.main(DemoConfig.java:38)
Caused by: 
java.sql.SQLException: Error
	at com.alibaba.druid.pool.DruidDataSource.handleConnectionException(DruidDataSource.java:1330)
	at com.alibaba.druid.pool.DruidPooledConnection.handleException(DruidPooledConnection.java:136)
	at com.alibaba.druid.pool.DruidPooledStatement.checkException(DruidPooledStatement.java:65)
	at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:151)
	at com.jfinal.plugin.activerecord.TableBuilder.doBuild(TableBuilder.java:71)
	at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:47)
	at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:226)
	at com.jfinal.core.Config.startPlugins(Config.java:107)
	at com.jfinal.core.Config.configJFinal(Config.java:53)
	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:157)
	at demo.common.DemoConfig.main(DemoConfig.java:38)
Caused by: 
java.lang.IllegalAccessError: class sun.reflect.GeneratedConstructorAccessor3 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.MethodAccessorGenerator1.run(MethodAccessorGenerator.java:399)  	at sun.reflect.MethodAccessorGenerator1.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:423)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
	at com.mysql.jdbc.ResultSetImpl.getInstance(ResultSetImpl.java:383)
	at com.mysql.jdbc.MysqlIO.buildResultSetWithRows(MysqlIO.java:3140)
	at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:491)
	at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3118)
	at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2288)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2709)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2677)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2627)
	at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1556)
	at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:140)
	at com.jfinal.plugin.activerecord.TableBuilder.doBuild(TableBuilder.java:71)
	at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:47)
	at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:226)
	at com.jfinal.core.Config.startPlugins(Config.java:107)
	at com.jfinal.core.Config.configJFinal(Config.java:53)
	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:157)
	at demo.common.DemoConfig.main(DemoConfig.java:38)
2017-11-12 22:13:42.291:WARN:oejuc.AbstractLifeCycle:FAILED o.e.j.w.WebAppContext{/,file:/Users/admxj/Desktop/eclipse-workspace/JFinalDemo/src/main/webapp/}: java.lang.RuntimeException: 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:116)
	at com.jfinal.core.Config.configJFinal(Config.java:53)
	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:157)
	at demo.common.DemoConfig.main(DemoConfig.java:38)
Caused by: 
com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: Error
	at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:55)
	at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:226)
	at com.jfinal.core.Config.startPlugins(Config.java:107)
	at com.jfinal.core.Config.configJFinal(Config.java:53)
	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:157)
	at demo.common.DemoConfig.main(DemoConfig.java:38)
Caused by: 
java.sql.SQLException: Error
	at com.alibaba.druid.pool.DruidDataSource.handleConnectionException(DruidDataSource.java:1330)
	at com.alibaba.druid.pool.DruidPooledConnection.handleException(DruidPooledConnection.java:136)
	at com.alibaba.druid.pool.DruidPooledStatement.checkException(DruidPooledStatement.java:65)
	at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:151)
	at com.jfinal.plugin.activerecord.TableBuilder.doBuild(TableBuilder.java:71)
	at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:47)
	at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:226)
	at com.jfinal.core.Config.startPlugins(Config.java:107)
	at com.jfinal.core.Config.configJFinal(Config.java:53)
	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:157)
	at demo.common.DemoConfig.main(DemoConfig.java:38)
Caused by: 
java.lang.IllegalAccessError: class sun.reflect.GeneratedConstructorAccessor3 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.MethodAccessorGenerator1.run(MethodAccessorGenerator.java:399)  	at sun.reflect.MethodAccessorGenerator1.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:423)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
	at com.mysql.jdbc.ResultSetImpl.getInstance(ResultSetImpl.java:383)
	at com.mysql.jdbc.MysqlIO.buildResultSetWithRows(MysqlIO.java:3140)
	at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:491)
	at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3118)
	at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2288)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2709)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2677)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2627)
	at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1556)
	at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:140)
	at com.jfinal.plugin.activerecord.TableBuilder.doBuild(TableBuilder.java:71)
	at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:47)
	at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:226)
	at com.jfinal.core.Config.startPlugins(Config.java:107)
	at com.jfinal.core.Config.configJFinal(Config.java:53)
	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:157)
	at demo.common.DemoConfig.main(DemoConfig.java:38)
2017-11-12 22:13:42.291:WARN:oejuc.AbstractLifeCycle:FAILED org.eclipse.jetty.server.Server@223f3642: java.lang.RuntimeException: 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:116)
	at com.jfinal.core.Config.configJFinal(Config.java:53)
	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:157)
	at demo.common.DemoConfig.main(DemoConfig.java:38)
Caused by: 
com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: Error
	at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:55)
	at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:226)
	at com.jfinal.core.Config.startPlugins(Config.java:107)
	at com.jfinal.core.Config.configJFinal(Config.java:53)
	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:157)
	at demo.common.DemoConfig.main(DemoConfig.java:38)
Caused by: 
java.sql.SQLException: Error
	at com.alibaba.druid.pool.DruidDataSource.handleConnectionException(DruidDataSource.java:1330)
	at com.alibaba.druid.pool.DruidPooledConnection.handleException(DruidPooledConnection.java:136)
	at com.alibaba.druid.pool.DruidPooledStatement.checkException(DruidPooledStatement.java:65)
	at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:151)
	at com.jfinal.plugin.activerecord.TableBuilder.doBuild(TableBuilder.java:71)
	at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:47)
	at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:226)
	at com.jfinal.core.Config.startPlugins(Config.java:107)
	at com.jfinal.core.Config.configJFinal(Config.java:53)
	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:157)
	at demo.common.DemoConfig.main(DemoConfig.java:38)
Caused by: 
java.lang.IllegalAccessError: class sun.reflect.GeneratedConstructorAccessor3 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.MethodAccessorGenerator1.run(MethodAccessorGenerator.java:399)  	at sun.reflect.MethodAccessorGenerator1.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:423)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
	at com.mysql.jdbc.ResultSetImpl.getInstance(ResultSetImpl.java:383)
	at com.mysql.jdbc.MysqlIO.buildResultSetWithRows(MysqlIO.java:3140)
	at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:491)
	at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3118)
	at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2288)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2709)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2677)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2627)
	at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1556)
	at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:140)
	at com.jfinal.plugin.activerecord.TableBuilder.doBuild(TableBuilder.java:71)
	at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:47)
	at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:226)
	at com.jfinal.core.Config.startPlugins(Config.java:107)
	at com.jfinal.core.Config.configJFinal(Config.java:53)
	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:157)
	at demo.common.DemoConfig.main(DemoConfig.java:38)

2017-11-12 22:13:42
[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:116)
	at com.jfinal.core.Config.configJFinal(Config.java:53)
	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:157)
	at demo.common.DemoConfig.main(DemoConfig.java:38)
Caused by: com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: Error
	at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:55)
	at com.jfinal.plugin.activerecord.ActiveRecordPlugin.start(ActiveRecordPlugin.java:226)
	at com.jfinal.core.Config.startPlugins(Config.java:107)
	... 18 more
Caused by: java.sql.SQLException: Error
	at com.alibaba.druid.pool.DruidDataSource.handleConnectionException(DruidDataSource.java:1330)
	at com.alibaba.druid.pool.DruidPooledConnection.handleException(DruidPooledConnection.java:136)
	at com.alibaba.druid.pool.DruidPooledStatement.checkException(DruidPooledStatement.java:65)
	at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:151)
	at com.jfinal.plugin.activerecord.TableBuilder.doBuild(TableBuilder.java:71)
	at com.jfinal.plugin.activerecord.TableBuilder.build(TableBuilder.java:47)
	... 20 more
Caused by: java.lang.IllegalAccessError: class sun.reflect.GeneratedConstructorAccessor3 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.MethodAccessorGenerator1.run(MethodAccessorGenerator.java:399)  	at sun.reflect.MethodAccessorGenerator1.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:423)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
	at com.mysql.jdbc.ResultSetImpl.getInstance(ResultSetImpl.java:383)
	at com.mysql.jdbc.MysqlIO.buildResultSetWithRows(MysqlIO.java:3140)
	at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:491)
	at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3118)
	at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2288)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2709)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2677)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2627)
	at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1556)
	at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:140)
	... 22 more

 

问题原因

由于项目采用maven构建,依然需要去除最后一个参数

运行成功

点赞

发表评论

电子邮件地址不会被公开。 必填项已用*标注