下的那个 jfinal-3.2_demo_for_maven


报如下的异常 怎么解决啊大佬 。后面 还说什么 Can not create Table object, maybe the table blog is not exists.

不科学啊 明明存在 这个表


[ERROR]-[Thread: main]-[com.alibaba.druid.pool.DruidDataSource.init()]: init datasource error, url: jdbc:mysql://localhost/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 com.demo.common.DemoConfig.main(DemoConfig.java:37)

Can not create Table object, maybe the table blog is not exists.


2017-10-20 17:24:18

[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 com.demo.common.DemoConfig.main(DemoConfig.java:37)

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.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: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-10-20 17:24:18.161: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 com.demo.common.DemoConfig.main(DemoConfig.java:37)

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 com.demo.common.DemoConfig.main(DemoConfig.java:37)

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 com.demo.common.DemoConfig.main(DemoConfig.java:37)

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.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: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 


评论区

JFinal

2017-10-23 10:54

这个问题大家从来没有人碰到过,比较确定只要细心就可以解决问题

王小明

2017-10-23 11:28

@JFinal 嗯,已经解决,原因是 我使用的最新版eclipse 不需要那个参数 5 ,要与IDEA 相同 不然就报错

JFinal

2017-10-23 11:31

@王小明 你的 eclipse 版本太高了吧? eclipse 高版本不知道改动了什么东东,造成了这个问题

蔫老虎

2017-11-05 17:44

找了一个下午,原来是这个原因,可是去掉这个参数就不会自动加载了,我还是先用旧版本的eclipse吧。

JFinal

2017-11-06 15:04

@蔫老虎 果用的 IDEA,JFinal.start(...) 启动的最后一个参数要去掉

如果用的是 eclipse,使用eclipse 4.6 就好了,4.7 也是ok的,4.7.1a不行

10000

2018-01-13 18:26

高版本的eclipse跑的时候报错,JFinal.start()去掉最后一个参数后改报all.sql找不到,路径是WebRoot\classes\all.sql,这个用maven,启动时classes下面什么都没有的@JFinal

10000

2018-01-13 18:28

没去掉最后一个参数时报java.lang.IllegalAccessError: class sun.reflect.GeneratedConstructorAccessor2 cannot access its superclass sun.reflect.ConstructorAccessorImpl,查了下是class.getAnnotation(*****)的时候报的

Sohnny

2018-03-07 14:33

@JFinal 4.7.0 以后的有问题

热门反馈

扫码入社