org.hibernate.StaleStateException

Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web252

  • via Google Groups by mkaziu, 1 year ago
    Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
  • via Coderanch by Anoop Krishnan, 7 months ago
    Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
  • via Coderanch by Markus Schmider, 7 months ago
    Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
  • Stack trace

    • org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:67) at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:54) at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:46) at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3197) at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3434) at org.hibernate.action.internal.EntityDeleteAction.execute(EntityDeleteAction.java:98) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:560) at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:434) at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337) at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39) at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1282) at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:465) at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:2963) at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2339) at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:485) at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:147) at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$100(JdbcResourceLocalTransactionCoordinatorImpl.java:38) at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:231) at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:65) at firstproject.Main.deleteProfessions(Main.java:33) at firstproject.Main.main(Main.java:57)

    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

    Unknown user
    Once, 5 minutes ago
    Unknown user
    Once, 34 minutes ago
    Unknown user
    Once, 1 hour ago
    Unknown user
    Once, 1 hour ago
    Unknown user
    Once, 1 hour ago
    89 more bugmates