Re: Autocommit not properly handled in Ibatis.

2007-01-19 Thread Jeff Butler
What is the getSession() method doing? I'll wager that it is actually creating a new session everytime it is called. This would explain the error. Is there some reason you are trying to use the session directly? We hope and expect that this is a rarely used feature in iBATIS. I echo the call

Re: iBatis Typehandler problem

2007-01-19 Thread Jeff Butler
Register your type handler without the jdbcType property like this: I think that will work. iBATIS will not use the jdbcType unless it is specified in an in-line parameter map. Jeff Butler On 1/19/07, Yusuf <[EMAIL PROTECTED]> wrote: Hi all, i browsed through http://opensource.atlassian.c

RE: Autocommit not properly handled in Ibatis.

2007-01-19 Thread Yuvraj Shinde
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 ex

Re: Autocommit not properly handled in Ibatis.

2007-01-19 Thread Giovanni Cuccu - CUP2000
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 openSessi

RE: Autocommit not properly handled in Ibatis.

2007-01-19 Thread Yuvraj Shinde
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 Transac

Re: Autocommit not properly handled in Ibatis.

2007-01-19 Thread Giovanni Cuccu - CUP2000
In your code the message for the exception is the same so did you check what is causing the exception? If you get an exception while calling endTransaction() (and after getting a previous exception) meaning that ibatis cannot rollback there is a chance that you are hitting the default behaviour

RE: Autocommit not properly handled in Ibatis.

2007-01-19 Thread Yuvraj Shinde
I am using Oracle 9 database. From: Koka Kiknadze [mailto:[EMAIL PROTECTED] Sent: Friday, January 19, 2007 4:35 PM To: user-java@ibatis.apache.org Subject: Re: Autocommit not properly handled in Ibatis. Your code is fine and it should work. Problem is else

RE: Autocommit not properly handled in Ibatis.

2007-01-19 Thread Yuvraj Shinde
Hi Daniele, We don't have any method in session for rollback. Regards yuvrajs -Original Message- From: Daniele Cremonini [mailto:[EMAIL PROTECTED] Sent: Friday, January 19, 2007 3:43 PM To: user-java@ibatis.apache.org Subject: Re: Autocommit not properly handled in Ibatis. You shoul

Re: Autocommit not properly handled in Ibatis.

2007-01-19 Thread Koka Kiknadze
Your code is fine and it should work. Problem is elsewhere. Most probably autocommit is still on for some reasons (maybe your database does not support transactions at all?) *failure is never final *Hope you'll work it out

iBatis Typehandler problem

2007-01-19 Thread Yusuf
Hi all, i browsed through http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+u se+a+Custom+Type+Handler+with+complex+property+or+Type+Safe+Enumeration but still can't seem to solve this problem... I have this setup in the config (i'm trying to use joda's DateTime to override ja

Re: Autocommit not properly handled in Ibatis.

2007-01-19 Thread Daniele Cremonini
You should put a rollback instruction in the catch section. Daniele Yuvraj Shinde wrote: public void saveAllRecords( String id, List recordList ) { try { getSession().startTransaction(); if (!recordList.isE

RE: Autocommit not properly handled in Ibatis.

2007-01-19 Thread Yuvraj Shinde
Hi Clinton, Thanks for replying early. Following is the saveAllRecords which save the list passed. List contain the BasicDTO which is serialisable. Suppose I have two DTO in list. First DTO is saved successfully and if I get exception while saving second DTO , the First DTO which is saved earl