ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramona Krickan (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Created: (IBATIS-444) Setting Out Parameter for Stored Procedure fails. Error says "Invalid data type"
Date Fri, 29 Jun 2007 10:07:04 GMT
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.3.0, 2.2.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
 if (a > b) then c := a; end if;
 if (b >= a) then c:= b; end if;

<parameterMap id="maxOut" class="java.util.Map">
        <parameter property="a" mode="IN"/>
        <parameter property="b" mode="IN"/>
        <parameter property="c" mode="OUT"/>

    <procedure id="maxOutProcedure" parameterMap="maxOut">
        { call maximum (?, ?, ?) }

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");

--- 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.

View raw message