JSP类未找到异常

时间:2014-09-02 13:47:37

标签: jsp tomcat red5

我正在尝试使用嵌入式tomcat-6.0.24在Red5 0.9.0服务器中运行war文件。

部署WAR文件后,我可以成功访问索引页面。但是当我尝试访问任何其他jsp页面时,系统会抛出错误,如:

  

java.lang.ClassNotFoundException:org.apache.jsp.WEB_002dINF.pages.form.loginMai   n_jsp $助手

我在Work文件夹中搜索过,我可以在以下位置找到该课程:

  

[red5- home] \ work \ red5Engine \ 0.0.0.0 \ myApp \ org \ apache \ jsp \ WEB_002dINF \ pages \ form \ loginMain_jsp $ Helper.class

我无法理解为什么tomcat找不到这个jsp类。请帮忙。

以下是错误的完整堆栈跟踪:

[ERROR] [http-0.0.0.0-5080-1] org.apache.catalina.core.ContainerBase.[red5Engine ].[0.0.0.0].[/myApp].[jsp] - Servlet.service() for servlet jsp threw exception java.lang.ClassNotFoundException: org.apache.jsp.WEB_002dINF.pages.form.loginMai n_jsp$Helper
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366) [na:1.7.0_40]
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355) [na:1.7.0_40]
        at java.security.AccessController.doPrivileged(Native Method) [na:1.7.0_ 40]
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354) [na:1.7.0_ 40]
        at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:13 4) [jasper-6.0.24.jar:na]
        at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66 ) [jasper-6.0.24.jar:na]
        at java.lang.Class.getDeclaredConstructors0(Native Method) [na:1.7.0_40]

        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2483) [na:1 .7.0_40]
        at java.lang.Class.getConstructor0(Class.java:2793) [na:1.7.0_40]
        at java.lang.Class.newInstance(Class.java:345) [na:1.7.0_40]
        at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrap per.java:145) [jasper-6.0.24.jar:na]
        at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspSer vletWrapper.java:480) [jasper-6.0.24.jar:na]
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:338) [jasper-6.0.24.jar:na]
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3 13) [jasper-6.0.24.jar:na]
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) [ja sper-6.0.24.jar:na]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) [javaee- api-5.1.1.jar:5.1.1]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:290) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp atcher.java:646) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applica tionDispatcher.java:436) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD ispatcher.java:374) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDis patcher.java:302) [catalina-6.0.24.jar:na]
        at org.springframework.web.servlet.view.InternalResourceView.renderMerge dOutputModel(InternalResourceView.java:239) [spring-webmvc-3.0.0.RELEASE.jar:3.0 .0.RELEASE]
        at org.springframework.web.servlet.view.AbstractView.render(AbstractView .java:250) [spring-webmvc-3.0.0.RELEASE.jar:3.0.0.RELEASE]
        at org.springframework.web.servlet.DispatcherServlet.render(DispatcherSe rvlet.java:1060) [spring-webmvc-3.0.0.RELEASE.jar:3.0.0.RELEASE]
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(Dispatch erServlet.java:798) [spring-webmvc-3.0.0.RELEASE.jar:3.0.0.RELEASE]
        at org.springframework.web.servlet.DispatcherServlet.doService(Dispatche rServlet.java:716) [spring-webmvc-3.0.0.RELEASE.jar:3.0.0.RELEASE]
        at org.springframework.web.servlet.FrameworkServlet.processRequest(Frame workServlet.java:647) [spring-webmvc-3.0.0.RELEASE.jar:3.0.0.RELEASE]
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServl et.java:552) [spring-webmvc-3.0.0.RELEASE.jar:3.0.0.RELEASE]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) [javaee- api-5.1.1.jar:5.1.1]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) [javaee- api-5.1.1.jar:5.1.1]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:290) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) [catalina-6.0.24.jar:na]
        at org.red5.logging.LoggerContextFilter.doFilter(LoggerContextFilter.jav a:87) [red5.jar:na]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) [catalina-6.0.24.jar:na]
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterIntern al(CharacterEncodingFilter.java:88) [spring-web-3.0.0.jar:3.0.0.RELEASE]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR equestFilter.java:76) [spring-web-3.0.0.jar:3.0.0.RELEASE]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:233) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:191) [catalina-6.0.24.jar:na]
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica torBase.java:465) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:127) [catalina-6.0.24.jar:na]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j ava:102) [catalina-6.0.24.jar:na]
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java: 555) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal ve.java:109) [catalina-6.0.24.jar:na]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav a:298) [catalina-6.0.24.jar:na]
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java :852) [tomcat-coyote-6.0.24.jar:na]
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce ss(Http11Protocol.java:588) [tomcat-coyote-6.0.24.jar:na]
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:48 9) [tomcat-coyote-6.0.24.jar:na]
        at java.lang.Thread.run(Thread.java:724) [na:1.7.0_40] [ERROR] [http-0.0.0.0-5080-1] org.apache.catalina.core.ContainerBase.[red5Engine ].[0.0.0.0].[/myApp].[myApp] - Servlet.service() for servlet myApp threw excepti on java.lang.ClassNotFoundException: org.apache.jsp.WEB_002dINF.pages.form.loginMai n_jsp$Helper
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366) [na:1.7.0_40]
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355) [na:1.7.0_40]
        at java.security.AccessController.doPrivileged(Native Method) [na:1.7.0_ 40]
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354) [na:1.7.0_ 40]
        at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:13 4) [jasper-6.0.24.jar:na]
        at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66 ) [jasper-6.0.24.jar:na]
        at java.lang.Class.getDeclaredConstructors0(Native Method) [na:1.7.0_40]

        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2483) [na:1 .7.0_40]
        at java.lang.Class.getConstructor0(Class.java:2793) [na:1.7.0_40]
        at java.lang.Class.newInstance(Class.java:345) [na:1.7.0_40]
        at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrap per.java:145) [jasper-6.0.24.jar:na]
        at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspSer vletWrapper.java:480) [jasper-6.0.24.jar:na]
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:338) [jasper-6.0.24.jar:na]
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3 13) [jasper-6.0.24.jar:na]
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) [ja sper-6.0.24.jar:na]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) [javaee- api-5.1.1.jar:5.1.1]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:290) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp atcher.java:646) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applica tionDispatcher.java:436) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD ispatcher.java:374) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDis patcher.java:302) [catalina-6.0.24.jar:na]
        at org.springframework.web.servlet.view.InternalResourceView.renderMerge dOutputModel(InternalResourceView.java:239) [spring-webmvc-3.0.0.RELEASE.jar:3.0 .0.RELEASE]
        at org.springframework.web.servlet.view.AbstractView.render(AbstractView .java:250) [spring-webmvc-3.0.0.RELEASE.jar:3.0.0.RELEASE]
        at org.springframework.web.servlet.DispatcherServlet.render(DispatcherSe rvlet.java:1060) [spring-webmvc-3.0.0.RELEASE.jar:3.0.0.RELEASE]
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(Dispatch erServlet.java:798) [spring-webmvc-3.0.0.RELEASE.jar:3.0.0.RELEASE]
        at org.springframework.web.servlet.DispatcherServlet.doService(Dispatche rServlet.java:716) [spring-webmvc-3.0.0.RELEASE.jar:3.0.0.RELEASE]
        at org.springframework.web.servlet.FrameworkServlet.processRequest(Frame workServlet.java:647) [spring-webmvc-3.0.0.RELEASE.jar:3.0.0.RELEASE]
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServl et.java:552) [spring-webmvc-3.0.0.RELEASE.jar:3.0.0.RELEASE]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) [javaee- api-5.1.1.jar:5.1.1]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) [javaee- api-5.1.1.jar:5.1.1]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:290) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) [catalina-6.0.24.jar:na]
        at org.red5.logging.LoggerContextFilter.doFilter(LoggerContextFilter.jav a:87) [red5.jar:na]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) [catalina-6.0.24.jar:na]
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterIntern al(CharacterEncodingFilter.java:88) [spring-web-3.0.0.jar:3.0.0.RELEASE]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR equestFilter.java:76) [spring-web-3.0.0.jar:3.0.0.RELEASE]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:233) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:191) [catalina-6.0.24.jar:na]
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica torBase.java:465) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:127) [catalina-6.0.24.jar:na]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j ava:102) [catalina-6.0.24.jar:na]
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java: 555) [catalina-6.0.24.jar:na]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal ve.java:109) [catalina-6.0.24.jar:na]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav a:298) [catalina-6.0.24.jar:na]
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java :852) [tomcat-coyote-6.0.24.jar:na]
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce ss(Http11Protocol.java:588) [tomcat-coyote-6.0.24.jar:na]
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:48 9) [tomcat-coyote-6.0.24.jar:na]
        at java.lang.Thread.run(Thread.java:724) [na:1.7.0_40]

2 个答案:

答案 0 :(得分:-1)

经过多次尝试后,我找不到确切的解决方案。我怀疑这是因为一些安全问题所以它不允许我的文件在类文件中转换。我在我的工作文件夹中找到了一些.classtmp文件,最后我手动将它们更改为.class并且它有效!虽然这不是一个好的解决方案,但它对我有用。 :)

答案 1 :(得分:-2)

尝试删除$TOMCAT_HOME/work/localhost/catalina和config文件夹中的应用程序文件夹,然后重新启动tomcat。