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

GitHub | lefevre00 | 6 months ago
  1. 0

    Exception update place

    GitHub | 6 months ago | lefevre00
    org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
  2. 0

    error while updating person: HHH000346: Error during managed flush

    GitHub | 8 months ago | jluc2808
    org.springframework.orm.hibernate5.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
  3. 0

    trap the error and disable java error

    GitHub | 8 months ago | jluc2808
    org.springframework.orm.hibernate5.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    getting error with person api

    GitHub | 1 year ago | jluc2808
    org.springframework.orm.hibernate5.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
  6. 0

    HikariCP throws exceptions when multiple threads try to get and update at the same time

    GitHub | 1 year ago | kewangie
    org.springframework.orm.hibernate5.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1

  1. serious2monkeys 4 times, last 1 week ago
2 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. 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()
  2. Hibernate
    JdbcCoordinatorImpl.beforeTransactionCompletion
    1. org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:67)
    2. org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:54)
    3. org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:46)
    4. org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3106)
    5. org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2985)
    6. org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3365)
    7. org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:145)
    8. org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:560)
    9. org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:434)
    10. org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
    11. org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
    12. org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)
    13. org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:468)
    14. org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3135)
    15. org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2352)
    16. org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:485)
    16 frames
  3. org.hibernate.resource
    JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit
    1. org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:147)
    2. org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$100(JdbcResourceLocalTransactionCoordinatorImpl.java:38)
    3. org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:231)
    3 frames
  4. Hibernate
    TransactionImpl.commit
    1. org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:65)
    1 frame
  5. org.friends.app
    RoutesLoader.lambda$init$7
    1. org.friends.app.dao.SessionDao.deleteExpired(SessionDao.java:30)
    2. org.friends.app.service.impl.UserServiceBean.cleanExpiredSession(UserServiceBean.java:83)
    3. org.friends.app.service.impl.UserServiceBean.createSession(UserServiceBean.java:78)
    4. org.friends.app.view.RoutesLoader.lambda$init$7(RoutesLoader.java:185)
    4 frames
  6. Spark
    JettyHandler.doHandle
    1. spark.FilterImpl$1.handle(FilterImpl.java:59)
    2. spark.webserver.MatcherFilter.doFilter(MatcherFilter.java:123)
    3. spark.webserver.JettyHandler.doHandle(JettyHandler.java:61)
    3 frames
  7. Jetty
    HttpConnection.onFillable
    1. org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
    2. org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    3. org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
    4. org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
    5. org.eclipse.jetty.server.Server.handle(Server.java:517)
    6. org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:302)
    7. org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
    7 frames