• Register
0 votes
400 views

Problem :

I am stuck with following strange looking Hibernate error
batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
6 5 3
6,930 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

To resolve your issue follow following steps:

  • In hibernate configuration firstly set hibernate.show_sql to true. It shows you the SQL that is geting executed and causing the problem.
  • Next set the DEBUG log levels for Spring and Hibernate which will give you a better idea as to which line is causing the issue.
  • Lastly you need to create a unit test which should replicate the problem without configuring a transaction manager in Spring. This should give you a better idea of the offending line of code.

This will solve your issue.

9 7 4
38,600 points

Related questions

1 vote
1 answer 47 views
47 views
Problem : Anyone familiar with this hibernate error? Caused by: org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 How I can solve this issue?
asked Mar 31 Sabbir Hossain 14.6k points
0 votes
1 answer 5 views
5 views
Problem: Please help me with the above error i am getting replacement has 1 row, data has 0?
asked Apr 2 Sana8989 8.9k points
0 votes
1 answer 3 views
3 views
Problem: Could anyone kindly assist me in resolving this uncaught error “Cells(rows.count 1).end(xlup).row”?
asked Apr 5 tuhin1 48.9k points
0 votes
1 answer 11 views
11 views
Problem: Yesterday, when i opened my computer I face this problem then i tried to sloved it but i can't able to, can anyone help me out?
asked Apr 4 niyatiry 3.9k points
0 votes
1 answer 11 views
11 views
Problem: the database returned no natively generated identity value.
asked Feb 22 Dan phillip 4.8k points
0 votes
1 answer 48 views
48 views
Problem: Why I got the error :javax.persistence.transactionrequiredexception: executing an update/delete query.
asked Mar 6 Wafa Abu Yousef 6.1k points
0 votes
1 answer 3.6K views
3.6K views
Problem : I am getting bellow error while using hibernate JPA with spring and mongodb and running my application on Glassfish-4.0. javax.persistence.transactionrequiredexception: executing an update/delete query
asked Oct 19, 2019 peterlaw 6.9k points
0 votes
1 answer 19 views
19 views
Problem: Please assist me in resolving this issue in the server encountered an unexpected condition which prevented it from fulfilling the request.
asked Apr 6 tuhin1 48.9k points
0 votes
1 answer 1K views
1K views
Problem : I am trying to display Data from DB.But facing error as followsthe server encountered an unexpected condition that prevented it from fulfilling the request.
asked Nov 15, 2019 peterlaw 6.9k points
0 votes
1 answer 9 views
9 views
Problem: Despite all of the other posts, I can't find a solution for this error with GlassFish, on MacOSX, NetBeans 7.2. SEVERE: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer
asked Mar 24 ummesalma 29.2k points