Thanks for the immediate response Jeff.
 
My sql-map is something like this.
 
<sqlMap>

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

<parameter property="p_irn" jdbcType="NUMBER" javaType="java.lang.Long"
mode="IN" />

<parameter property="p_orga_number" jdbcType="NUMBER"
javaType="java.lang.Long" mode="IN" />

<parameter property="p_csph" jdbcType="NUMBER" javaType="java.lang.Long"
mode="IN" />

<parameter property="p_grade" jdbcType="VARCHAR"
javaType="java.lang.String" mode="IN" />

<parameter property="p_activity_id" jdbcType="VARCHAR"
javaType="java.lang.String" mode="IN" />

<parameter property="p_activity_title" jdbcType="VARCHAR"
javaType="java.lang.String" mode="IN" />

<parameter property="p_term_date" jdbcType="DATE"
javaType="java.sql.Date" mode="IN" />

<parameter property="p_cred_att" jdbcType="NUMBER"
javaType="java.lang.Double" mode="IN" />

<parameter property="p_reuse_code" jdbcType="VARCHAR"
javaType="java.lang.String" mode="IN" />

<parameter property="p_tran_act_oid" jdbcType="NUMBER"
javaType="java.lang.Long" mode="INOUT"/>

<parameter property="p_clas_rost_#" jdbcType="NUMBER"
javaType="java.lang.Long" mode="INOUT"/>

</parameterMap>

<procedure id="example"

parameterMap="exampleParam">

{call example(?,?,?,?,?,?,?,?,?,?,?)}

</procedure>

</sqlMap>

 
 
The last 2 params are float in the Database. I am not sure if this has
something to do with the procedure returning multiple out params.


________________________________

From: Jeff Butler [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 30, 2008 2:39 PM
To: user-java@ibatis.apache.org
Subject: Re: Weird IN OUT Param problem.


Make sure you are specifying the jdbcType of the out/inout parameters in
your parameter map.
 
Jeff Butler


On Jan 30, 2008 3:37 PM, Sundar Sankaranarayanan
<[EMAIL PROTECTED]> wrote:


        Hi All, 
        I have a stored procedure,  which is something like this.
         
        call example(?,?,?,?,?,?)
         
        The first four params are IN params and the last 2 are out
params. If I set the mode="OUT" or set the mode as "INOUT" in the
sql-map xml file I get a 
         
         
                        --- Cause: java.sql.SQLException

        : Invalid column type; nested exception is
com.ibatis.common.jdbc.exception.NestedSQLException: 

                        --- The error occurred in
ibatis/config/procedures/example.xml. 

                        --- The error occurred while executing query
procedure. 

                        --- Check the {call example(?,?,?,?,?,?)}

                        --- Check the output parameters (register output
parameters failed). 

                        --- Cause: java.sql.SQLException: Invalid column
type

                        at
org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translat
e(SQLStateSQLExceptionTranslator.java:121)

                        at
org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.tran
slate(SQLErrorCodeSQLExceptionTranslator.java:322)

                        at
org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClient
Template.java:197)

                        at
org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResul
t(SqlMapClientTemplate.java:220)

                        at
org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapC
lientTemplate.java:267)

                        at
com.apollo.sisaw.entry.dao.implementation.IbatisTranscriptActivityDaoImp
l.insertTranscriptActivity(IbatisTranscriptActivityDaoImpl.java:408)

                        at
com.apollo.sisaw.entry.dao.implementation.IbatisTranscriptActivityDaoImp
lTest.testInsertTranscriptActivity(IbatisTranscriptActivityDaoImplTest.j
ava:197)

                        at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        . 
        The procedure does run fine if I change the mode to "IN" but the
values that I expect to be set into the input map I provide is being set
as null. I dont know what has to be done. I am using Spring with Ibatis
together and have an oracle database. Any help on this is appreciated.
         
         
        Thanks and Regards
        Sundar .


Reply via email to