If you get a message similar to what is shown below, then you might want to consider modifying the confluence log level to output more information. If you're looking for help with Atlassian support, these detailed error messages can help us find the cause of the problem better.
Increasing the level of the log will allow us to diagnose the following issues:
org.springframework.dao.DataIntegrityViolationException: (HibernateTemplate): data integrity violated by SQL
''
; nested exception is java.sql.BatchUpdateException: Duplicate entry
'1234' for key
1
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:
88
)
caused by: java.sql.BatchUpdateException: Duplicate entry
'1234' for key
1
at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:
647
)
|
Or
(HibernateTemplate): data integrity violated by SQL '' ; nested exception is java.sql.BatchUpdateException: ORA- 00001 : unique constraint (CONFLUENCE.SYS_C0012345) violated |
This document explains how to increase the log level in your system and let the log output more detailed information.
Changing the logging levels via the administration Console
Starting with Confluence 2.7, you can adjust the level of the log in your Confluence Administrator console-read about the working with Confluence Logs page. Below we will show you how to edit the log4j file directly.
Open confluence/WEB-INF/classes/log4j.properties
and uncomment the line below. # # line is a comment, please keep this line intact.
## log hibernate prepared statements/SQL queries (equivalent to setting 'hibernate.show_sql' to 'true' ) #log4j.logger.net.sf.hibernate.SQL=DEBUG ## log hibernate prepared statement parameter values #log4j.logger.net.sf.hibernate.type=DEBUG |
If you cannot log4j.properties
find the above content in your file, please add it at the end of the document.
Restart confluence.
Re-manipulate the steps you've seen in the wrong.
Compress your log directory and add it to your support request ticket.
If you are using an Oracle database and you receive a constraint error, ask your database administrator which database table and column have constraints (for example: CONFLUENCE.SYS_C0012345
), and then add the content to your ticket when you get the relevant information.
Open the confluence/WEB-INF/classes/log4j.properties
file, delete the above 4 lines added in the first step (let confluence output more log information will affect the performance of the confluence, in the production environment, you should not output this information).
Related Topics
Enabling detailed SQL Logging
Working with Confluence Logs
Troubleshooting Failed XML Site backups
Https://www.cwiki.us/display/CONF6ZH/Troubleshooting+SQL+Exceptions
Confluence 6 SQL Exception Problem Resolution