Multiple AttachmentData objects were returned when only one was expected for attachment
症状
- Cannot rebuild indicies from scratch after upgrade
- Cannot search successfully
atlassian-confluence.log
に次のエラーが返される。
org.springframework.dao.IncorrectResultSizeDataAccessException: Multiple AttachmentData objects were returned when only one was expected for attachment: Attachment: <attachment name and id>
at com.atlassian.confluence.pages.persistence.dao.hibernate.HibernateAttachmentDataDao.getAttachmentDataForAttachment(HibernateAttachmentDataDao.java:77)
原因
There are duplicates in the attachmentdata table, most likely due to this bug - CONF-7882Getting issue details... STATUS
ソリューション
Identify duplicates from attachmentdata table in the database
select attachmentdataid, attachmentid, attversion, count(*) from ATTACHMENTDATA group by attachmentid, attachmentdataid, attversion having count(*)>1;
Delete the duplicates that have the same attachmentid and attversion, leaving the version which has the greatest attachmentdataid:
delete from ATTACHMENTDATA where attachmentdataid=<put in attachmentdataids here>;
- Last step is to How to Rebuild the Content Indexes From Scratch on Confluence Server
Last modified on Mar 30, 2016
Powered by Confluence and Scroll Viewport.