Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 85185 invoked from network); 20 Aug 2008 18:04:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Aug 2008 18:04:13 -0000 Received: (qmail 17962 invoked by uid 500); 20 Aug 2008 18:04:07 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 17953 invoked by uid 500); 20 Aug 2008 18:04:07 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 17942 invoked by uid 99); 20 Aug 2008 18:04:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Aug 2008 11:04:07 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of balar4u@gmail.com designates 209.85.134.187 as permitted sender) Received: from [209.85.134.187] (HELO mu-out-0910.google.com) (209.85.134.187) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Aug 2008 18:03:07 +0000 Received: by mu-out-0910.google.com with SMTP id i2so400651mue.6 for ; Wed, 20 Aug 2008 11:03:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=MmbC/u16fcuii06YPsgSDAAKGkPwXlBgN8Dd3TunJ/Y=; b=bsyD93vNsN5QvCADfjxZZjwztXd1X7O9R4S3LDNNqqPn3P79tDKq8e+FfREN73Sa+c 0B/aUuCCOD1affMsGhYgebtRqBOcCcZnyjXXy0APa6XVp5B3lJUY9YCTyFNN9lvohfdw PBjujDK8X2SgsROdbi2gZ4Fqg0IZgcQTFOeTc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=B2HMLmksNmVMfmdkMPvpoOrAmkOF9TGEfclNYO/y5HJXwiIpqtCO21AzupXq9JB1Ma zRWwNZiFRZuL9OMQoouPfWv6wAfqYexNbOMR/1AoFHDx4NDC/IaA/kfhqL/TdcYxpgnh ND1Tl2G79m+ds/xQ95oTjxzcW57e+NViao0ZI= Received: by 10.103.218.19 with SMTP id v19mr298627muq.110.1219255398423; Wed, 20 Aug 2008 11:03:18 -0700 (PDT) Received: by 10.103.199.3 with HTTP; Wed, 20 Aug 2008 11:03:18 -0700 (PDT) Message-ID: <631123700808201103sfe63252h4cf1c4157732889d@mail.gmail.com> Date: Wed, 20 Aug 2008 14:03:18 -0400 From: "bala r" To: user-java@ibatis.apache.org Subject: Re: Help needed for Handling Oracle XMLType in Ibatis In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_54922_32497438.1219255398396" References: <631123700808200706y4f35cd9ekcd1b2c1a4a95f75e@mail.gmail.com> <631123700808200828v1c0f894h5a6df5a1075e780d@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_54922_32497438.1219255398396 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks Jeff. I will try this solution. Thanks Bala. On Wed, Aug 20, 2008 at 12:12 PM, Jeff Butler wrote: > Wow - impatient! > > A simple google query lead me to this: > > https://issues.apache.org/jira/browse/IBATIS-397 > > There is a known issue with iBATIS when using procedures and type handlers > together with Oracle. There is a suggested workaround in this bug report > that requires a simple modification to iBATIS code, and to the type handler. > > Jeff Butler > > On Wed, Aug 20, 2008 at 10:28 AM, bala r wrote: > >> Hi All, >> Any solution or suggestions for this XMLType issue? I will have to solve >> this issue by end of today. >> Any helps would be very highly appreciated. >> >> Thanks >> Bala. >> >> >> ---------- Forwarded message ---------- >> From: bala r >> Date: Wed, Aug 20, 2008 at 10:06 AM >> Subject: Help needed for Handling Oracle XMLType in Ibatis >> To: user-java@ibatis.apache.org >> >> >> 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 >> > callBack="XMLTypeHandlerCallBack"/> >> >> 2.My SQLmap Resource >> >> >> > jdbcType="VARCHAR2" javaType="java.lang.String" mode="IN"/> >> > jdbcType="VARCHAR2" javaType="java.lang.String" mode="IN"/> >> > jdbcType="VARCHAR2" javaType="java.lang.String" mode="IN"/> >> > jdbcType="VARCHAR2" javaType="java.lang.String" mode="IN"/> >> > jdbcType="VARCHAR2" javaType="java.lang.String" mode="IN"/> >> > javaType="org.w3c.dom.Document" mode="IN/> >> >> >> {call product.load (?,?,?,?,?,?)} >> >> >> 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. >> >> >> >> >> >> > ------=_Part_54922_32497438.1219255398396 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Thanks Jeff. I will try this solution.

Thanks
Bala.

On Wed, Aug 20, 2008 at 12:12 PM, Jeff Butler <jeffgbutler@gmail.com> wrote:
Wow - impatient!
 
A simple google query lead me to this:
 
 
There is a known issue with iBATIS when using procedures and type handlers together with Oracle.  There is a suggested workaround in this bug report that requires a simple modification to iBATIS code, and to the type handler.
 
Jeff Butler

On Wed, Aug 20, 2008 at 10:28 AM, bala r <balar4u@gmail.com> wrote:
Hi All,
Any solution or suggestions for this XMLType issue? I will have to solve this issue by end of today.
Any helps would be very highly appreciated.

Thanks
Bala.


---------- Forwarded message ----------
From: bala r <balar4u@gmail.com>
Date: Wed, Aug 20, 2008 at 10:06 AM
Subject: Help needed for Handling Oracle XMLType in Ibatis
To: user-java@ibatis.apache.org


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.

                                       

  



------=_Part_54922_32497438.1219255398396--