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

Atlassian JIRA | Renan Battaglin | 8 years ago
  1. 0

    The *Import Users* feature does not perform a complete import when using MySQL. Versions used during test: MySQL 5.0.37 MySQL 5.0.67 mysql-connector-java-3.1.14 mysql-connector-java-5.0.8 mysql-connector-java-5.1.6 Problem reproduced when using the *Atlassian Importer* (with Confluence) and the *CSV Importer*. The following errors are displayed: {noformat} 2009-04-29 15:52:49,212 http-8095-Processor23 ERROR [crowd.importer.importers.BaseImporter] Could not add memberships for group 'confluence-users' as it does not exist in directory with ID: 360450 com.atlassian.crowd.integration.exception.ObjectNotFoundException: Failed to find com.atlassian.crowd.integration.model.RemoteGroup DirectoryID: 360450 and name: confluence-users at com.atlassian.crowd.model.group.GroupDAOHibernate.findByName(GroupDAOHibernate.java:85) at com.atlassian.crowd.integration.directory.internal.InternalDirectory.findGroupByName(InternalDirectory.java:374) at com.atlassian.crowd.integration.directory.internal.InternalDirectory.findGroupByName(InternalDirectory.java:357) at com.atlassian.crowd.manager.directory.bulk.BulkAddGroupMembershipsOperation.performFindContainerByName(BulkAddGroupMembershipsOperation.java:27) at com.atlassian.crowd.manager.directory.bulk.BulkAddGroupMembershipsOperation.performFindContainerByName(BulkAddGroupMembershipsOperation.java:13) at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.addAllPrincipalsToContainer(DirectoryManagerGeneric.java:298) at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.addAllPrincipalsToGroup(DirectoryManagerGeneric.java:344) 2009-04-03 14:25:33,751 http-8095-Processor18 ERROR [persistence.hibernate.batch.BatchProcessorImpl] Could not process class com.atlassian.crowd.integration.model.RemotePrincipal: xxxxx@gmail.com org.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.crowd.integration.model.RemotePrincipal.credentials.credential at org.hibernate.engine.Nullability.checkNullability(Nullability.java:84) at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:290) at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181) at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:121) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:94) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70) at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:507) at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:499) at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:495) at com.atlassian.crowd.util.persistence.hibernate.batch.operation.SaveOrUpdateOperation.performOperation(SaveOrUpdateOperation.java:10) at com.atlassian.crowd.util.persistence.hibernate.batch.BatchProcessorImpl.processIndividual(BatchProcessorImpl.java:302) at com.atlassian.crowd.util.persistence.hibernate.batch.BatchProcessorImpl.processBatch(BatchProcessorImpl.java:279) 2009-04-03 14:25:33,749 http-8095-Processor18 ERROR [persistence.hibernate.batch.BatchProcessorImpl] Could not process class com.atlassian.crowd.integration.model.RemotePrincipal: cccc@yahoo.com 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.BatchingBatcher.checkRowCounts(BatchingBatcher.java:68) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246) at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:92) at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:87) at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:222) at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1119) at org.hibernate.action.CollectionRecreateAction.execute(CollectionRecreateAction.java:26) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234) {noformat}

    Atlassian JIRA | 8 years ago | Renan Battaglin
    org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
  2. 0

    The *Import Users* feature does not perform a complete import when using MySQL. Versions used during test: MySQL 5.0.37 MySQL 5.0.67 mysql-connector-java-3.1.14 mysql-connector-java-5.0.8 mysql-connector-java-5.1.6 Problem reproduced when using the *Atlassian Importer* (with Confluence) and the *CSV Importer*. The following errors are displayed: {noformat} 2009-04-29 15:52:49,212 http-8095-Processor23 ERROR [crowd.importer.importers.BaseImporter] Could not add memberships for group 'confluence-users' as it does not exist in directory with ID: 360450 com.atlassian.crowd.integration.exception.ObjectNotFoundException: Failed to find com.atlassian.crowd.integration.model.RemoteGroup DirectoryID: 360450 and name: confluence-users at com.atlassian.crowd.model.group.GroupDAOHibernate.findByName(GroupDAOHibernate.java:85) at com.atlassian.crowd.integration.directory.internal.InternalDirectory.findGroupByName(InternalDirectory.java:374) at com.atlassian.crowd.integration.directory.internal.InternalDirectory.findGroupByName(InternalDirectory.java:357) at com.atlassian.crowd.manager.directory.bulk.BulkAddGroupMembershipsOperation.performFindContainerByName(BulkAddGroupMembershipsOperation.java:27) at com.atlassian.crowd.manager.directory.bulk.BulkAddGroupMembershipsOperation.performFindContainerByName(BulkAddGroupMembershipsOperation.java:13) at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.addAllPrincipalsToContainer(DirectoryManagerGeneric.java:298) at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.addAllPrincipalsToGroup(DirectoryManagerGeneric.java:344) 2009-04-03 14:25:33,751 http-8095-Processor18 ERROR [persistence.hibernate.batch.BatchProcessorImpl] Could not process class com.atlassian.crowd.integration.model.RemotePrincipal: xxxxx@gmail.com org.hibernate.PropertyValueException: not-null property references a null or transient value: com.atlassian.crowd.integration.model.RemotePrincipal.credentials.credential at org.hibernate.engine.Nullability.checkNullability(Nullability.java:84) at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:290) at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181) at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:121) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:94) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70) at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:507) at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:499) at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:495) at com.atlassian.crowd.util.persistence.hibernate.batch.operation.SaveOrUpdateOperation.performOperation(SaveOrUpdateOperation.java:10) at com.atlassian.crowd.util.persistence.hibernate.batch.BatchProcessorImpl.processIndividual(BatchProcessorImpl.java:302) at com.atlassian.crowd.util.persistence.hibernate.batch.BatchProcessorImpl.processBatch(BatchProcessorImpl.java:279) 2009-04-03 14:25:33,749 http-8095-Processor18 ERROR [persistence.hibernate.batch.BatchProcessorImpl] Could not process class com.atlassian.crowd.integration.model.RemotePrincipal: cccc@yahoo.com 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.BatchingBatcher.checkRowCounts(BatchingBatcher.java:68) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246) at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:92) at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:87) at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:222) at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1119) at org.hibernate.action.CollectionRecreateAction.execute(CollectionRecreateAction.java:26) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234) {noformat}

    Atlassian JIRA | 8 years ago | Renan Battaglin
    org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
  3. 0

    Exception: org.hibernate.StaleStateException: - Spring Forum

    spring.io | 5 months ago
    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
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    forum.andromda.org • View topic - HibernateOptimisticLockingFailureException

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

    [#LDEV-2508] Unpredictable hibernate batch update exception - LAMS

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

    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
      AbstractCollectionPersister.recreate
      1. org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:61)
      2. org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:46)
      3. org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:68)
      4. org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
      5. org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
      6. org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:92)
      7. org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:87)
      8. org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:222)
      9. org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1119)
      9 frames
    3. Hibernate
      CollectionRecreateAction.execute
      1. org.hibernate.action.CollectionRecreateAction.execute(CollectionRecreateAction.java:26)
      1 frame
    4. Hibernate
      ActionQueue.executeActions
      1. org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
      2. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234)
      2 frames