Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-14040

FindSingleObject Uh oh - found more than one object when single object requested - globaldescription

      NOTE: This bug report is for Confluence Cloud. Using Confluence Server? See the corresponding bug report.

      This error appears in the logs when there's two items in the database:

      2008-12-20 18:17:23,697 ERROR [http-8080-Processor4] [com.atlassian.hibernate.HibernateObjectDao] findSingleObject Uh oh - found more than one object when single object requested: [globaldescription: v.1 (29687809), globaldescription: v.1 (29687810)]
      – url: /login.action | userName: anonymous

      The workaround is to delete one of the duplicate rows from the Content table, with ContentID being the value in parentheses.

            [CONFCLOUD-14040] FindSingleObject Uh oh - found more than one object when single object requested - globaldescription

            Hi everyone,

            Thank you for previously raising this bug and bringing it to our attention.

            Within our company roadmap and work capacity, we try to address or review each bug request but admit that not each one will be resolved. To continue the culture of being honest and open, we are closing this bug to focus on our upcoming roadmap for all Confluence users.

            As we continue to roll out features we do look at requests made by our users and if you feel like this bug is still impacting your team please let us know.

            Thank you again for providing valuable feedback to our team!

            Sunny Xu (Inactive) added a comment - Hi everyone, Thank you for previously raising this bug and bringing it to our attention. Within our company roadmap and work capacity, we try to address or review each bug request but admit that not each one will be resolved. To continue the culture of being honest and open, we are closing this bug to focus on our upcoming roadmap for all Confluence users. As we continue to roll out features we do look at requests made by our users and if you feel like this bug is still impacting your team please let us know. Thank you again for providing valuable feedback to our team!

            Any update on this?

            Same issue here with Gliffy diagrams

            Jens Kasperek (Bosch GmbH) added a comment - Any update on this? Same issue here with Gliffy diagrams

            Same issue on 5.10.7

            Michal Sladek added a comment - Same issue on 5.10.7

            Same issue on 5.9.6

            Michal Sladek added a comment - Same issue on 5.9.6

            It looks like this can impact notifications as well:

            atlassian-confluence.log.5:2016-08-29 07:50:33,664 ERROR [http-nio-8090-exec-501] [com.atlassian.hibernate.HibernateObjectDao] findSingleObject Uh oh - found more than one object when single object requested: [com.atlassian.confluence.mail.notification.Notification@5bf8439, com.atlassian.confluence.mail.notification.Notification@5bf843a] 
            

            Since they are in memory, there is no way to recover from this situation without loosing emails.

            Boris Berenberg [Uber] added a comment - It looks like this can impact notifications as well: atlassian-confluence.log.5:2016-08-29 07:50:33,664 ERROR [http-nio-8090-exec-501] [com.atlassian.hibernate.HibernateObjectDao] findSingleObject Uh oh - found more than one object when single object requested: [com.atlassian.confluence.mail.notification.Notification@5bf8439, com.atlassian.confluence.mail.notification.Notification@5bf843a]  Since they are in memory, there is no way to recover from this situation without loosing emails.

            An easy way to solve an uh oh error is to delete one the two attachments via the user interface:

            • Search on the attachment name you see in the logs
            • Go to the page containing the attachment
            • Go to the attachments
            • Sort by name and verify the attachment is there twice
            • delete one of them (this should have no impact on your page)

            Of course, you have to to this one by one, so if you have hundreds of double attachments, it may take a while to do this

            Kristof Vandermeersch added a comment - An easy way to solve an uh oh error is to delete one the two attachments via the user interface: Search on the attachment name you see in the logs Go to the page containing the attachment Go to the attachments Sort by name and verify the attachment is there twice delete one of them (this should have no impact on your page) Of course, you have to to this one by one, so if you have hundreds of double attachments, it may take a while to do this

            Steps to reproduce

            1. Upload attachment to page.
            2. Upload attachment to page again
            3. Look to DB
              # select spaceid, pageid, title, version, lastmoddate, content_status from content 
              where contenttype='ATTACHMENT' and title='4AA1-7850ENW-datasheet.pdf' order by lastmoddate;
               spaceid |  pageid   |           title            | version |       lastmoddate       | content_status
              ---------+-----------+----------------------------+---------+-------------------------+----------------
                    38 | 126156803 | 4AA1-7850ENW-datasheet.pdf |       1 | 2016-05-18 15:51:02.148 | current
                    38 | 126156803 | 4AA1-7850ENW-datasheet.pdf |       2 | 2016-05-18 15:51:29.152 | current
              
            4. Delete attachment in Attachments area
            5. Look to DB - only last version is deleted
                    38 | 126156803 | 4AA1-7850ENW-datasheet.pdf |       1 | 2016-05-18 15:51:02.148 | current
                    38 | 126156803 | 4AA1-7850ENW-datasheet.pdf |       2 | 2016-05-18 15:51:29.152 | deleted
              
            6. Upload attachment again - uh oh
                    38 | 126156803 | 4AA1-7850ENW-datasheet.pdf |       1 | 2016-05-18 15:51:02.148 | current
                    38 | 126156803 | 4AA1-7850ENW-datasheet.pdf |       2 | 2016-05-18 15:51:29.152 | deleted
                    38 | 126156803 | 4AA1-7850ENW-datasheet.pdf |       1 | 2016-05-18 15:53:18.876 | current
              

            Jozef Kotlár added a comment - Steps to reproduce Upload attachment to page. Upload attachment to page again Look to DB # select spaceid, pageid, title, version, lastmoddate, content_status from content where contenttype='ATTACHMENT' and title='4AA1-7850ENW-datasheet.pdf' order by lastmoddate; spaceid | pageid | title | version | lastmoddate | content_status ---------+-----------+----------------------------+---------+-------------------------+---------------- 38 | 126156803 | 4AA1-7850ENW-datasheet.pdf | 1 | 2016-05-18 15:51:02.148 | current 38 | 126156803 | 4AA1-7850ENW-datasheet.pdf | 2 | 2016-05-18 15:51:29.152 | current Delete attachment in Attachments area Look to DB - only last version is deleted 38 | 126156803 | 4AA1-7850ENW-datasheet.pdf | 1 | 2016-05-18 15:51:02.148 | current 38 | 126156803 | 4AA1-7850ENW-datasheet.pdf | 2 | 2016-05-18 15:51:29.152 | deleted Upload attachment again - uh oh 38 | 126156803 | 4AA1-7850ENW-datasheet.pdf | 1 | 2016-05-18 15:51:02.148 | current 38 | 126156803 | 4AA1-7850ENW-datasheet.pdf | 2 | 2016-05-18 15:51:29.152 | deleted 38 | 126156803 | 4AA1-7850ENW-datasheet.pdf | 1 | 2016-05-18 15:53:18.876 | current

            same issue for 5.8.x and 5.9.x

            Hans-Peter Geier added a comment - same issue for 5.8.x and 5.9.x

            This issue is now open for 7 years. See: https://jira.atlassian.com/browse/CONF-13480

            Are there any plans to work on this issue?

            Isn't there any workaround to prevent confluence from creating duplicate entries?

            Jens Kasperek (Bosch GmbH) added a comment - This issue is now open for 7 years . See: https://jira.atlassian.com/browse/CONF-13480 Are there any plans to work on this issue? Isn't there any workaround to prevent confluence from creating duplicate entries?

            Same for 5.7.6

            Intel CHD Jira Admin added a comment - Same for 5.7.6

            Same issue on Confluence 5.5.6 and 5.8.6

            Jens Kasperek (Bosch GmbH) (Inactive) added a comment - Same issue on Confluence 5.5.6 and 5.8.6

            Margarita Kolotilova added a comment - - edited

            hi,
            please clarify how to choose the record that should be deleted?
            the error I get:
            [com.atlassian.hibernate.HibernateObjectDao] findSingleObject Uh oh - found more than one object when single object requested: [globaldescription: v.1 (131074), globaldescription: v.1 (425986)]
            the item with Id = 425986 seems to be newer (just because its id is bigger) but at the same time this item in the database has earlier create and update dates than the item with id = 131074
            so which one should be deleted in this case? is there any criterion I should follow?

            Margarita Kolotilova added a comment - - edited hi, please clarify how to choose the record that should be deleted? the error I get: [com.atlassian.hibernate.HibernateObjectDao] findSingleObject Uh oh - found more than one object when single object requested: [globaldescription: v.1 (131074), globaldescription: v.1 (425986)] the item with Id = 425986 seems to be newer (just because its id is bigger) but at the same time this item in the database has earlier create and update dates than the item with id = 131074 so which one should be deleted in this case? is there any criterion I should follow?

            So what would one do in the case of many many instances of this error? I'm hearing write a big script.

            Alain Arduain added a comment - So what would one do in the case of many many instances of this error? I'm hearing write a big script.

            I think, If you created the page with older version with duplicate attachments and still you can see this error in latest versions when you view.

            Ishan Liyanage added a comment - I think, If you created the page with older version with duplicate attachments and still you can see this error in latest versions when you view.

            Jon Moser added a comment -

            Hello,

            I realize this is a pretty old ticket but just wanted to let you know that we are seeing this on 5.4.3.

            Thanks!

            Jon Moser added a comment - Hello, I realize this is a pretty old ticket but just wanted to let you know that we are seeing this on 5.4.3. Thanks!

            Jim Clark added a comment -

            Do you know why this is happening? Is the user clicking save multiple times? We're experiencing the same issue, not sure if this just started w/ 2.10.3, which we just upgraded to. It surprises me that multiple versions are allowed for a "piece" of content.

            Thanks,
            Jim

            Jim Clark added a comment - Do you know why this is happening? Is the user clicking save multiple times? We're experiencing the same issue, not sure if this just started w/ 2.10.3, which we just upgraded to. It surprises me that multiple versions are allowed for a "piece" of content. Thanks, Jim

            A similar error can also occur:

            ERROR [http-8080-14] [com.atlassian.hibernate.HibernateObjectDao] findSingleObject Uh oh - found more than one object
            when single object requested: [page: Release Notes v.48 (72909739), 
            page: Release Notes v.48 (72909740)]
            

            Here is SQL for Microsoft SQL that will resolve it:

            /* Per CONF-14040 (http://jira.atlassian.com/browse/CONF-14040), this can
               result from multiple content rows.
            */
            
               
            
            // Edit the WHERE clause to list the 2 contentid values listed in the error message (in parentheses),
            // then see which one is the LESS current (This is the one you will be deleting).
            SELECT * 
            FROM CONTENT
            WHERE contentid IN (72909739,72909740)
            
            // Given that ID, run the following SQL:
            // You may want to comment out the DELETE statement and UNcomment out the SELECT
            // statement to 'preview' what you will be deleting.
            DECLARE @id2Delete NUMERIC(19,0)
            SET @id2Delete = 72909739
            
            --SELECT *
            DELETE
            FROM attachmentdata WHERE attachmentid IN 
               (SELECT attachmentid FROM attachments WHERE PAGEID=@id2Delete)
            
            --SELECT *
            DELETE
            FROM attachments WHERE pageid = @id2Delete
            
            --SELECT *
            DELETE
            FROM bodycontent WHERE contentid = @id2Delete
            
            --SELECT *
            DELETE
            FROM content WHERE contentid = @id2Delete
            

            Betsy Walker added a comment - A similar error can also occur: ERROR [http-8080-14] [com.atlassian.hibernate.HibernateObjectDao] findSingleObject Uh oh - found more than one object when single object requested: [page: Release Notes v.48 (72909739), page: Release Notes v.48 (72909740)] Here is SQL for Microsoft SQL that will resolve it: /* Per CONF-14040 (http: //jira.atlassian.com/browse/CONF-14040), this can result from multiple content rows. */ // Edit the WHERE clause to list the 2 contentid values listed in the error message (in parentheses), // then see which one is the LESS current (This is the one you will be deleting). SELECT * FROM CONTENT WHERE contentid IN (72909739,72909740) // Given that ID, run the following SQL: // You may want to comment out the DELETE statement and UNcomment out the SELECT // statement to 'preview' what you will be deleting. DECLARE @id2Delete NUMERIC(19,0) SET @id2Delete = 72909739 --SELECT * DELETE FROM attachmentdata WHERE attachmentid IN (SELECT attachmentid FROM attachments WHERE PAGEID=@id2Delete) --SELECT * DELETE FROM attachments WHERE pageid = @id2Delete --SELECT * DELETE FROM bodycontent WHERE contentid = @id2Delete --SELECT * DELETE FROM content WHERE contentid = @id2Delete

            We're using filesystem storage for attachments so it wasn't necessary but thanks for pointing it out. That will definitely help others who are having this problem and use database storage for attachment data.

            Colin Kinder added a comment - We're using filesystem storage for attachments so it wasn't necessary but thanks for pointing it out. That will definitely help others who are having this problem and use database storage for attachment data.

            Thanks Colin. I think you'd need to delete the attachmentdata as well, if the attachments are stored on the database. The whole SQL would be:

            1. DELETE FROM ATTACHMENTDATA WHERE ATTACHMENTID IN (SELECT ATTACHMENTID FROM ATTACHMENTS WHERE PAGEID=ContentID_from_parentheses);
            2. DELETE FROM ATTACHMENTS WHERE PAGEID=ContentID_from_parentheses;
            3. DELETE FROM CONTENT WHERE CONTENTID=ContentID_from_parentheses;

            Jeremy Largman added a comment - Thanks Colin. I think you'd need to delete the attachmentdata as well, if the attachments are stored on the database. The whole SQL would be: DELETE FROM ATTACHMENTDATA WHERE ATTACHMENTID IN (SELECT ATTACHMENTID FROM ATTACHMENTS WHERE PAGEID=ContentID_from_parentheses); DELETE FROM ATTACHMENTS WHERE PAGEID=ContentID_from_parentheses; DELETE FROM CONTENT WHERE CONTENTID=ContentID_from_parentheses;

            Colin Kinder added a comment - - edited

            The workaround here doesn't appear to be as easy as it sounds...

            DELETE FROM CONTENT WHERE CONTENTID=ContentID_from_parentheses;
            "Cannot delete or update a parent row: a foreign key constraint fails (`wiki`.`ATTACHMENTS`, CONSTRAINT `FK54475F908C38FBEA` FOREIGN KEY (`PAGEID`) REFERENCES `CONTENT` (`CONTENTID`))"

            Any suggestions?

            Edit: Nevermind, answered my own question by deleting the attachment that was associated with that id. So the SQL commands I ran were:
            DELETE FROM ATTACHMENTS WHERE PAGEID=ContentID_from_parentheses;
            DELETE FROM CONTENT WHERE CONTENTID=ContentID_from_parentheses;

            I ran these two commands only once for the CONTENTID that had been created with a later date.

            Colin Kinder added a comment - - edited The workaround here doesn't appear to be as easy as it sounds... DELETE FROM CONTENT WHERE CONTENTID=ContentID_from_parentheses; "Cannot delete or update a parent row: a foreign key constraint fails (`wiki`.`ATTACHMENTS`, CONSTRAINT `FK54475F908C38FBEA` FOREIGN KEY (`PAGEID`) REFERENCES `CONTENT` (`CONTENTID`))" Any suggestions? Edit: Nevermind, answered my own question by deleting the attachment that was associated with that id. So the SQL commands I ran were: DELETE FROM ATTACHMENTS WHERE PAGEID=ContentID_from_parentheses; DELETE FROM CONTENT WHERE CONTENTID=ContentID_from_parentheses; I ran these two commands only once for the CONTENTID that had been created with a later date.

              Unassigned Unassigned
              jlargman Jeremy Largman
              Affected customers:
              36 This affects my team
              Watchers:
              38 Start watching this issue

                Created:
                Updated:
                Resolved: