Bug 8512 - Wrong Exception thrown by sql:transaction with a null DataSource
Summary: Wrong Exception thrown by sql:transaction with a null DataSource
Status: RESOLVED INVALID
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: 1.0
Hardware: All All
: P3 major (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-25 13:17 UTC by Lance Andersen
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 Lance Andersen 2002-04-25 13:17:31 UTC
The following code results throws an NPE instead of a JspException:




 <tck:catch var="e" exception= "javax.servlet.jsp.JspException" >
      <sql:transaction dataSource= "${null}" >
         <sql:query var="resultSet" >
            <c:out value="${sqlProps.Select_Jstl_Tab1_By_Id_Query}" />
         </sql:query>
      </sql:transaction>
   </tck:catch>

The output is:
Error: The expected Exception javax.servlet.jsp.JspException was not thrown!
The actual Exception thrown was: class java.lang.NullPointerException