新版Eclipse Oxygen .1和.2都无法正常启动JFinal,什么问题?

Oxygen R是没有问题的,但是.1和.2都提示启动失败,因为druid创建logger失败,这是为什么?

Caused by: java.lang.RuntimeException: Error creating logger for logger 'com.alibaba.druid.pool.DruidPooledStatement'.  Cause: java.lang.IllegalAccessError: class sun.reflect.GeneratedConstructorAccessor4 cannot access its superclass sun.reflect.ConstructorAccessorImpl
	at com.alibaba.druid.support.logging.LogFactory.getLog(LogFactory.java:95)
	at com.alibaba.druid.support.logging.LogFactory.getLog(LogFactory.java:88)
	at com.alibaba.druid.pool.DruidPooledStatement.<clinit>(DruidPooledStatement.java:30)
	... 23 more
Caused by: java.lang.IllegalAccessError: class sun.reflect.GeneratedConstructorAccessor4 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.alibaba.druid.support.logging.LogFactory.getLog(LogFactory.java:93)
	... 25 more
Exception in thread "main" java.lang.ExceptionInInitializerError
	at com.alibaba.druid.pool.DruidPooledConnection.createStatement(DruidPooledConnection.java:644)
	at com.jfinal.plugin.activerecord.TableBuilder.doBuild(TableBuilder.java:70)
	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:51)
	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:133)
	at com.jfinal.server.JettyServer.start(JettyServer.java:70)
	at com.jfinal.core.JFinal.start(JFinal.java:162)
	at common.AppConfig.main(AppConfig.java:136)
Caused by: java.lang.RuntimeException: Error creating logger for logger 'com.alibaba.druid.pool.DruidPooledStatement'.  Cause: java.lang.IllegalAccessError: class sun.reflect.GeneratedConstructorAccessor4 cannot access its superclass sun.reflect.ConstructorAccessorImpl
	at com.alibaba.druid.support.logging.LogFactory.getLog(LogFactory.java:95)
	at com.alibaba.druid.support.logging.LogFactory.getLog(LogFactory.java:88)
	at com.alibaba.druid.pool.DruidPooledStatement.<clinit>(DruidPooledStatement.java:30)
	... 23 more
Caused by: java.lang.IllegalAccessError: class sun.reflect.GeneratedConstructorAccessor4 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.alibaba.druid.support.logging.LogFactory.getLog(LogFactory.java:93)
	... 25 more

Jetty启动,求大神指点。有新版用不上,心里痒痒的。。。

评论区

JFinal

2017-12-21 12:28

eclipse 的部分版本不支持,这个我现在也不知道原因,这里是一个更多相关信息量的贴子:
http://www.jfinal.com/feedback/2429

100520043

2018-04-20 09:59

@JFinal 除了换版本有其他解决方案吗?

JFinal

2018-04-20 10:52

@100520043 jfinal 启动代码很多年没怎么变过,一直好用的,这个 eclipse 版本有问题,暂时不知道原因,还没有时间找原因,暂时只能换版本,其实用 eclipse mars 2 足够了,eclipse 后来的版本加了很多没用的东西,体积越来越大

热门反馈

扫码入社