Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-15232

Trash can't be emptied when pages with Gliffy attachments are present in the trash

XMLWordPrintable

       -- url: /pages/doemptytrash.action | userName: igorminar | referer: http://wikis.sun.com/pages/emptytrash.action?key=help
      org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not delete: [com.atlassian.confluence.pages.Attachment#48366003]; SQL []; Cannot delete or update a parent row: a foreign key constraint fails (`wikis_emergency/ATTACHMENTDATA`, CONSTRAINT `FK9DC3E34D34A4917E` FOREIGN KEY (`ATTACHMENTID`) REFERENCES `ATTACHMENTS` (`ATTACHMENTID`)); nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`wikis_emergency/ATTACHMENTDATA`, CONSTRAINT `FK9DC3E34D34A4917E` FOREIGN KEY (`ATTACHMENTID`) REFERENCES `ATTACHMENTS` (`ATTACHMENTID`))
      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`wikis_emergency/ATTACHMENTDATA`, CONSTRAINT `FK9DC3E34D34A4917E` FOREIGN KEY (`ATTACHMENTID`) REFERENCES `ATTACHMENTS` (`ATTACHMENTID`))
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
              at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
              at com.mysql.jdbc.Util.getInstance(Util.java:381)
              at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1016)
              at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3376)
              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3308)
              at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1837)
              at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1961)
              at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2543)
              at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1737)
              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2022)
              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1940)
              at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1925)
              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:2449)
              at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2435)
              at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2397)
              at net.sf.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1821)
              at net.sf.hibernate.impl.SessionImpl.findBySQL(SessionImpl.java:3863)
              at net.sf.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:52)
              at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernatePageDao$4.doInHibernate(HibernatePageDao.java:464)
              at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370)
              at org.springframework.orm.hibernate.HibernateTemplate.executeFind(HibernateTemplate.java:341)
              at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernatePageDao.getDescendents(HibernatePageDao.java:454)
              at com.atlassian.confluence.pages.DefaultPageManager.getDescendents(DefaultPageManager.java:162)
              at com.atlassian.confluence.pages.DefaultPageManager.removePageFromAncestorCollections(DefaultPageManager.java:196)
              at sun.reflect.GeneratedMethodAccessor1989.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
              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:20)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
              at $Proxy21.removePageFromAncestorCollections(Unknown Source)
              at com.atlassian.confluence.pages.Page.remove(Page.java:204)
              at com.atlassian.confluence.pages.DefaultTrashManager.emptyTrash(DefaultTrashManager.java:31)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
              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:20)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
              at $Proxy61.emptyTrash(Unknown Source)
              at com.atlassian.confluence.pages.actions.EmptyTrashAction.execute(EmptyTrashAction.java:12)
      ....
      

              ple Phong Quoc Le (Inactive)
              15d9a6950818 Igor Minar
              Votes:
              6 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: