Bug 5685

Summary: Nested query results in java.lang.NullPointerException using JDBC on resin against ORACLE8
Product: Taglibs Reporter: dirk siebert <siebert>
Component: DBTags TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED INVALID    
Severity: critical CC: nagoya
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description dirk siebert 2002-01-04 00:54:56 UTC
Using the DBTags version of Jan. 03rd 2002 I get a 
java.lang.NullPointerException running the dbtags-examples on Resin 2.0.1 
against ORACLE8 using the JDBC driver (Btw: I'm not aware of a valid way to add 
user/password to the Dburl. I had to add additional fields to index.html and 
jdbc.jsp.)
Apparently, null values cause the trouble: If I limit the result set by 'where 
description is not null', the problem does not occur. Alternatively, I can 
disable '<sql:getColumn position="3" to="description"/>' to prevent the crash.
*********
500 Servlet Exception
java.lang.NullPointerException
	at org.apache.taglibs.dbtags.resultset.BaseGetterTag.getColumnNumber
(BaseGetterTag.java:239)
	at org.apache.taglibs.dbtags.resultset.BaseGetterTag.getPosition
(BaseGetterTag.java:111)
	at org.apache.taglibs.dbtags.resultset.GetColumnTag.doStartTag
(GetColumnTag.java:116)
	at _examples._web._jdbc__jsp._jspService(/jakarta-
dbtags/examples/web/jdbc.jsp:177)
	at com.caucho.jsp.JavaPage.service(JavaPage.java:87)
	at com.caucho.jsp.JavaPage.subservice(JavaPage.java:81)
	at com.caucho.jsp.Page.service(Page.java:398)
	at com.caucho.server.http.FilterChainPage.doFilter
(FilterChainPage.java:166)
	at com.caucho.server.http.Invocation.service(Invocation.java:272)
	at com.caucho.server.http.CacheInvocation.service
(CacheInvocation.java:128)
	at com.caucho.server.http.HttpRequest.handleRequest
(HttpRequest.java:216)
	at com.caucho.server.http.HttpRequest.handleConnection
(HttpRequest.java:158)
	at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
	at java.lang.Thread.run(Thread.java:484)
-------------------------------------------------------------------------------
Resin 2.0.1 (built Tue Jul 10 13:13:19 PDT 2001) 
*********

BEWARE: The line number(s above and below) for jdbc.jsp are probably slightly 
misleading - I did some editing to narrow down the cause...

Possibly related: I have to disable '<sql:getNumber colName="id" 
format="CURRENCY" locale="en_GB"/>' in the "British Money joke section" to get 
the page to work at all. Otherwise:
*********
500 Servlet Exception
java.lang.NullPointerException
	at org.apache.taglibs.dbtags.resultset.BaseGetterTag.getColumnNumber
(BaseGetterTag.java:239)
	at org.apache.taglibs.dbtags.resultset.BaseGetterTag.getPosition
(BaseGetterTag.java:111)
	at org.apache.taglibs.dbtags.resultset.GetNumberTag.doStartTag
(GetNumberTag.java:149)
	at _examples._web._jdbc__jsp._jspService(/jakarta-
dbtags/examples/web/jdbc.jsp:207)
	at com.caucho.jsp.JavaPage.service(JavaPage.java:87)
	at com.caucho.jsp.JavaPage.subservice(JavaPage.java:81)
	at com.caucho.jsp.Page.service(Page.java:398)
	at com.caucho.server.http.FilterChainPage.doFilter
(FilterChainPage.java:166)
	at com.caucho.server.http.Invocation.service(Invocation.java:272)
	at com.caucho.server.http.CacheInvocation.service
(CacheInvocation.java:128)
	at com.caucho.server.http.HttpRequest.handleRequest
(HttpRequest.java:216)
	at com.caucho.server.http.HttpRequest.handleConnection
(HttpRequest.java:158)
	at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
	at java.lang.Thread.run(Thread.java:484)
--------------------------------------------------------------------------------
Resin 2.0.1 (built Tue Jul 10 13:13:19 PDT 2001) 
*********

HTH
dirk
Comment 1 Morgan Delagrange 2002-04-15 02:58:41 UTC
Possible duplicate of other Resin bugs
Comment 2 Felipe Leme 2004-02-26 19:52:23 UTC
Hi Dirk,

Is this bug still happenning? If so, could you please provide the JSP code that
caused it?

Otherwise, we will assume it's a Resin bug and then will mark it as INVALID.

Regards,

Felipe
Comment 3 Felipe Leme 2004-02-26 19:53:52 UTC
Adding myself to CC and marking as invalid (we can re-open later, if it persists)