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


Solutions on the web13

Solution icon of stackoverflow
Batch update returned unexpected row count from update [0]; actual row count: 2; expected: 1

Solution icon of stackoverflow
via Stack Overflow by Till
, 1 year ago
Batch update returned unexpected row count from update [0]; actual row count: 5; expected: 1

Solution icon of stackoverflow
Batch update returned unexpected row count from update [0]; actual row count: 4; expected: 1

Solution icon of coderanch
via Coderanch by Varun Nayudu, 9 months ago
Batch update returned unexpected row count from update [0]; actual row count: 233258048; expected: 1

Solution icon of stackoverflow
Batch update returned unexpected row count from update [0]; actual row count: 6; expected: 1

Solution icon of web
via com.br by Unknown author, 1 year ago
Batch update returned unexpected row count from update [0]; actual row count: 1922; expected: 1

Solution icon of web
via roseindia.net by Unknown author, 1 year ago
Batch update returned unexpected row count from update [0]; actual row count: 7810893; expected: 1

Solution icon of web
Batch update returned unexpected row count from update [0]; actual row count: 3; expected: 1

Solution icon of web
Batch update returned unexpected row count from update [0]; actual row count: 7810893; expected: 1

Solution icon of stackoverflow
Batch update returned unexpected row count from update [0]; actual row count: 5; expected: 1

Stack trace

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.engine.ActionQueue.executeActions(ActionQueue.java:142)
	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)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

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, 1 year ago