Tomas Zalusky

Greenhorn
+ Follow
since Aug 11, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tomas Zalusky

I had encountered the same error when I was experimenting with Hibernate and MS SQL Server. The problem in my application was caused by JTDS driver and by the fact that the referential integrity was maintained using _triggers_. JTDS driver returns bad value of count of rows affected by insert (it is caused by trigger or bug in driver or both . So in my case the inserting was _successful_, but the zero value returned by executeUpdate caused a HibernateException (see source of NonBatchingBatcher), rollback of Hibernate transaction and rollback of JDBC transaction. After upgrading driver to 0.8.1 the problem disappeared. There is another advice in Hibernate FAQ based on setting the lastUpdateCount parameter, but it didn't help me. Anyway I recommend you to launch SQL insert in a small java-JDBC program without using Hibernate, it helped me a lot to locate the problem.

Hope this helps
Tomas
[ August 11, 2004: Message edited by: Tomas Zalusky ]