ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timo Schnölzer <tschnoel...@nsdcom.de>
Subject AW: oracle XmlType
Date Sat, 11 Nov 2006 15:18:08 GMT
Hi Jeff,
I am getting a 


when using DEBUG level and a apache dbcp.DelegatingResultSet when going on ERROR for Resultset

Any ideas welcome




Von: Jeff Butler [mailto:jeffgbutler@gmail.com] 
Gesendet: Freitag, 10. November 2006 17:51
An: user-java@ibatis.apache.org
Betreff: Re: oracle XmlType

What class is returned from getter.getResultSet()?
If you have logging enabled, you might be getting iBATIS' result set proxy instead of the
underlying result set.
Does it work differently if you enable or disable logging?
Jeff Butler

On 11/10/06, Timo Schnölzer <tschnoelzer@nsdcom.de> wrote: 

Hi Folks,

I am using the Ibatis mapping tool for long and want to map XmlType from Oracle.
I registerd the XMLTypeHandlerCallbackand the system is running into the getResult Method

returning the UnsupportedOperationException  error:

if (getter.getResultSet() instanceof OracleResultSet) {
                       OPAQUE opaqueValue = getOpaqueValue(getter);
                       if (opaqueValue != null) { 
                               XMLType xmlResult = XMLType.createXML(opaqueValue);
                               return xmlResult.getDOM();
                       } else {
                               return (Document) null; 
               } else {
                       throw new UnsupportedOperationException(
                                       "XMLType mapping only supported for Oracle RDBMS");


Has anyone out there running example with the mapping and Object ?

I am using "SELECT 1 as id, xmlelement("Flat", xmlattributes(z.floors ..... "


       <resultMap id="houseResult" class="houseData"> 
               <result property="id" column="id" />
               <result property="xmlValue" column="xmlValue"/>

       <select id="getHouseXML" 
               resultMap=" houseResult "> select ...


import org.w3c.dom.Document;

public class House {

       private Integer id;

       private Document xmlValue;

       public Document getXmlValue() {
               return xmlValue;

       public void setXmlValue(Document xmlValue) {
               this.xmlValue = xmlValue;

       public Integer getId() { 
               return id;

       public void setId(Integer id) {
               this.id = id;


Thx a lot

Timo Schnölzer

View raw message