Cannot delete spaces

Hello,

I have a problem with not being able to dele spaces in Confluence. After trying to delete them it is like notthing hav happended, and the space is still operational.

Here is what I can see in the log file. Anyone that have an idea what to do?

Thanks.

2014-03-17 08:43:18,203 ERROR [Long running task: Space removal long running task] [sf.hibernate.util.JDBCExceptionReporter] logExceptions The DELETE statement conflicted with the REFERENCE constraint "FK594ACC88C38FBEA". The conflict occurred in database "Confluence", table "dbo.NOTIFICATIONS", column 'PAGEID'.
 -- space: 3276807 | url: /confluence/spaces/doremovespace.action | userName: christian.maske | referer: http://22asapp01:8090/confluence/spaces/removespace.action?key=UT | action: doremovespace
2014-03-17 08:43:18,203 ERROR [Long running task: Space removal long running task] [sf.hibernate.impl.SessionImpl] execute Could not synchronize database state with session
 -- space: 3276807 | url: /confluence/spaces/doremovespace.action | userName: christian.maske | referer: http://22asapp01:8090/confluence/spaces/removespace.action?key=UT | action: doremovespace
2014-03-17 08:43:18,203 ERROR [Long running task: Space removal long running task] [atlassian.event.internal.AsynchronousAbleEventDispatcher] run There was an exception thrown trying to dispatch event 'com.atlassian.confluence.event.events.space.SpaceWillRemoveEvent[source=com.atlassian.confluence.spaces.DefaultSpaceManager@70e53f46]' from the invoker 'SingleParameterMethodListenerInvoker{method=public void com.atlassian.confluence.core.listeners.BundledContentSpaceRemovalListener.spaceIsBeingRemoved(com.atlassian.confluence.event.events.space.SpaceWillRemoveEvent), listener=com.atlassian.confluence.core.listeners.BundledContentSpaceRemovalListener@63b6e435}'.
 -- space: 3276807 | url: /confluence/spaces/doremovespace.action | userName: christian.maske | referer: http://22asapp01:8090/confluence/spaces/removespace.action?key=UT | action: doremovespace
java.lang.RuntimeException: Hibernate operation: could not delete: [com.atlassian.confluence.pages.Page#3080234]; SQL []; The DELETE statement conflicted with the REFERENCE constraint "FK594ACC88C38FBEA". The conflict occurred in database "Confluence", table "dbo.NOTIFICATIONS", column 'PAGEID'.; nested exception is java.sql.SQLException: The DELETE statement conflicted with the REFERENCE constraint "FK594ACC88C38FBEA". The conflict occurred in database "Confluence", table "dbo.NOTIFICATIONS", column 'PAGEID'.
	at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54)
	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:66)
	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:32)
	at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:60)
	at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:160)
	at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:79)
	at com.atlassian.confluence.spaces.DefaultSpaceManager.removeSpace(DefaultSpaceManager.java:152)
	at com.atlassian.confluence.spaces.DefaultSpaceManager.removeSpace(DefaultSpaceManager.java:120)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at com.atlassian.confluence.util.profiling.JavaSimonMethodInterceptor.invoke(JavaSimonMethodInterceptor.java:52)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at com.sun.proxy.$Proxy62.removeSpace(Unknown Source)
	at com.atlassian.confluence.spaces.actions.RemoveSpaceAction$SpaceRemovalLongRunningTask.runInternal(RemoveSpaceAction.java:91)
	at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:26)
	at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:35)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not delete: [com.atlassian.confluence.pages.Page#3080234]; SQL []; The DELETE statement conflicted with the REFERENCE constraint "FK594ACC88C38FBEA". The conflict occurred in database "Confluence", table "dbo.NOTIFICATIONS", column 'PAGEID'.; nested exception is java.sql.SQLException: The DELETE statement conflicted with the REFERENCE constraint "FK594ACC88C38FBEA". The conflict occurred in database "Confluence", table "dbo.NOTIFICATIONS", column 'PAGEID'.
	at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:100)
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
	at org.springframework.orm.hibernate.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:364)
	at org.springframework.orm.hibernate.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:351)
	at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:375)
	at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:337)
	at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernateBlogPostDao.getBlogPosts(HibernateBlogPostDao.java:114)
	at com.atlassian.confluence.pages.DefaultPageManager.getBlogPosts(DefaultPageManager.java:106)
	at com.atlassian.confluence.pages.DefaultPageManager.removeAllBlogPosts(DefaultPageManager.java:286)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at com.atlassian.confluence.util.profiling.JavaSimonMethodInterceptor.invoke(JavaSimonMethodInterceptor.java:52)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at com.sun.proxy.$Proxy57.removeAllBlogPosts(Unknown Source)
	at com.atlassian.confluence.core.listeners.BundledContentSpaceRemovalListener.spaceIsBeingRemoved(BundledContentSpaceRemovalListener.java:58)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36)
	... 31 more
Caused by: java.sql.SQLException: The DELETE statement conflicted with the REFERENCE constraint "FK594ACC88C38FBEA". The conflict occurred in database "Confluence", table "dbo.NOTIFICATIONS", column 'PAGEID'.
	at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
	at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2816)
	at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2254)
	at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:631)
	at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:584)
	at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:546)
	at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:505)
	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
	at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
	at net.sf.hibernate.persister.EntityPersister.delete(EntityPersister.java:581)
	at net.sf.hibernate.impl.ScheduledDeletion.execute(ScheduledDeletion.java:29)
	at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2464)
	at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2450)
	at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2412)
	at net.sf.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1836)
	at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1593)
	at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1558)
	at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49)
	at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernateBlogPostDao$1.doInHibernate(HibernateBlogPostDao.java:128)
	at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernateBlogPostDao$1.doInHibernate(HibernateBlogPostDao.java:115)
	at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370)
	... 56 more
2014-03-17 08:43:18,235 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: 3276807 | url: /confluence/spaces/doremovespace.action | userName: christian.maske | referer: http://22asapp01:8090/confluence/spaces/removespace.action?key=UT | 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:695)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at com.atlassian.confluence.util.profiling.JavaSimonMethodInterceptor.invoke(JavaSimonMethodInterceptor.java:52)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at com.sun.proxy.$Proxy62.removeSpace(Unknown Source)
	at com.atlassian.confluence.spaces.actions.RemoveSpaceAction$SpaceRemovalLongRunningTask.runInternal(RemoveSpaceAction.java:91)
	at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:26)
	at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:35)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

2 answers

Hello Christian,

I'm afraid to say that you are hitting by the bug with ticket number: CONF-31879 .

I would like to recommend you to watch the ticket for any updates and workaround.

Let me know if you have any questions.

Cheers,

Saleh

Hello Saleh,
Thank you for your reply.

I can see that the status of the issue is Resolved with resolution Fixed, and it will 5.4.4 is fix version. Does this mean that the problem will be gone when upgrading to 5.4.4?

Do you know when 5.4.4 will be released?

Cheers,
Christian

Hi Christian,

You are most welcome.

This bug report mentioned that the "affects versions: 5.3.1,5.3.4,5.4.1" and most probably on 5.4.2 . I don't know what version of Confluence are you using but I know the latest version is 5.4.3 that realeased on 18th Feburary 2014.

Unfortunately I don't know when 5.4.4 will be released.

Let me know if you have any other questions,

Cheers,

Saleh

Hi Saleh,
I think the bug is not fixed yet.

We have 5.4.1 productive and 5.5.2 on our staging server. In 5.4.1, we cannot delete spaces but we can purge pages. In 5.5.2, we cannot delete spaces + we cannot purge pages. I will raise a support request.

Regards,

Evelin

I thougth deleting spaces in Confluence isn't possible.

You can remove them, butt then will all the underlying pages be moved to the page above the removed one.

You can move all the (junk)pages under 1 central (junk) page. Then import a Word file at tools and let it remove all the underlying pages. Now you can quick remove the 1 top page.

OR you can move all the junkpages to 1 (new) (junk)space and than delete the space.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,107 views 17 14
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you