By a process of binary search, I figured out the source of the null exception 
being thrown by the JDBC query beanshell: it was a null value in a database 
field. Java returns a null for this, but apparently you can't add a null to an 
ArrayList. So, my new code for handling the result set is:

while (rs.next()) { 
        List row = new ArrayList(numCols); 
        for (int i = 0; i < numCols; i++) { 
                String str = rs.getString(i + 1); 
                row.add(str == null ? "null" : str); 
        } 
        resultList.add(row); 
} 

Perhaps not the best solution, but workable. 


Kevin Crowston
Syracuse University                                     Phone:  +1 (315) 
464-0272
School of Information Studies                   Fax:    +1 (866) 265-7407
348 Hinds Hall                                          Web:    
http://crowston.syr.edu/
Syracuse, NY   13244-4100   USA                


------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
taverna-users mailing list
[email protected]
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/taverna-mailing-lists/

Reply via email to