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

Cannot delete user from EAC due to attachmentdata table constraint

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Medium
    • None
    • 3.0
    • None

    Description

      I created a new user on EAC, and all I did with it was.. create a Taskdoc entry, as far as I remember. Then I tried to delete the user again, but get this message. I logged back in, removed my taskdock entry, and tried again, same problem. Could be taskdock, could be something entirely different. It sucks though

      
      org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not delete: [com.atlassian.confluence.pages.Attachment#1778090269]; SQL []; ERROR: update or delete on table "attachments" violates foreign key constraint "fk9dc3e34d34a4917e" on table "attachmentdata" Detail: Key (attachmentid)=(1778090269) is still referenced from table "attachmentdata".; nested exception is org.postgresql.util.PSQLException: ERROR: update or delete on table "attachments" violates foreign key constraint "fk9dc3e34d34a4917e" on table "attachmentdata" Detail: Key (attachmentid)=(1778090269) is still referenced from table "attachmentdata".
          at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:110)
      
      caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "attachments" violates foreign key constraint "fk9dc3e34d34a4917e" on table "attachmentdata" Detail: Key (attachmentid)=(1778090269) is still referenced from table "attachmentdata".
          at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1608)
      Stack Trace:[hide]
      
      org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not delete: [com.atlassian.confluence.pages.Attachment#1778090269]; SQL []; ERROR: update or delete on table "attachments" violates foreign key constraint "fk9dc3e34d34a4917e" on table "attachmentdata"
        Detail: Key (attachmentid)=(1778090269) is still referenced from table "attachmentdata".; nested exception is org.postgresql.util.PSQLException: ERROR: update or delete on table "attachments" violates foreign key constraint "fk9dc3e34d34a4917e" on table "attachmentdata"
        Detail: Key (attachmentid)=(1778090269) is still referenced from table "attachmentdata".
      Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "attachments" violates foreign key constraint "fk9dc3e34d34a4917e" on table "attachmentdata"
        Detail: Key (attachmentid)=(1778090269) is still referenced from table "attachmentdata".
      	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1608)
      	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1343)
      	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:195)
      	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
      	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:351)
      	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:305)
      	at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
      	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$5.doInHibernate(HibernatePageDao.java:538)
      	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:528)
      	at com.atlassian.confluence.pages.persistence.dao.hibernate.CachingPageDao.getDescendents(CachingPageDao.java:184)
      	at com.atlassian.confluence.core.DefaultContentPermissionManager.reindexContent(DefaultContentPermissionManager.java:51)
      	at com.atlassian.confluence.core.DefaultContentPermissionManager.removeContentPermission(DefaultContentPermissionManager.java:181)
      	at com.atlassian.confluence.core.DefaultContentPermissionManager.removeContentPermissions(DefaultContentPermissionManager.java:204)
      	at com.atlassian.confluence.core.DefaultContentPermissionManager.removeAllUserPermissions(DefaultContentPermissionManager.java:196)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      
      

      Attachments

        Issue Links

          Activity

            People

              shaffenden Steve Haffenden (Inactive)
              pfragemann Per Fragemann [Atlassian]
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: