点多了报错

image.png

评论区

2323190

2018-09-12 17:33

意思是 localhost 我刷新七八下 然后 控制台就报错了 必出

2323190

2018-09-12 17:34

JFinal-3.4 action report -------- 2018-09-12 17:34:12 --------------------------
Url : GET /
Controller : com.demo.index.IndexController.(IndexController.java:1)
Method : index
Interceptor : com.demo.GlobalInterceptor.(GlobalInterceptor.java:1)
--------------------------------------------------------------------------------
2018-09-12 17:34:12.115:WARN:oejs.ServletHandler:Error for /
java.lang.IllegalAccessError: class sun.reflect.GeneratedMethodAccessor3 cannot access its superclass sun.reflect.MethodAccessorImpl
at sun.misc.Unsafe.defineClass(Native Method)
at sun.reflect.ClassDefiner.defineClass(Unknown Source)
at sun.reflect.MethodAccessorGenerator$1.run(Unknown Source)
at sun.reflect.MethodAccessorGenerator$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.reflect.MethodAccessorGenerator.generate(Unknown Source)
at sun.reflect.MethodAccessorGenerator.generateMethod(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.jfinal.template.expr.ast.MethodInfo.invoke(MethodInfo.java:48)
at com.jfinal.template.expr.ast.Field.eval(Field.java:83)
at com.jfinal.template.stat.ast.Output.exec(Output.java:49)
at com.jfinal.template.stat.ast.StatList.exec(StatList.java:68)
at com.jfinal.template.stat.ast.For.forIterator(For.java:74)
at com.jfinal.template.stat.ast.For.exec(For.java:53)
at com.jfinal.template.stat.ast.StatList.exec(StatList.java:68)
at com.jfinal.template.stat.ast.Define.call(Define.java:105)
at com.jfinal.template.stat.ast.Call.exec(Call.java:49)
at com.jfinal.template.stat.ast.StatList.exec(StatList.java:68)
at com.jfinal.template.stat.ast.Define.call(Define.java:105)
at com.jfinal.template.stat.ast.Call.exec(Call.java:49)
at com.jfinal.template.stat.ast.StatList.exec(StatList.java:68)
at com.jfinal.template.Template.render(Template.java:59)
at com.jfinal.render.TemplateRender.render(TemplateRender.java:61)
at com.jfinal.core.ActionHandler.handle(ActionHandler.java:103)
at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:73)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:365)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Unknown Source)

2323190

2018-09-12 17:37

刚才测了下 localhost 刷新第7次 必出 然后项目就挂了

JFinal

2018-09-12 17:42

你应该是碰到这个问题了:
http://www.jfinal.com/feedback/2429

这个在即将发布的 jfinal 3.5 中已经解决了,可以通过下面的方式先用上新版本:
git clone git@gitee.com:jfinal/jfinal.git
cd jfinal
mvn insatall

最后将 jfinal 3.4 的版本号改成 3.5-SNAPSHOT,过几天 jfinal 3.5 正式发布后去掉 "SNAPSHOT" 即可完成升级

这个问题是后来出现的部分 eclipse 版本不支持 jfinal 的这个特性,以前一直是没有问题的,经查明是 class loader 的问题

jfinal 3.5 一并将 IDEA 下出现的同样的问题也解决掉了,堪称完美

2323190

2018-09-12 17:51

@JFinal 看了那个问题 发现JFinal.start("src/main/webapp", 80, "/"); 去掉最后一个参数就行了 感谢大佬

2323190

2018-09-12 17:53

我用的是eclipse

fansunion

2018-10-10 22:48

热门反馈

扫码入社