Multiple AttachmentData objects were returned when only one was expected for attachment

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

  1. Cannot rebuild indicies from scratch after upgrade
  2. 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-7882 - Getting issue details... STATUS

ソリューション

  1. Identify duplicates from attachmentdata table in the database

    select attachmentdataid, attachmentid, attversion, count(*) from ATTACHMENTDATA group by attachmentid, attachmentdataid, attversion having count(*)>1;
  2. 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>;
  3. 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.