I'm getting these errors when a performing a daily backup (running the backup job or manually) in Confluence. However as soon as I unselect "Backup attachments" the error goes away. So it must be related to #83099657 (see below).
my confluence version is 8.5.12 (data center).
Is there any way to locate this id and what is it?
Any help would be appreciated!
2024-11-10 09:48:41,945 ERROR [Caesium-1-1] [confluence.impl.importexport.AbstractXmlExporter] backupEntities Couldn't backup database data. org.hibernate.FetchNotFoundException: Entity `com.atlassian.confluence.core.ContentEntityObject` with identifier value `83099657` does not exist at org.hibernate.type.ManyToOneType.resolve(ManyToOneType.java:268) at org.hibernate.engine.internal.TwoPhaseLoad$EntityResolver.lambda$static$0(TwoPhaseLoad.java:576) at org.hibernate.engine.internal.TwoPhaseLoad.initializeEntityEntryLoadedState(TwoPhaseLoad.java:221) at org.hibernate.engine.internal.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:155) at org.hibernate.engine.internal.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:126) at org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.performTwoPhaseLoad(AbstractRowReader.java:221) at org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.finishUp(AbstractRowReader.java:187) at org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl.extractResults(ResultSetProcessorImpl.java:96) at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:105) at org.hibernate.loader.entity.plan.AbstractLoadPlanBasedEntityLoader.load(AbstractLoadPlanBasedEntityLoader.java:285) 2024-11-10 09:48:41,950 ERROR [Caesium-1-1] [confluence.importexport.impl.BackupJob] runJob Error while running the scheduled backup com.atlassian.confluence.importexport.ImportExportException: Couldn't backup database data. at com.atlassian.confluence.impl.importexport.AbstractXmlExporter.backupEntities(AbstractXmlExporter.java:222) at com.atlassian.confluence.impl.importexport.AbstractXmlExporter.backupEverything(AbstractXmlExporter.java:105) at com.atlassian.confluence.impl.importexport.AbstractFileXmlExporter.backupEverything(AbstractFileXmlExporter.java:99) Caused by: org.hibernate.FetchNotFoundException: Entity `com.atlassian.confluence.core.ContentEntityObject` with identifier value `83099657` does not exist at org.hibernate.type.ManyToOneType.resolve(ManyToOneType.java:268) at org.hibernate.engine.internal.TwoPhaseLoad$EntityResolver.lambda$static$0(TwoPhaseLoad.java:576) at org.hibernate.engine.internal.TwoPhaseLoad.initializeEntityEntryLoadedState(TwoPhaseLoad.java:221) ... 33 more
2024-11-10 09:48:41,951 WARN [Caesium-1-1] [impl.schedule.caesium.JobRunnerWrapper] runJob Scheduled job BackupJob#BackupJob-runNow-1731219362863 failed with response JobRunnerResponse[runOutcome=FAILED,message='ImportExportException: Couldn't backup database data.\nFetchNotFoundException: Entity `com.atlassian.confluence.core.ContentEntityObject` with identifier value `83099657` does not exist']
@Amir Hosseini - After confirming the entity's absence, investigate related tables for orphaned references to the missing entity with ID 83099657. Run database queries to check for lingering connections:
Search content labels and attachments by executing:
SELECT * FROM content_label WHERE contentid = 83099657;
SELECT * FROM attachments WHERE contentid = 83099657;
If orphaned references are found, consider removing them to maintain database consistency and prevent potential issues. Eliminating these unnecessary links will help ensure data integrity
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The Confluence error message indicates that the backup process is failing due to a missing or corrupted database entry, specifically an attachment record with the identifier 83099657. This entity, a ContentEntityObject, cannot be located, preventing the backup from completing successfully when "Backup attachments" is selected.
If no results are returned, it confirms that the entity is missing or deleted, causing the FetchNotFoundException. This insight will guide further investigation to resolve the issue.
Hope this helps - Happy to help further!!
Thank you very much and have a great one!
Warm regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Humashankar VJ
Thank you for your reply
I tried the queries you mentioned and it didn't give any results.
I did a full text search on the database to see where this ID was used. I think it is related to this table "AO_7B47A5_EVENT".
SELECT * FROM "AO_7B47A5_EVENT" WHERE "CONTENT_ID" = 83099657;
The AO_7B47A5_EVENT table in Confluence stores data for Confluence Analytics, including information about page views and edits, and when a page was deleted.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This analysis indicates that the issue is from a deleted content entity still referenced in Confluence Analytics. Specifically, ContentEntityObject ID 83099657 is missing from main content tables but remains in the AO_7B47A5_EVENT table.
This discrepancy causes backup failures when including attachments, as the process attempts to reference the non-existent content.
Give a try with the below listed pointers:
1. Back up your database before proceeding.
2. Remove orphaned references from AO_7B47A5_EVENT: DELETE FROM "AO_7B47A5_EVENT" WHERE "CONTENT_ID" = 83099657.
3. Retry the backup with attachments.
4. If successful, consider reindexing the database for data consistency: Go to Confluence Admin > Content Indexing and click "Rebuild search index."
Best Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.