You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Jeff Butler (JIRA)" <ib...@incubator.apache.org> on 2007/06/29 14:37:04 UTC

[jira] Closed: (IBATIS-444) Setting Out Parameter for Stored Procedure fails. Error says "Invalid data type"

     [ https://issues.apache.org/jira/browse/IBATIS-444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeff Butler closed IBATIS-444.
------------------------------

    Resolution: Invalid

Not a bug.

Please use the mailing lists for support questions.

(hint: read about "jdbcType" in the developer's guide)

> Setting Out Parameter for Stored Procedure fails. Error says "Invalid data type"
> --------------------------------------------------------------------------------
>
>                 Key: IBATIS-444
>                 URL: https://issues.apache.org/jira/browse/IBATIS-444
>             Project: iBatis for Java
>          Issue Type: Bug
>          Components: SQL Maps
>    Affects Versions: 2.2.0, 2.3.0
>         Environment: Java 1.6, Ibatis 2.2 and 2.3, Oracle 10g
>            Reporter: Ramona Krickan
>
> I am running the following code: 
> create or replace procedure maximum
>     (a in integer, b in integer, c out integer) as
> begin
>  if (a > b) then c := a; end if;
>  if (b >= a) then c:= b; end if;
> end;
> <parameterMap id="maxOut" class="java.util.Map">
>         <parameter property="a" mode="IN"/>
>         <parameter property="b" mode="IN"/>
>         <parameter property="c" mode="OUT"/>
>     </parameterMap>
>     <procedure id="maxOutProcedure" parameterMap="maxOut">
>         { call maximum (?, ?, ?) }
>     </procedure>
> Map m = new HashMap(2);
>         m.put("a", new Integer(7));
>         m.put("b", new Integer(5));
>         sqlMap.queryForObject("maxOutProcedure", m);
>         Integer value = (Integer) m.get("c");
> Exception: 
> com.ibatis.common.jdbc.exception.NestedSQLException:   
> --- The error occurred in com/zooplus/dbo/maps/jobs/logistics/logistics.xml.  
> --- The error occurred while executing query procedure.  
> --- Check the { call maximum (?, ?, ?) }.  
> --- Check the output parameters (register output parameters failed).  
> --- Cause: java.sql.SQLException: Ungültiger Spaltentyp   // invalid data type
> Caused by: java.sql.SQLException: Ungültiger Spaltentyp
> 	at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:185)
> 	at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForObject(GeneralStatement.java:104)
> 	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:565)
> 	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:540)
> 	at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:106)
> 	at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(SqlMapClientImpl.java:84)
> 	at com.zooplus.jobs.SqlMapPlugin.queryForObject(SqlMapPlugin.java:437)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.