org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 // Is this because the client has been deleted by hibernate?

Stack Overflow | sergioFC | 2 months ago
  1. 0

    Why is hibernate calling delete during an update transaction?

    Stack Overflow | 2 months ago | sergioFC
    org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 // Is this because the client has been deleted by hibernate?
  2. 0

    [CWD-355] Exception while removing a directory. - Atlassian JIRA

    atlassian.com | 11 months ago
    org.hibernate.StaleStateException: Batch update returned unexpected row count from update ; actual row count: 0; expected: 1
  3. 0

    [Spacewalk-list] spacewalk-repo-sync is not generating any repodata.

    redhat.com | 1 year ago
    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

    [NMS-5524] Deleting many nodes at one time through REST API cause error - The OpenNMS Issue Tracker

    opennms.org | 1 year ago
    org.hibernate.StaleStateException: Batch update returned unexpected row count from update ; actual row count: 0; expected: 1
  6. 0

    The following exception occured when removing a directory. Our crowd instance is configured using a Confluence directory. Nothing special in its configuration. I attached the cargo logs to the issue. Cause : org.springframework.orm.hibernate3.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 Stack Trace : org.springframework.orm.hibernate3.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 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:61) 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.delete(AbstractEntityPersister.java:2516) at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2693) at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:74) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:144) 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) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106) at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:584) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:500) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:473) at com.atlassian.xwork.interceptors.XWorkTransactionInterceptor$1.beforeResult(XWorkTransactionInterceptor.java:89) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.atlassian.xwork.interceptors.XWorkTransactionInterceptor.intercept(XWorkTransactionInterceptor.java:98) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188) at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:113) at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:225) at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:202) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.crowd.integration.http.VerifyTokenFilter.doFilter(VerifyTokenFilter.java:131) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:37) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Referer : http://localhost:14563/crowd/console/secure/directory/removedirectory!default.action?ID=32777 Build Information : Version : 1.0.7 (Build:#111 - May 10, 2007) Memory Information : Total Memory : 94 MB Free Memory : 35 MB Used Memory : 59 MB Request Information : - Request URL : http://localhost:14563/crowd/console/500.jsp - Scheme : http - Server : localhost - Port : 14563 - URI : /crowd/console/500.jsp - Context Path : /crowd - - Servlet Path : /console/500.jsp - - Path Info : null - - Query String : Request Attributes : - javax.servlet.forward.request_uri : /crowd/console/secure/directory/removedirectory!update.action - javax.servlet.forward.context_path : /crowd - javax.servlet.forward.servlet_path : /console/secure/directory/removedirectory!update.action - javax.servlet.forward.path_info : /console/500.jsp - javax.servlet.error.servlet_name : default - javax.servlet.error.message : - javax.servlet.error.exception : org.springframework.orm.hibernate3.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 - webwork.valueStack : com.opensymphony.xwork.util.OgnlValueStack@105ba64 - __sitemesh__using_stream : false - javax.servlet.error.request_uri : /crowd/console/secure/directory/removedirectory!update.action - javax.servlet.jsp.jspException : org.springframework.orm.hibernate3.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 - __cleanup_counter : 0 - javax.servlet.error.status_code : 500 - __sitemesh__filterapplied : true - sessioninview.FILTERED : true

    Atlassian JIRA | 9 years ago | Samuel Le Berrigaud [Atlassian]
    org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1

  1. mauritius 2 times, last 3 months 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 // Is this because the client has been deleted by hibernate?

    at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched()
  2. Hibernate
    AbstractEntityPersister.delete
    1. org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:85)
    2. org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:70)
    3. org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:47)
    4. org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2707)
    5. org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2911)
    5 frames
  3. Hibernate
    EntityDeleteAction.execute
    1. org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:97)
    1 frame
  4. Hibernate
    ActionQueue.executeActions
    1. org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
    2. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
    3. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:189)
    3 frames
  5. Hibernate
    SessionImpl.managedFlush
    1. org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
    2. org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
    3. org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
    4. org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383)
    4 frames
  6. Hibernate
    JDBCTransaction.commit
    1. org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133)
    1 frame
  7. com.project.dao
    ClientDAO.updatetx
    1. com.project.dao.ClientDAO.updatetx(ClientDAO.java:138)
    1 frame
  8. com.project.bl
    ClientsBL.updateClient
    1. com.project.bl.ClientsBL.updateClient(ClientsBL.java:2291)
    1 frame