ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lucy.x.came...@jpmorgan.com
Subject Spring, Ibatis & Oracle 10G
Date Fri, 03 Oct 2008 11:12:36 GMT

I'm using spring &  ibatis sql maps  to call an Oracle (10G) stored
procedure. I can successfully call the stored proc from sql plus however
when I use my code I get no data returned and no error thrown.
The stored procedure  takes in 7 parameters -  6 input and 1 output, the
output being a of type sys_refcursor. I can't see where I'm going wrong...
is there a way I can debug to see exactly whats being called ? Or am I
handling the cursor incorrectly ? Or is my application context incorrect ?

here's my sql map relating to the proc (mapToClass is just a java bean
representing )

      <parameterMap id ="aParameterMap"  class="map">

            <parameter property="parameter1" jdbcType="VARCHAR" javaType=
"java.lang.String" mode="IN"/>
            <parameter property="parameter2" jdbcType="DATE" javaType=
"java.util.Date" mode="IN"/>
            <parameter property="parameter3" jdbcType="VARCHAR" javaType=
"java.lang.String" mode="IN"/>
            <parameter property="parameter4" jdbcType="VARCHAR" javaType=
"java.lang.String" mode="IN"/>
            <parameter property="parameter5" jdbcType="VARCHAR" javaType=
"java.lang.String" mode="IN"/>
            <parameter property="parameter6" jdbcType="CHAR" javaType=
"java.lang.String" mode="IN"/>
            <parameter property="parameter7" jdbcType="ORACLECURSOR" mode=
"OUT" resultMap="mapToClass"/>


      <procedure id="aStoredProcCall" parameterMap="aParameterMap">
            {call get_some_data(?, ?, ?, ?, ?, ?, ?) }

The java code

        Map map = new HashMap();

        map.put("parameter1", "valueparameter1");
        map.put("parameter2", "valueparameter2");
        map.put("parameter3", "valueparameter3");
        map.put("parameter4", "valueparameter4");
        map.put("parameter5", "valueparameter5");
        map.put("parameter6", "valueparameter6");

      List data


      <bean id="sqlMapClient"
            <property name="configLocation"
                  value="classpath:sqlmap-config.xml" />
            <property name="dataSource" ref="dataSource" />

      <bean id="theDao"
            <property name="sqlMapClient" ref="sqlMapClient" />

Generally, this communication is for informational purposes only
and it is not intended as an offer or solicitation for the purchase
or sale of any financial instrument or as an official confirmation
of any transaction. In the event you are receiving the offering
materials attached below related to your interest in hedge funds or
private equity, this communication may be intended as an offer or
solicitation for the purchase or sale of such fund(s).  All market
prices, data and other information are not warranted as to
completeness or accuracy and are subject to change without notice.
Any comments or statements made herein do not necessarily reflect
those of JPMorgan Chase & Co., its subsidiaries and affiliates.

This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED. Although this transmission and any
attachments are believed to be free of any virus or other defect
that might affect any computer system into which it is received and
opened, it is the responsibility of the recipient to ensure that it
is virus free and no responsibility is accepted by JPMorgan Chase &
Co., its subsidiaries and affiliates, as applicable, for any loss
or damage arising in any way from its use. If you received this
transmission in error, please immediately contact the sender and
destroy the material in its entirety, whether in electronic or hard
copy format. Thank you.
Please refer to http://www.jpmorgan.com/pages/disclosures for
disclosures relating to UK legal entities.

View raw message