I've been cleaning up our Confluence site and been mostly successful deleting content and spaces. However, I have one space which won't go away. Would someone please point me in the direction of the error? I can't see anything other than an unexpected row count returned. See the log detail from atlassian-confluence.log:
2019-01-29 14:29:16,080 ERROR [Long running task: Space removal long running task] [atlassian.confluence.event.ConfluenceEventDispatcher] run There was an exception thrown trying to dispatch event [com.atlassian.confluence.event.events.space.SpaceWillRemoveEvent[source=com.atlassian.confluence.spaces.DefaultSpaceManager@d729ab]] from the invoker [com.atlassian.confluence.event.ConfluenceListenerHandlersConfiguration$TimingListenerHandler$1$1@2da6f500]
-- space: 98317 | url: /spaces/doremovespace.action | traceId: 7037c52c4f6b8f6a | userName: <redacted> | referer: https://<redacted>/spaces/removespace.action?key=TSIT | action: doremovespace
java.lang.RuntimeException: 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. Listener: com.atlassian.confluence.core.listeners.BundledContentSpaceRemovalListener event: com.atlassian.confluence.event.events.space.SpaceWillRemoveEvent
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:55)
at com.atlassian.confluence.event.ConfluenceListenerHandlersConfiguration$TimingListenerHandler$1$1.invoke(ConfluenceListenerHandlersConfiguration.java:69)
at com.atlassian.confluence.event.ConfluenceEventDispatcher$VCacheRequestContextRunnableFactory$1.lambda$run$0(ConfluenceEventDispatcher.java:93)
at com.atlassian.confluence.vcache.VCacheRequestContextOperations.lambda$doInRequestContext$0(VCacheRequestContextOperations.java:50)
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContextInternal(VCacheRequestContextManager.java:87)
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:71)
at com.atlassian.confluence.vcache.VCacheRequestContextOperations.doInRequestContext(VCacheRequestContextOperations.java:49)
at com.atlassian.confluence.event.ConfluenceEventDispatcher$VCacheRequestContextRunnableFactory$1.run(ConfluenceEventDispatcher.java:93)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:457)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:88)
at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:203)
at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:114)
at com.atlassian.confluence.event.TimingEventPublisher.publish(TimingEventPublisher.java:64)
at com.atlassian.confluence.spaces.DefaultSpaceManager.removeSpace(DefaultSpaceManager.java:185)
at com.atlassian.confluence.spaces.DefaultSpaceManager.removeSpace(DefaultSpaceManager.java:163)
at sun.reflect.GeneratedMethodAccessor10682.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at com.atlassian.confluence.util.profiling.ConfluenceMonitoringMethodInterceptor.invoke(ConfluenceMonitoringMethodInterceptor.java:34)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
at com.sun.proxy.$Proxy112.removeSpace(Unknown Source)
at com.atlassian.confluence.api.impl.service.longtasks.tasks.SpaceRemovalLongRunningTask.runInternal(SpaceRemovalLongRunningTask.java:36)
at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:26)
at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:52)
at com.atlassian.confluence.impl.util.concurrent.ConfluenceExecutors$ThreadLocalContextTaskWrapper.lambda$wrap$1(ConfluenceExecutors.java:90)
at com.atlassian.confluence.vcache.VCacheRequestContextOperations.lambda$doInRequestContext$0(VCacheRequestContextOperations.java:50)
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContextInternal(VCacheRequestContextManager.java:87)
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:71)
at com.atlassian.confluence.vcache.VCacheRequestContextOperations.doInRequestContext(VCacheRequestContextOperations.java:49)
at com.atlassian.confluence.vcache.VCacheRequestContextOperations.lambda$withRequestContext$2(VCacheRequestContextOperations.java:66)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: 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
at org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:283)
at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:366)
at org.springframework.orm.hibernate5.HibernateTemplate.execute(HibernateTemplate.java:313)
at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernatePageDao.getPages(HibernatePageDao.java:150)
at com.atlassian.confluence.pages.persistence.dao.hibernate.CachingPageDao.getPages(CachingPageDao.java:400)
at com.atlassian.confluence.pages.DefaultPageManager.getPages(DefaultPageManager.java:1826)
at com.atlassian.confluence.pages.DefaultPageManager.removeAllPages(DefaultPageManager.java:610)
at sun.reflect.GeneratedMethodAccessor10693.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at com.atlassian.confluence.util.profiling.ConfluenceMonitoringMethodInterceptor.invoke(ConfluenceMonitoringMethodInterceptor.java:34)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
at com.sun.proxy.$Proxy124.removeAllPages(Unknown Source)
at com.atlassian.confluence.core.listeners.BundledContentSpaceRemovalListener.spaceIsBeingRemoved(BundledContentSpaceRemovalListener.java:56)
at sun.reflect.GeneratedMethodAccessor10689.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:40)
... 44 more
Caused by: 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:3315)
at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3552)
at org.hibernate.action.internal.EntityDeleteAction.execute(EntityDeleteAction.java:99)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:586)
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:460)
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:50)
at org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1389)
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1474)
at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1441)
at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1410)
at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernatePageDao.lambda$getPages$0(HibernatePageDao.java:164)
at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:359)
... 70 more
2019-01-29 14:29:16,103 WARN [hipchat-plugin-tasks-executor-0] [hipchat.spacetoroom.service.DefaultHipChatSynchronisationProcessor] run Unable to synchronise with Hipchat because the link has been removed.
2019-01-29 14:29:16,106 WARN [Long running task: Space removal long running task] [confluence.impl.hibernate.ConfluenceHibernateTransactionManager] doRollback Performing rollback. Transactions:
->[com.atlassian.confluence.spaces.DefaultSpaceManager.removeSpace]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT (Session #823219575)
-- space: 98317 | url: /spaces/doremovespace.action | traceId: 7037c52c4f6b8f6a | userName: <redacted> | referer: https://<redacted>/spaces/removespace.action?key=TSIT | action: doremovespace
2019-01-29 14:29:16,123 ERROR [Long running task: Space removal long running task] [confluence.util.longrunning.ConfluenceAbstractLongRunningTask] run Long running task "Space removal long running task" failed to run.
-- space: 98317 | url: /spaces/doremovespace.action | traceId: 7037c52c4f6b8f6a | userName: <redacted> | referer: https://<redacted>/spaces/removespace.action?key=TSIT | action: doremovespace
org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724)
at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at com.sun.proxy.$Proxy53.commit(Unknown Source)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:485)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:291)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at com.atlassian.confluence.util.profiling.ConfluenceMonitoringMethodInterceptor.invoke(ConfluenceMonitoringMethodInterceptor.java:34)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
at com.sun.proxy.$Proxy112.removeSpace(Unknown Source)
at com.atlassian.confluence.api.impl.service.longtasks.tasks.SpaceRemovalLongRunningTask.runInternal(SpaceRemovalLongRunningTask.java:36)
at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:26)
at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:52)
at com.atlassian.confluence.impl.util.concurrent.ConfluenceExecutors$ThreadLocalContextTaskWrapper.lambda$wrap$1(ConfluenceExecutors.java:90)
at com.atlassian.confluence.vcache.VCacheRequestContextOperations.lambda$doInRequestContext$0(VCacheRequestContextOperations.java:50)
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContextInternal(VCacheRequestContextManager.java:87)
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:71)
at com.atlassian.confluence.vcache.VCacheRequestContextOperations.doInRequestContext(VCacheRequestContextOperations.java:49)
at com.atlassian.confluence.vcache.VCacheRequestContextOperations.lambda$withRequestContext$2(VCacheRequestContextOperations.java:66)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Thanks for your assistance!
Hi @[deleted]
Please verify the following article and try to delete the space. Let us know the results.
Thanks
Yoga
Thank you for your interest, but the error on your linked article does not match the one I've posted:
java.lang.RuntimeException: 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. Listener: com.atlassian.confluence.core.listeners.BundledContentSpaceRemovalListener event: com.atlassian.confluence.event.events.space.SpaceWillRemoveEvent
The linked article error is:
java.lang.RuntimeException: Hibernate operation: could not delete: [com.atlassian.confluence.pages.Page#2459182]; SQL []; Cannot delete or update a parent row: a foreign key constraint fails (`confluence_test`.`notifications`, CONSTRAINT `FK594ACC88C38FBEA` FOREIGN KEY (`PAGEID`) REFERENCES `content` (`CONTENTID`)); nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`confluence_test`.`notifications`, CONSTRAINT `FK594ACC88C38FBEA` FOREIGN KEY (`PAGEID`) REFERENCES `content` (`CONTENTID`))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@[deleted] Did you end up resolving this? Having similar issues in version 6.15.2 with the same batch update returned unexpected row count error when attempting to delete a space.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Managed to delete the space, we had similar error to you Alan, but the key diagnostic info was slightly further down than what you have copied and pasted. Ours was related to an orphaned attachment, which was attached to a Marketplace App, specifically for Blogging that had been uninstalled.
e.g.
2019-05-01 09:13:25,384 ERROR [Long running task: Space removal long running task] [core.persistence.hibernate.HibernateObjectDao] ? Unable to index object: [net.seibertmedia.plugin.confluence.microblog:micropostContent] custom: Micropost: [redacted] > [redacted] v.1 (9221745) -- 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
We reinstalled the app with an eval, deleted the App's blog topic that was related to the orphaned attachment, checked the attachment had disappeared from the Space Tools and was able to delete the space after this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.