You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Gita A L <gi...@gmail.com> on 2008/10/09 04:06:57 UTC
Issue in executing callable and prepared statements together
Hi,
I am trying to call a stored procedure (Callable Statement) and then execute
a prepared statement using ibatis, both of them work correctly when they are
executed separately but when they are executed one after another the
execution of the callable statement works fine but it fails while executing
the prepared statement.
// Callable Statement
List patientList =
getSqlMapClientTemplate().queryForList("patients.getClientPatients", map);
// Prepared Statement
List orderUnitList =
getSqlMapClientTemplate().queryForList("account.getOrderUnitList", params);
Below is the error log
org.springframework.dao.DataAccessResourceFailureException: SqlMapClient
operation; SQL [];
--- The error occurred in ibatis/account.xml.
--- The error occurred while executing query.
--- Check the select ISNULL(trim(BOTH '' from sto.SOU_Name),
ou.OU_Name) as name, sto.SOU_OrdUnitDR as code
from ST_SOrdUnit sto, MT_OrdUnit ou where
ST_Study = ? and sto.SOU_OrdUnitDR = ou.MT_OrdUnit
.
--- Check the SQL Statement (preparation failed).
--- Cause: java.sql.SQLException: Invalid Message Count (452); expected: 7
got: 6. Connection closed; nested exception is
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in ibatis/account.xml.
--- The error occurred while executing query.
--- Check the select ISNULL(trim(BOTH '' from sto.SOU_Name),
ou.OU_Name) as name, sto.SOU_OrdUnitDR as code
from ST_SOrdUnit sto, MT_OrdUnit ou where
ST_Study = ? and sto.SOU_OrdUnitDR = ou.MT_OrdUnit
.
--- Check the SQL Statement (preparation failed).
--- Cause: java.sql.SQLException: Invalid Message Count (452); expected: 7
got: 6. Connection closed
If anyone has any clues about this, please let me know.
Thanks,
Gita
--
View this message in context: http://www.nabble.com/Issue-in-executing-callable-and-prepared-statements-together-tp19891000p19891000.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.