commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tiago Cavaleiro (Created) (JIRA)" <>
Subject [jira] [Created] (DBUTILS-84) BeanProcessor method processColumn should take SQLXML in consideration
Date Fri, 11 Nov 2011 15:06:51 GMT
BeanProcessor method processColumn should take SQLXML in consideration

                 Key: DBUTILS-84
             Project: Commons DbUtils
          Issue Type: Improvement
    Affects Versions: 1.4
         Environment: Windows 7 + IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Windows 7 x86-32
jvmwi3260sr9-20110216_75791 (JIT enabled, AOT enabled)
            Reporter: Tiago Cavaleiro
            Priority: Minor

I was experimenting DbUtils and discovered that if the result set contains a SQLXML column
using the BeanProcessor the returned type will be a String and not a java.sql.SQLXML.

Part of the problem is related with the fact the SQL Server driver returns a String. 
The call to ResultSet.getObject([SQLXML index]) is returning a String instead of the java.sql.SQLXML,
but if we call the ResultSet.getSQLXML([SQLXML index]) it works as expected.

The correction I've made on the DbUtils was to add the following code:

    protected Object processColumn(ResultSet rs, int index, Class<?> propType)
        throws SQLException {

        } else if (propType.equals(SQLXML.class)) {
        	return rs.getSQLXML(index);
        } else {
            return rs.getObject(index);

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message