DO NOT REPLY [Bug 18967] - NullPointerException instead of error message when running JspC
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=18967. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=18967 NullPointerException instead of error message when running JspC [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Additional Comments From [EMAIL PROTECTED] 2004-06-18 23:44 --- *** This bug has been marked as a duplicate of 20953 *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 18967] - NullPointerException instead of error message when running JspC
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18967. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18967 NullPointerException instead of error message when running JspC --- Additional Comments From [EMAIL PROTECTED] 2003-10-16 01:43 --- Created an attachment (id=8590) Instantiate errDispatcher up front instead of lazily - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 18967] - NullPointerException instead of error message when running JspC
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18967. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18967 NullPointerException instead of error message when running JspC --- Additional Comments From [EMAIL PROTECTED] 2003-10-16 02:07 --- The problem is that Compiler.errDispatcher is null when the Validator encounters the syntax error in the tag. Compiler only instantiates its errDispatcher in Compiler.compile(), even though Compiler.generateJava() also needs errDispatcher. This triggers a NullPointerException, for example, if JspC.processFile() invokes Compiler.generateJava() directly, then the JSP fails to validate. I believe that the best fix would be for Compiler to instantiate errDispatcher in its constructor, instead of instantiating it lazily. Even if lazy instantiation were correctly implemented, it would hardly be worth the trouble -- creating an ErrorDispatcher involves a very simple constructor, and the two objects created have very few members. Here is the graph of references: ++ Compilerv| .errorDispatcher -- ErrorDispatcher | .bundle -- ResourceBundle* | .errHandler -- DefaultErrorHandler | .err + * the ResourceBundle would have been loaded already anyway Given that analysis, I have submitted a patch to ensure that Compiler.errorDispatcher is not null by instantiating it in the constructor. The patch should apply to both Tomcat 4.1.24 and 4.1.27, since Compiler.java did not change between the two versions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 18967] - NullPointerException instead of error message when running JspC
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18967. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18967 NullPointerException instead of error message when running JspC --- Additional Comments From [EMAIL PROTECTED] 2003-09-16 22:11 --- I also have had issues with this bug - it is very difficult to fix a problem without the error message! I fixed it in my copy by modifying the interface to Compiler to pass all the generate phases through the compile() method, which I modified to take a parameter specifying generation type. This is probably not a solution in general due to the public interface change. However, the creation of the ErrorReporter needs to be done so that it is available no matter which method is called. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 18967] - NullPointerException instead of error message when running JspC
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18967. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18967 NullPointerException instead of error message when running JspC --- Additional Comments From [EMAIL PROTECTED] 2003-06-03 17:32 --- This bug is especially serious since it can hide errors that are not reproducible when precompilation is off. For instance, I added a taglib to my project. Without precompilation, I get no errors. When I precompile, I get an NPE with no explanation. After I realized that the taglib was the problem, I added another step to my build process (to pre-pre-compile the tags). However, since some time had passed since I added the tags, it wasn't obvious. In other words, this NPE hides errors that are difficult to fix (the don't precompile workaround isn't always available) and makes precompilation risky from a development standpoint. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]