用jetty server ,修改代码,有时候就报错:Exception in thread "JFinal-Scanner" java.lang.OutOfMemoryError: PermGen space 这是什么错误?
每次报这个错误,程序就死了,都要重启eclipse。本以为用了jetty server不用重启tomcat了是一件很开心的事情,但是现在tomcat不用重启了,改成重启eclipse了,o(╯□╰)o……
以下是详细的报错信息:
2016-09-26 10:46:55.720:WARN:oejuc.AbstractLifeCycle:FAILED jfinal: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:653) at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:460) at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286) at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222) at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69) at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52) at java.lang.reflect.Method.declaredAnnotations(Method.java:695) at java.lang.reflect.Method.getAnnotation(Method.java:679) at com.jfinal.aop.InterceptorManager.doBuild(InterceptorManager.java:83) at com.jfinal.aop.InterceptorManager.buildControllerActionInterceptor(InterceptorManager.java:75) at com.jfinal.core.ActionMapping.buildActionMapping(ActionMapping.java:78) at com.jfinal.core.JFinal.initActionMapping(JFinal.java:100) at com.jfinal.core.JFinal.init(JFinal.java:65) 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 com.jfinal.server.JettyServer$1.onChange(JettyServer.java:108) at com.jfinal.server.Scanner.compare(Scanner.java:88) at com.jfinal.server.Scanner.working(Scanner.java:57) at com.jfinal.server.Scanner.access$0(Scanner.java:55) at com.jfinal.server.Scanner$1.run(Scanner.java:94) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) 2016-09-26 10:46:55.736:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/,file:/C:/Users/admin/Workspaces/MyEclipse%208.5/fuelCard/WebRoot/} java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:653) at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:460) at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286) at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222) at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69) at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52) at java.lang.reflect.Method.declaredAnnotations(Method.java:695) at java.lang.reflect.Method.getAnnotation(Method.java:679) at com.jfinal.aop.InterceptorManager.doBuild(InterceptorManager.java:83) at com.jfinal.aop.InterceptorManager.buildControllerActionInterceptor(InterceptorManager.java:75) at com.jfinal.core.ActionMapping.buildActionMapping(ActionMapping.java:78) at com.jfinal.core.JFinal.initActionMapping(JFinal.java:100) at com.jfinal.core.JFinal.init(JFinal.java:65) 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 com.jfinal.server.JettyServer$1.onChange(JettyServer.java:108) at com.jfinal.server.Scanner.compare(Scanner.java:88) at com.jfinal.server.Scanner.working(Scanner.java:57) at com.jfinal.server.Scanner.access$0(Scanner.java:55) at com.jfinal.server.Scanner$1.run(Scanner.java:94) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) 2016-09-26 10:46:55.752:WARN:oejuc.AbstractLifeCycle:FAILED o.e.j.w.WebAppContext{/,file:/C:/Users/admin/Workspaces/MyEclipse%208.5/fuelCard/WebRoot/}: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:653) at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:460) at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286) at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222) at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69) at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52) at java.lang.reflect.Method.declaredAnnotations(Method.java:695) at java.lang.reflect.Method.getAnnotation(Method.java:679) at com.jfinal.aop.InterceptorManager.doBuild(InterceptorManager.java:83) at com.jfinal.aop.InterceptorManager.buildControllerActionInterceptor(InterceptorManager.java:75) at com.jfinal.core.ActionMapping.buildActionMapping(ActionMapping.java:78) at com.jfinal.core.JFinal.initActionMapping(JFinal.java:100) at com.jfinal.core.JFinal.init(JFinal.java:65) 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 com.jfinal.server.JettyServer$1.onChange(JettyServer.java:108) at com.jfinal.server.Scanner.compare(Scanner.java:88) at com.jfinal.server.Scanner.working(Scanner.java:57) at com.jfinal.server.Scanner.access$0(Scanner.java:55) at com.jfinal.server.Scanner$1.run(Scanner.java:94) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) Error reconfiguring/restarting webapp after change in watched files 2016-09-26 10:46:55 [ERROR]-[Thread: JFinal-Scanner]-[com.jfinal.kit.LogKit.error()]: sun.reflect.annotation.TypeNotPresentExceptionProxy java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:653) at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:460) at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286) at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222) at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69) at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52) at java.lang.reflect.Method.declaredAnnotations(Method.java:695) at java.lang.reflect.Method.getAnnotation(Method.java:679) at com.jfinal.aop.InterceptorManager.doBuild(InterceptorManager.java:83) at com.jfinal.aop.InterceptorManager.buildControllerActionInterceptor(InterceptorManager.java:75) at com.jfinal.core.ActionMapping.buildActionMapping(ActionMapping.java:78) at com.jfinal.core.JFinal.initActionMapping(JFinal.java:100) at com.jfinal.core.JFinal.init(JFinal.java:65) 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 com.jfinal.server.JettyServer$1.onChange(JettyServer.java:108) at com.jfinal.server.Scanner.compare(Scanner.java:88) at com.jfinal.server.Scanner.working(Scanner.java:57) at com.jfinal.server.Scanner.access$0(Scanner.java:55) at com.jfinal.server.Scanner$1.run(Scanner.java:94) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) Loading changes ...... Exception in thread "JFinal-Scanner" java.lang.OutOfMemoryError: PermGen space Exception in thread "qtp194160712-20" java.lang.OutOfMemoryError: PermGen space Exception in thread "qtp194160712-203" java.lang.OutOfMemoryError: PermGen space
另一个办法是用一下 jdk 8,该版本取消了 PermGen 内存区域