Intermittent JSP compile error "JBWEB004001: Unable to compile class for JSP"

Solution In Progress - Updated -

Issue

  • There are thousands JSP files in one WAR and some JSPs got the JSP compile error in intermittently during deployment and it's calling for the first time.
2018-01-08 12:33:56,199 ERROR [io.undertow.request] (default task-2) UT005023: Exception handling request to /a/b/jsp/my.jsp: org.apache.jasper.JasperException: JBWEB004001: Unable to compile class for JSP
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:667)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:358)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:402)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:346)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
...
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ArrayIndexOutOfBoundsException
    at java.lang.System.arraycopy(Native Method)
    at org.eclipse.jdt.internal.compiler.codegen.CodeStream.init(CodeStream.java:4114)
    at org.eclipse.jdt.internal.compiler.codegen.StackMapFrameCodeStream.init(StackMapFrameCodeStream.java:426)
    at org.eclipse.jdt.internal.compiler.codegen.TypeAnnotationCodeStream.init(TypeAnnotationCodeStream.java:149)
    at org.eclipse.jdt.internal.compiler.codegen.CodeStream.reset(CodeStream.java:6665)
    at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.generateCode(AbstractMethodDeclaration.java:311)
    at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.generateCode(AbstractMethodDeclaration.java:270)
    at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:566)
    at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:635)
    at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.generateCode(CompilationUnitDeclaration.java:368)
    at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:781)
    at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:470)
    at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:359)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:321)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:652)
    ... 69 more

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 7.0.x
  • ECJ(Eclipse compiler for Java) 4.4.2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content