Bug 8512

Summary: Wrong Exception thrown by sql:transaction with a null DataSource
Product: Taglibs Reporter: Lance Andersen <Lance.Andersen>
Component: Standard TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED INVALID    
Severity: major CC: Ryan.Lubke
Priority: P3    
Version: 1.0   
Target Milestone: ---   
Hardware: All   
OS: All   

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