If you get an exception similar to those shown below, it is a good idea to increase the logging levels of your Confluence instance. If you request Atlassian support, this additional logging will help us work out the cause of the error.

ログ レベルを上げると、以下のようなエラーの診断が可能になります。

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) 

または

(HibernateTemplate): data integrity violated by SQL ''; nested exception is java.sql.BatchUpdateException: ORA-00001: unique constraint (CONFLUENCE.SYS_C0012345) violated

このドキュメントでは、システムのログを増加させる手順を説明します。

With Confluence 2.7 and later, you can adjust logging levels at runtime via the Administration Console — read the instructions. Below we tell you how to edit the log4j files directly.

  1. confluence/WEB-INF/classes/log4j.properties を開き、以下の行のコメント化を解除します。2 つの ## がある行はコメントなので、このままにしておきます。
    ## log hibernate prepared statements/SQL queries (equivalent to setting 'hibernate.show_sql' to 'true')
    #log4j.logger.net.sf.hibernate.SQL=DEBUG, confluencelog
    #log4j.additivity.net.sf.hibernate.SQL=false
    
    ## log hibernate prepared statement parameter values
    #log4j.logger.net.sf.hibernate.type=DEBUG, confluencelog
    #log4j.additivity.net.sf.hibernate.type=false
    
    (info) If you can not locate these lines in your log4j.properties file, please add them to the end of it.
  2. Confluence を再起動します。
  3. エラーの原因となった手順を再度実行します。
  4. ログ ディレクトリを zip 化し、サポート チケットに添付します。
  5. If you are using Oracle and received a constraint error, please ask your database adminstrator which table and column the constraint (that is, CONFLUENCE.SYS_C0012345) refers to and add that information to your support ticket.
  6. confluence/WEB-INF/classes/log4j.properties を再度開いて、手順 1 で追加した 4 行を削除します (追加のログ取得はパフォーマンスに影響を与えるため、この手順が完了したら無効にする必要があります)。
関連トピック

Enabling detailed SQL logging
Working with Confluence Logs
Troubleshooting failed XML site backups