0

I am tring to run tomcat 7.0.72 version in a docker container and I am running into the below issue:

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

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.io.ObjectInputStream 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:471)
    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)

I am using Java Version 1.8.0

maraca
  • 8,468
  • 3
  • 23
  • 45

1 Answers1

0

According to some posts i'm seeing on google, it could be you're compiling the code for your servlets or whatever on java 7, but running on java 8

See here and here

Community
  • 1
  • 1
Zachary Craig
  • 2,192
  • 4
  • 23
  • 34
  • java -version openjdk version "1.8.0_111" OpenJDK Runtime Environment (build 1.8.0_111-b15) OpenJDK 64-Bit Server VM (build 25.111-b15, mixed mode) [root@5866b3f83000 lib]# javac -version javac 1.8.0_111 --> it is 1.8 for the java compiler – Paroma Sengupta Dec 14 '16 at 03:47