无法使用JDK1.8.0_92编译JSP文件

时间:2016-05-02 11:50:10

标签: java jsp jboss

我们在JBoss 6.1上运行了一个遗留的JavaEE应用程序。使用Java 1.8.0_92运行JBoss6时,我们收到以下错误。请帮我解决或提供一些关于此错误的提示。

16:49:32,888 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/webSSO].[jsp]] 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) [:6.1.0.Final]
        at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330) [:6.1.0.Final]
        at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:446) [:6.1.0.Final]
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:362) [:6.1.0.Final]
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340) [:6.1.0.Final]
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:327) [:6.1.0.Final]
        at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:607) [:6.1.0.Final]
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312) [:6.1.0.Final]
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326) [:6.1.0.Final]
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) [:6.1.0.Final]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Final]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.1.0.Final]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.1.0.Final]

注意:它可以正常工作(Java 1.8.0_77)

2 个答案:

答案 0 :(得分:1)

正如您所看到的,red hat web site jdk 1.8仅支持jboss 6.3.3及更高版本。

答案 1 :(得分:0)

我使用了最新版本的tomcat,即Tomcat 9,它解决了这个问题。