Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 99976 invoked from network); 5 Nov 2009 19:50:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Nov 2009 19:50:16 -0000 Received: (qmail 41877 invoked by uid 500); 5 Nov 2009 19:50:15 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 41784 invoked by uid 500); 5 Nov 2009 19:50:15 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 41724 invoked by uid 99); 5 Nov 2009 19:50:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Nov 2009 19:50:15 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Nov 2009 19:50:12 +0000 Received: by brutus.apache.org (Postfix, from userid 33) id A1F78234C1EF; Thu, 5 Nov 2009 11:49:52 -0800 (PST) From: bugzilla@apache.org To: dev@tomcat.apache.org Subject: DO NOT REPLY [Bug 47717] createJavacError throws NPE X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Tomcat 6 X-Bugzilla-Component: Jasper X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: funkman@apache.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@tomcat.apache.org X-Bugzilla-Target-Milestone: default X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Message-Id: <20091105194952.A1F78234C1EF@brutus.apache.org> Date: Thu, 5 Nov 2009 11:49:52 -0800 (PST) https://issues.apache.org/bugzilla/show_bug.cgi?id=47717 --- Comment #1 from Tim Funk 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-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org