ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bala r" <bala...@gmail.com>
Subject Help needed for Handling Oracle XMLType in Ibatis
Date Wed, 20 Aug 2008 14:06:14 GMT
Hi,

I have to insert/update XMLtype datatype using Ibatis, My insert/update
statement are in storedprocedure

1. I added the following entry in the sqlMapConfig file
<typeHandler javaType="org.w3c.dom.Document"
callBack="XMLTypeHandlerCallBack"/>

2.My SQLmap Resource

<parameterMap id="product_map" class="java.util.HashMap" >
       <parameter         property="item_type_id"
jdbcType="VARCHAR2"    javaType="java.lang.String" mode="IN"/>
        <parameter         property="item_id"
jdbcType="VARCHAR2"    javaType="java.lang.String" mode="IN"/>
        <parameter         property="web_display_name"
jdbcType="VARCHAR2"    javaType="java.lang.String" mode="IN"/>
        <parameter         property="url"
jdbcType="VARCHAR2"    javaType="java.lang.String" mode="IN"/>
        <parameter         property="uri"
jdbcType="VARCHAR2"    javaType="java.lang.String" mode="IN"/>
        <parameter         property="xml_content" jdbcType="XMLTYPE"
javaType="org.w3c.dom.Document" mode="IN/>
</parameter>
<procedure id="product" parameterMap="product_map">
        {call product.load (?,?,?,?,?,?)}
    </procedure>

3. Stored Procedure paramers are as
                  Procedure load(
                                  item_type_id IN VARCHAR2,
                                  item_id IN VARCHAR2,
                                  web_display_name IN VARCHAR2,
                                   url IN VARCHAR2,
                                   uri IN VARCHAR2,
                                   xml_content IN XMLTYPE);

Getting the following exception..
org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation;
uncategorized SQLException for SQL []; SQL state [null]; error code [0];
--- The error occurred in product_mapper.xml.
--- The error occurred while applying a parameter map.
--- Check the product_mapper.product_overview_map.
--- Check the parameter mapping for the 'xml_content' property.
--- Cause: java.lang.UnsupportedOperationException: XMLType mapping only
supported for Oracle RDBMS; nested exception is
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in product_mapper.xml.
--- The error occurred while applying a parameter map.
--- Check the product_mapper.product_overview_map.
--- Check the parameter mapping for the 'xml_content' property.
--- Cause: java.lang.UnsupportedOperationException: XMLType mapping only
supported for Oracle RDBMS
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:

If i move my insert statment to sqlMap  file instead of storedprocedure call
then XMLType works..
Struggling to solve this issue since from yesterday morning but keep getting
the same error.

Thanks in Advance.

Thanks
bala.

Mime
View raw message