Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E77D2D51C for ; Fri, 20 Jul 2012 19:35:43 +0000 (UTC) Received: (qmail 43642 invoked by uid 500); 20 Jul 2012 19:35:39 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 43356 invoked by uid 500); 20 Jul 2012 19:35:38 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 42922 invoked by uid 99); 20 Jul 2012 19:35:38 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jul 2012 19:35:38 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 0242B142871 for ; Fri, 20 Jul 2012 19:35:37 +0000 (UTC) Date: Fri, 20 Jul 2012 19:35:37 +0000 (UTC) From: "Simone Tripodi (JIRA)" To: issues@commons.apache.org Message-ID: <1475834082.83542.1342812937013.JavaMail.jiratomcat@issues-vm> In-Reply-To: <777499776.21288.1321024011556.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Closed] (DBUTILS-84) BeanProcessor method processColumn should take SQLXML in consideration MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DBUTILS-84?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Simone Tripodi closed DBUTILS-84. --------------------------------- 1.5-RC released > BeanProcessor method processColumn should take SQLXML in consideration > ---------------------------------------------------------------------- > > Key: DBUTILS-84 > URL: https://issues.apache.org/jira/browse/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 > Assignee: William R. Speirs > Priority: Minor > Labels: SQLXML, sqlserver > Fix For: 1.5 > > Attachments: BeanProcessor.java > > Original Estimate: 5m > Remaining Estimate: 5m > > 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: > {code:title=BeanProcess.java|borderStyle=solid} > 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); > } > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira