Bug 25628 - NPE is thrown when jar containing tld file is not found in WEB-INF/lib
Summary: NPE is thrown when jar containing tld file is not found in WEB-INF/lib
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 4
Classification: Unclassified
Component: Jasper 2 (show other bugs)
Version: 4.1.27
Hardware: All All
: P3 critical (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-18 15:43 UTC by saravanan
Modified: 2004-11-16 19:05 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description saravanan 2003-12-18 15:43:51 UTC
Jasper 2's implementation is such that it expects the jar files containing the 
tld files in WEB-INF/lib of a web application. If the jar file containing the 
tld is not present WEB-INF/lib directory, it throws NullPointerException (and 
hence JasperException). Below given is the stacktrace 

C:\DRIVE_E\advent1\jakarta\tomcat4.x\jakarta-tomcat-4.1.27-LE-jdk14>java org.
apache.jasper.JspC -v9 -d . webapps\wcfphase1\sa
ravanan\test.jsp
2003-12-18 09:14:27 - uriRoot implicitly set to "C:
\DRIVE_E\advent1\jakarta\tomcat4.x\jakarta-tomcat-4.1.27-LE-jdk14\webapps\
wcfphase1"
2003-12-18 09:14:28 - ERROR-the file '\saravanan\test.jsp' generated the 
following general exception: java.lang.NullPointerEx
ception
error:org.apache.jasper.JasperException: Error compiling \saravanan\test.jsp
        at org.apache.jasper.JspC.processFile(JspC.java:596)
        at org.apache.jasper.JspC.execute(JspC.java:801)
        at org.apache.jasper.JspC.main(JspC.java:823)

It should give a proper message stating the tld file referred in not found.
Comment 1 Mark Thomas 2004-06-28 20:40:12 UTC
I have tested this with the latest TC4 source and I see the following at the 
start of the stack trace. In my view, this is sufficient.

org.apache.jasper.JasperException: This absolute uri 
(http://www.apache.org/markt/taglib) cannot be resolved in either web.xml or 
the jar files deployed with this application