執行web專案報錯
問題:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: org.apache.jasper.JasperException: Unable to load class for JSP
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:156)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:96)
root cause
org.apache.jasper.JasperException: Unable to load class for JSP
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:620)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:96)
root cause
java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
java.net.URLClassLoader.findClass(URLClassLoader.java:381)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:134)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:618)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:96)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.20 logs.
Apache Tomcat/6.0.20
九月 06, 2020 1:53:36 下午 org.apache.catalina.core.StandardWrapperValve invoke
嚴重: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 1 in the generated java file
The type java.io.ObjectInputStream cannot be resolved. It is indirectly referenced from required .class files
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:748)
九月 06, 2020 1:53:37 下午 org.apache.catalina.core.StandardWrapperValve invoke
嚴重: Servlet.service() for servlet jsp threw exception
java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:134)
at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
at org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:618)
at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:748)
九月 06, 2020 1:53:40 下午 org.apache.catalina.core.ApplicationContext log
資訊: ContextListener: contextInitialized()
九月 06, 2020 1:53:40 下午 org.apache.catalina.core.ApplicationContext log
資訊: SessionListener: contextInitialized()
原因:
tomcat與jdk版本不一致
解決:
tomcat版本問題,之前用的apache-tomcat-6.0.20,jdk用的是1.8,更換為apache-tomcat-7.0.52,可以用了正常執行訪問。
相關文章
- idea執行專案報錯找不到jar包IdeaJAR
- 執行專案報錯Cannot read property 'styles' of undefinedUndefined
- Linux 執行定時任務後,Laravel 專案報錯LinuxLaravel
- maven專案生成的war包在tomcat下執行報錯MavenTomcat
- flutter升級後 執行專案報錯 Warning: Podfile is out of dateFlutter
- 【Net】CEF瀏覽IISExpress執行Web專案ExpressWeb
- 專案報錯
- struts2_專案執行報404
- sqlplus執行sql檔案報錯SQL
- 執行一個專案中間報錯裝包過程記錄
- 執行用例報錯
- ./mongod命令執行報錯Go
- linuxmysql執行報錯LinuxMySql
- 執行srvctl命令報錯
- struts_jdon_hibernate專案執行錯誤
- idea執行java專案main方法報build failure錯誤的解決方法IdeaJavaAIUI
- 初始配置:IntelliJ Android無法執行專案並報錯Error: Module not specifiedIntelliJAndroidError
- react建立專案報錯React
- 專案編譯報錯編譯
- MES專案執行:3個要避免的錯誤
- 執行opatch lsinventory報錯73
- boost asio執行中報錯
- sh指令碼執行報錯指令碼
- pom-建立web專案錯誤Web
- 執行jar檔案生成pdf報錯,Unsupported URL <file:///homeJAR
- idea上執行scala報錯Idea
- mysql執行報錯mysql.sockMySql
- MacOS 裡執行 sed 命令報錯Mac
- PHP編譯,執行make報錯PHP編譯
- Linux sybase執行isql報錯LinuxSQL
- 如何執行vue專案Vue
- 從githup下載別人的vue專案,執行出錯GitVue
- [MDP.BlazorCore] 快速建立跨Web、App執行的BlazorApp專案BlazorWebAPP
- selenium的那些事--執行報錯
- Jenkins中執行docker命令報錯JenkinsDocker
- 執行指令碼diagcollection.pl報錯指令碼GC
- mysql執行命令報segmentation fault 錯誤MySqlSegmentation
- [vue]執行vue --version報錯:-4054 ENOSYSVue