每次我在TomCat上运行Web应用程序时,都会给我一个错误。.jsp文件没有任何问题,只是我必须重新启动服务器,有时还要重新启动完整的IDE,此错误才能消失。
错误如下
2014年3月12日,下午5:57:01 org.apache.catalina.core.StandardWrapperValve在路径[/ Assignment_1_Flight_Reservation_System]的上下文中为Servlet [jsp]调用SEVERE:Servlet.service()引发异常[无法为JSP编译类]根本原因java.io.IOException:tmpFile.renameTo(classFile)在org.apache.jasper.compiler.SmapUtil.installSmap(org.apache.jasper.compiler.SmapUtil $ SDEInstaller.install(SmapUtil.java:204)处失败org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:483)的smapUtil.java:163)org.apache.jasper的org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)的org.apache.jasper.com的.compiler.Compiler.compile(Compiler.java:353).org.apache.jasper.com的.compiler.Compiler.compile(Compiler.java:340).JspCompilationContext.compile(JspCompilationContext.java:646)位于org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)位于org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)位于org.apache.jasper.servlet.JspServlet org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)的javax.servlet.http.HttpServlet.service(HttpServlet.java:728)的.service(JspServlet.java:334)位于org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)的catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)位于org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(位于org.apache.catalina.core的ApplicationFilterChain.java:243)。位于org.apache.catalina.core的ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)。org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)的org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)的StandardWrapperValve.invoke(StandardWrapperValve.java:222) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)上的.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve .java:953)位于org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)位于org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)位于org.apache.coyote。 org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler上的http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)。Java的org.apache.tomcat.util.net.JIoEndpoint $ SocketProcessor.run(JIoEndpoint.java:312)处的进程(AbstractProtocol.java:589)java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) .util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:615)在java.lang.Thread.run(Thread.java:744)
清理Tomcar工作目录$ TOMCAT / work以查看是否解决了该问题,并检查工作目录结构的权限