System Error Uploading Profile Picture

Symptoms

When uploading a profile picture, the following appears in Confluence:

System Error
A system error has occurred - our apologies\!
Please contact your Confluence administrator to create a support issue on our support system at [http://support.atlassian.com] with the following information:

a description of your problem and what you were doing at the time it occurred
cut & paste the error and system information found below
attach the application server log file (if possible).

We will respond as promptly as possible.
Thank you\!
Cause:
java.lang.RuntimeException: There was a problem retrieving the previous version of the Attachment data for Attachment 'Attachment: null v.1 (179667215)'.
at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernateAttachmentDataDao.saveDataForAttachmentVersion(HibernateAttachmentDataDao.java:141)
caused by: com.atlassian.confluence.pages.AttachmentDataNotFoundException: No AttachmentData object was returned when it was expected
at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernateAttachmentDataDao.getAttachmentDataForAttachment(HibernateAttachmentDataDao.java:63)

Stack Trace: [hide\]

java.lang.RuntimeException: There was a problem retrieving the previous version of the Attachment data for Attachment 'Attachment: null v.1 (179667215)'.
at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernateAttachmentDataDao.saveDataForAttachmentVersion(HibernateAttachmentDataDao.java:141)
at com.atlassian.confluence.pages.persistence.dao.hibernate.AbstractHibernateAttachmentDao.saveNewAttachmentVersion(AbstractHibernateAttachmentDao.java:204)
at com.atlassian.confluence.pages.DefaultAttachmentManager.saveNewAttachmentVersion(DefaultAttachmentManager.java:55)
at com.atlassian.confluence.pages.AbstractAttachmentManager.saveAttachment(AbstractAttachmentManager.java:89)
at com.atlassian.confluence.pages.DelegatorAttachmentManager.saveAttachment(DelegatorAttachmentManager.java:87)
at sun.reflect.GeneratedMethodAccessor1705.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)

Cause

There was a problem retrieving the previous version of the Attachment data.

Resolution

Always backup your data before performing any modifications to the database.

  1. List the affected profile pictures:

    SELECT * from attachments where TITLE='<profile picture>' and CREATOR='<user>' and ATTACHMENT_COMMENT='Uploaded Profile Picture';
    
  2. Remove the record from the database:

    DELETE FROM attachments where ATTACHMENTID='<attachmentid>';
    

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport