简体   繁体   English

Tomcat 7上的JSP问题:org.apache.jasper.JasperException:无法为JSP编译类

[英]Issue with JSP on Tomcat 7: org.apache.jasper.JasperException: Unable to compile class for JSP

I'm trying to run a JSP project but I'm getting lots of error on build. 我正在尝试运行JSP项目,但是在构建时遇到很多错误。

I'm using JRE version 1.8.0.112 and the Tomcat 7 , here is the error log: 我正在使用JRE version 1.8.0.112Tomcat 7 ,这是错误日志:

Nov 15, 2016 11:15:59 AM org.apache.jasper.compiler.JDTCompiler$1 findType
SEVERE: Compilation error
org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
    at org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.<init>(ClassFileReader.java:372)
    at org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompiler.java:220)
    at org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompiler.java:176)
    at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:103)
    at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:49)
    at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:122)
    at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:168)
    at org.eclipse.jdt.internal.compiler.lookup.Scope.getType(Scope.java:2397)
    at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1005)
    at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1235)
    at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:540)
    at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:759)
    at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:464)
    at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:447)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:374)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:339)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:594)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:344)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:33


SEVERE: 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 filesorg.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at 

It's a known issue with Tomcat 7 + JRE/JDK 8 past update 91, so as a workaround you can: 这是Tomcat 7 + JRE / JDK 8更新91之后的一个已知问题,因此,您可以执行以下解决方法:

  • Try downgrading your JRE/JDK to 7 or 尝试将您的JRE / JDK降级到7
  • Try upgrading your Tomcat to 8 尝试将Tomcat升级到8

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 org.apache.jasper.jasperexception无法为jsp编译类 - org.apache.jasper.jasperexception unable to compile class for jsp org.apache.jasper.JasperException:无法为JSP编译类。 - org.apache.jasper.JasperException: Unable to compile class for JSP. org.apache.jasper.JasperException:无法为JSP编译类: - org.apache.jasper.JasperException: Unable to compile class for JSP: org.apache.jasper.JasperException:无法为 JSP 编译类: - org.apache.jasper.JasperException: Unable to compile class for JSP: org.apache.jasper.JasperException:无法为动态Web项目中的JSP问题编译类 - org.apache.jasper.JasperException: Unable to compile class for JSP issue in dynamic web project Intellij IDEA-org.apache.jasper.JasperException:无法为JSP编译类 - Intellij IDEA - org.apache.jasper.JasperException: Unable to compile class for JSP org.apache.jasper.JasperException:无法为JSP pls helpz编译类 - org.apache.jasper.JasperException: Unable to compile class for JSP pls helpz org.apache.jasper.JasperException:无法为JSP编译类,服务器遇到内部错误() - org.apache.jasper.JasperException: Unable to compile class for JSP , The server encountered an internal error () org.apache.jasper.JasperException:PWC6033:无法为JSP编译类 - org.apache.jasper.JasperException: PWC6033: Unable to compile class for JSP Java错误:org.apache.jasper.JasperException:无法为JSP编译类: - Java error: org.apache.jasper.JasperException: Unable to compile class for JSP:
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM