Error in pages ask question, comment, save after DB Update

Hi, 

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 

[com.atlassian.confluence.core.BodyContent#9470043];

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.

Thanks

 

1 answer

0 vote

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. 

Suggest an answer

Log in or Join to answer
Community showcase
Emilee Spencer
Published yesterday in Marketplace Apps

Marketplace Spotlight: DeepAffects

Hello Atlassian Community! My name is Emilee, and I’m a Product Marketing Manager for the Marketplace team. Starting with this post, I'm kicking off a monthly series of Spotlights to highlight Ma...

37 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot