[
https://issues.apache.org/jira/browse/IBATIS-544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12638602#action_12638602
]
Kai Grabfelder commented on IBATIS-544:
---------------------------------------
If they really work in separate transactions I doubt this is a configuration
issue.
Could you please try if the same happens with ibatis 2.3.4?
If yes it would help to attach a testcase which shows the error (preferable as
a complete & working maven project ;-))
> Issue in executing callable and prepared statements together
> ------------------------------------------------------------
>
> Key: IBATIS-544
> URL: https://issues.apache.org/jira/browse/IBATIS-544
> Project: iBatis for Java
> Issue Type: Bug
> Components: SQL Maps
> Affects Versions: 2.3.2
> Environment: Jboss, Cache DB, Ibatis, Java
> Reporter: Gita A L
> Fix For: 2.3.2
>
>
> 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
> Is this a bug in ibatis or is there some configuration incorrect ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.