title: Issue with JSP on Tomcat 7: org.apache.jasper.JasperException: Unable to compile class for JSP
body: <p>I'm trying to run a <code>JSP</code> project but I'm getting lots of error on build.</p>
  
  <p>I'm using  <code>JRE version 1.8.0.112</code> and the <code>Tomcat 7</code>, here is the error log:</p>
  
  <pre><code>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.&lt;init&gt;(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 
  </code></pre>