Confluence 6 SQL Exception Problem Resolution

Source: Internet
Author: User
Tags ticket atlassian support log4j

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.

  1. 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.

  2. Restart confluence.

  3. Re-manipulate the steps you've seen in the wrong.

  4. Compress your log directory and add it to your support request ticket.

  5. 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.

  6. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.