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

Multiple AttachmentData objects were returned when only one was expected

      See https://support.atlassian.com/browse/CSP-7087 for more details and a stack trace.

      I was not able to reproduce it by 'clicking the upload button twice' . Yet somehow there are multiple copies of AttachmentData.
      (reviewed by Sam)

      excerpt from the HibernateAttachmentDataDao.java l.65
      // TODO find a more appropriate exception
      if (dataObjects.size() > 1)
      throw new RuntimeException("Multiple AttachmentData objects were returned when only one was expected");

      Question remains - how possible multiple objects were created in the DB initially? Please investigate...

      The logs for this will say: "findSingleObject Uh oh - found more than one object when single object requested"

            [CONFSERVER-7882] Multiple AttachmentData objects were returned when only one was expected

            Sam Hall added a comment -

            On one occasion on v5.7.5 I was able to reproduce this by rapidly clicking the upload button on a server that was seemingly laggy. But I've not been able to cause this to happen reliably, usually the additional Upload button clicks just cause additional versions of the file, but sometimes it can cause multiple current versions of file with the same name. This suggests to me that a race condition is at play.

            Sam Hall added a comment - On one occasion on v5.7.5 I was able to reproduce this by rapidly clicking the upload button on a server that was seemingly laggy. But I've not been able to cause this to happen reliably, usually the additional Upload button clicks just cause additional versions of the file, but sometimes it can cause multiple current versions of file with the same name. This suggests to me that a race condition is at play.

            I've just seen this error on a Confluence 5.7.

            Jacob Saaby Nielsen added a comment - I've just seen this error on a Confluence 5.7.

            still the same in 5.8.18.
            Atlassian, you should either re-open the ticket or clone it. This is not 'resolved'.

            Hans-Peter Geier added a comment - still the same in 5.8.18. Atlassian, you should either re-open the ticket or clone it. This is not 'resolved'.

            as do we, in 5.8.14. Is there a resolution, if the original error was fixed, to fix the data?

            Paula Manildi added a comment - as do we, in 5.8.14. Is there a resolution, if the original error was fixed, to fix the data?

            Same here on 5.8.10.

            Mary Washburn added a comment - Same here on 5.8.10.

            Same here on 5.9.4

            Kerem Caglar [Solveka] added a comment - Same here on 5.9.4

            Nil Plana added a comment -

            We get this error on 5.9.4

            Nil Plana added a comment - We get this error on 5.9.4

            We get this on 5.8.4

            MEDITECH ADMIN TEAM added a comment - We get this on 5.8.4

            I get this on 5.8.10 too

            Juan Jose del Rio added a comment - I get this on 5.8.10 too

            I just got this on 5.8.10 of Confluence as well.

            Michael Brinson added a comment - I just got this on 5.8.10 of Confluence as well.

              don.willis@atlassian.com Don Willis
              ivan@atlassian.com Ivan Benko [Atlassian]
              Affected customers:
              12 This affects my team
              Watchers:
              33 Start watching this issue

                Created:
                Updated:
                Resolved: