Hi Giovanni Cuccu,

 It is working now I have saved the reference and it is working now.
Thanks a lot.

Regards
yuvrajs


Thanks you sir 

It is working with saved session



I'm not expert of iBatis code but there some chances that you are using
different sessions for your operation, this would explain the error you
get.
Try to save a reference to the session obtained in the first openSession
and reuse it to commit and end the transaction.
Giovanni

-----Original Message-----
From: Giovanni Cuccu - CUP2000 [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 19, 2007 7:22 PM
To: user-java@ibatis.apache.org
Subject: Re: Autocommit not properly handled in Ibatis.

I tried to get a look to ibatis 2.3 source code and the method 
opensession is implemented in this way:
   public SqlMapSession getSession() {
     log.warn("Use of a deprecated API detected. 
SqlMapClient.getSession() is deprecated.  Use SqlMapClient.openSession()

instead.");
     return openSession();
   }

I'm not expert of iBatis code but there some chances that you are using 
different sessions for your operation, this would explain the error you
get.
Try to save a reference to the session obtained in the first openSession

and reuse it to commit and end the transaction.
Giovanni

> Hi,
> 
>   For good data also it is also throwing exception in EndTransaction.
> 
>   I debugged the code it is throwing exception on
> session.endTransaction();
> 
>   ie   throw new TransactionException("TransactionManager could not
> commit.      
>    No transaction is started.");
> 
>   in commit method of TransactionManager.java at line no 80.
>   Do you have any idea.
> 
> Regards
> yuvrajs
> 
> 
> 


-- 
Giovanni Cuccu
CUP 2000 Spa
Via del Borgo di S. Pietro, 90/c - 40126 Bologna
e-mail: giovanni.cuccu _at_ cup2000.it



Reply via email to