我在CentoOS上安装了ApacheTomcat7。
当我进入apache起始页时,我得到错误500:

type Exception report

message Unable to compile class for JSP:

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: [1] in the generated java file: [/usr/share/tomcat/work/Catalina/localhost/_/org/apache/jsp/index_jsp.java]
The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files

Stacktrace:
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:466)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:379)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:341)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:662)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:364)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.65 logs.

我试着重新安装了几次,但这没有帮助。我红色错误500,但用户添加您的页面。我在apache的起始页没有找到关于错误500的任何信息。
这是我第一次和ApacheTomcat在一起。
解决了的:
我安装了java-1.7.0-openjdk-devel并开始工作。
谢谢!

最佳答案

我猜旧的JDK是安装的一部分。
centos版本?

10-06 06:58