[ 
https://issues.apache.org/jira/browse/IBATIS-544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643218#action_12643218
 ] 

Gita A L commented on IBATIS-544:
---------------------------------

Any updates on this issue

> 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
>
>         Attachments: IBATIS-544.zip, ibatis.zip
>
>
> 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.

Reply via email to