You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I have added some questions manually to the confluence database 'Content' and other related tables. The question gets added and displayed accurately. But commenting , adding answers to the question, asking new questions do not work and throw the following error.
org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not insert: [com.atlassian.confluence.core.BodyContent#9470043]; SQL ; ORA-00001: unique constraint (CONFLUENCE0707.SYS_C00137563) violated; nested exception is java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (CONFLUENCE0707.SYS_C00137563) violated
I've checked the cause for this and it seems to be due to confluence maintaining the max ID of the content table pre-record insertion. So obviously as I have manually entered a record for that ID, an error is thrown. The workaround for this was to refresh the ask questions page till the content ID
exceeds the actual max ID of the content table. I've also tried re-indexing confluence and committing the database to no avail.
The question is:
How does confluence get the next ID for the content/ BodyContent table when a user tries to add a question and why does it keep incorrect values for the maxID . Also how could this error be eliminated.
Your suggestions on this would be much appreciated.
You should not have inserted anything into the database, especially while it was running.
I would strongly recommend stopping confluence, removing what you added, restart it, reindex it and then do your inserts via the API.
It's keeping "incorrect values" because you've told it to basically.