https://issues.apache.org/bugzilla/show_bug.cgi?id=47717

--- Comment #1 from Tim Funk <funk...@apache.org> 2009-11-05 11:49:49 UTC ---
I believe the NPE is this:
        page.visit(errVisitor);

Which is caused by
                JavacErrorDetail detail = ErrorDispatcher.createJavacError(
                        jspFrame.getMethodName(),
                        this.ctxt.getCompiler().getPageNodes(),
                        null,
                        javaLineNumber,
                        ctxt);

So one wonders ... why is this.ctxt.getCompiler().getPageNodes() null?

It could be that compilation is done in 2 passes. And the first pass is
validation. So if this fails - then getPageNodes would be null.

So the easy fix may be this (not sure if its the right fix)...

Index: java/org/apache/jasper/compiler/ErrorDispatcher.java
===================================================================
--- java/org/apache/jasper/compiler/ErrorDispatcher.java        (revision
833114)
+++ java/org/apache/jasper/compiler/ErrorDispatcher.java        (working copy)
@@ -524,7 +524,8 @@
         JavacErrorDetail javacError;
         // Attempt to map javac error line number to line in JSP page
         ErrorVisitor errVisitor = new ErrorVisitor(lineNum);
-        page.visit(errVisitor);
+        if (page!=null)
+            page.visit(errVisitor);
         Node errNode = errVisitor.getJspSourceNode();
         if ((errNode != null) && (errNode.getStart() != null)) {
             // If this is a scriplet node then there is a one to one mapping

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to