I use hsql in server way to run, and i use java JDBC client to connect. But sometimes it throw exception when i insert or update data.Exception message like this "java.sql.SQLException: transaction rollback: serialization failure". I use transaction in my code.
How this exception cause by? And any suggestions??I have no idea. This question is important for me, please reply as soon as possible, Thank you very much~
this is whole exception stack message.
Caused by: java.sql.SQLException: transaction rollback: serialization failure
at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
My hsql version is lastest
This exception is caused by multiple updates on the same object (in MVCC mode), or by deadlock prevention (in all modes). It really depends on what your different transactions are doing.
I have two thread, first one insert value, last one will update value what insert before.
Sometimes this excpetion occur when i insert data in transaction, in the transaction i insert data into two tables.these is the same cause of ?? How can i avoid this exception? change transaction level ?
It is difficult to say without knowing your application. With MVCC, the INSERT thread shouldn't have a problem at all. The update thread can update the rows when the INSERT thread has committed.
In LOCKS mode, if you insert into two tables, the transactions must insert and update the tables in the same order, for example table A first, then table B.
I think I find the problem, thank you very much
I'm having the same problem, in a webapplication where users concurrently execute actions (e.g. save objects they are editing).
How did you solve the problem?
How did you solve the problem? What was the cause?
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.