JBoss hits a NullPointerException in JavacErrorDetail trying to report a JSP compilation exception

Solution Verified - Updated -

Issue

  • JBoss is failing to compile our JSPs, but we aren't able to determine why because JBoss just logs the following NPE instead of a useful exception indicating the original issue causing compilation to fail:
ERROR [STDERR] (http-127.0.0.1-8080-1) java.lang.NullPointerException
    at java.io.Reader.<init>(Reader.java:61)
    at java.io.InputStreamReader.<init>(InputStreamReader.java:55)
    at org.apache.jasper.compiler.JavacErrorDetail.readFile(JavacErrorDetail.java:204)
    at org.apache.jasper.compiler.JavacErrorDetail.<init>(JavacErrorDetail.java:99)
    at org.apache.jasper.compiler.ErrorDispatcher.createJavacError(ErrorDispatcher.java:542)
    at org.apache.jasper.compiler.JDTCompiler$2.acceptResult(JDTCompiler.java:377)
    at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:398)
    at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:429)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:335)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:313)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:300)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585)

Environment

  • JBoss Enterprise Application Platform (EAP)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.