ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Miquel Angel Bada Zuazo" <mab...@gmail.com>
Subject problem executing an Stored Procedure with SQL Server and IBatis
Date Wed, 05 Apr 2006 07:59:59 GMT

I'm developing a call to an Stored Procedure with SQL SERVER, and when I try
to map, it throws an SQL Exception

--- The error occurred in
--- The error occurred while applying a parameter map.
--- Check the Accounts.paramSearchAccountList.
--- Check the statement (update procedure failed).
--- Cause: java.sql.SQLException: Formal parameter '@Deleted' was defined as
OUTPUT but the actual parameter not declared OUTPUT.
Caused by: java.sql.SQLException: Formal parameter '@Deleted' was defined as
OUTPUT but the actual parameter not declared OUTPUT.

(also I got a SQLStatment 37000 :( )

the code is the following:


<parameterMap id="paramSearchAccountList" class="java.util.HashMap" >
        <parameter property="clientName" jdbcType="VARCHAR" javaType="
java.lang.String" mode="IN"/>
        <parameter property="role" jdbcType="VARCHAR" javaType="
java.lang.String" mode="IN"/>
        <parameter property="VATNumber" jdbcType="VARCHAR" javaType="
java.lang.String" mode="IN"/>
        <parameter property="currency" jdbcType="VARCHAR" javaType="
java.lang.String" mode="IN"/>
        <parameter property="deleted" jdbcType="BIT" javaType="
java.lang.Integer" mode="INOUT"/>
        <parameter property="NumRecordsRetrieved" jdbcType="INTEGER"
javaType="java.lang.Integer" mode="INOUT"/>
        <parameter property="list" jdbcType=" java.util.list" mode="OUT"
      <!--    <parameter property="list" jdbcType="INTEGER" mode="OUT" />

   <procedure  id="getAllAccounts" resultMap="accountsList"
        call CPGHermesAccountsSearch (?, ?, ?, ?, ?, ?)

public PaginatedList getListAccounts(HashMap map) throws SQLException {
      PaginatedList list = null;
      //  list = sqlMap.queryForPaginatedList("Accounts." + GET_ALL +
"Accounts", map, 1);
        list = (PaginatedList) sqlMap.queryForObject("Accounts." + GET_ALL +
"Accounts", map);

       catch (SQLException e) {
           throw (e);
         //   logger.error("Error getting departments", e);
      return list;
If I execute the SP in SQL Analyzer, it works fine, but with ibatis, there
may be some missconfiguration with the parameters, does anybody knows what
do I'm doing wrong?

Sincerely yours,

Miquel Angel

View raw message