Bugs item #975500, was opened at 2004-06-18 17:44
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=975500&group_id=22866

Category: JBossCX
Group: v3.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Bob Copeland (bobc)
Assigned to: Nobody/Anonymous (nobody)
Summary: IllegalArgumentException in WrappedResultSet

Initial Comment:
In JBoss 3.2.4 WrappedResult.getResultSet should return
null instead of trying to create a WrappedResultSet and
throwing an IllegalArgumentException when the rs is
null.  It is legal to call stmt.getResultSet() when an
update count is returned and the result set would be
null (obviously the caller who does this checks the
return value).  Here's a snippet:

   String someSql = "update foo set bar=?";
   Statement stmt = conn.prepareStatement(someSql);
   // ... set parameters 
   stmt.execute(); 

   // sometimes someSql is a query; if so do something.
   if ((rs = statement.getResultSet()) != null) 
   { 
       /* do something */ 
   }

produces a stack trace like:

java.lang.IllegalArgumentException: Null result set!
        at
org.jboss.resource.adapter.jdbc.WrappedResultSet.<init>(WrappedResultSet.java:64)
        at
org.jboss.resource.adapter.jdbc.WrappedStatement.registerResultSet(WrappedStatement.java:834)
        at
org.jboss.resource.adapter.jdbc.WrappedStatement.getResultSet(WrappedStatement.java:537)
        at  <our code here>

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=975500&group_id=22866


-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to