org.hibernate.jdbc.BatchedTooManyRowsAffectedException: Batch update returned unexpected row count from update [0]; actual row count: 2; expected: 1

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by user1740005
, 1 year ago
Batch update returned unexpected row count from update [0]; actual row count: 2; expected: 1
via hibernate.org by Unknown author, 1 year ago
Batch update returned unexpected row count from update [0]; actual row count: 3; expected: 1
via Stack Overflow by Till
, 2 years ago
Batch update returned unexpected row count from update [0]; actual row count: 5; expected: 1
via Stack Overflow by tuxx
, 2 years ago
Batch update returned unexpected row count from update [0]; actual row count: 4; expected: 1
via Coderanch by Varun Nayudu, 11 months ago
Batch update returned unexpected row count from update [0]; actual row count: 233258048; expected: 1
via coderanch.com by Unknown author, 1 year ago
Batch update returned unexpected row count from update [0]; actual row count: 233258048; expected: 1
org.hibernate.jdbc.BatchedTooManyRowsAffectedException: Batch update returned unexpected row count from update [0]; actual row count: 2; expected: 1
at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:71)
at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:46)
at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:24)
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2403)
at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2307)
at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2607)
at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:92)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.