Confluence 2.5 has reached end of life
Check out the [latest version] of the documentation
These instructions increase Confluence's logging to report individual requests being sent to the database by Hibernate. It is useful for troubleshooting:
- XML site backups that fail to import
- Exceptions caused by an illegal database operation
To do this in Confluence, you need to modify log4j.properties, located in confluence/WEB-INF/classes.
If you require support assistance with a database related problem, it is advisable to enable hibernate logging prior sending us the log files. It will assists us determining what SQL queries were running during the reported problem.
To log SQL queries
Stop Confluence, then uncomment the following lines in log4j.properties:
## 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
To log SQL queries with parameters
Stop Confluence, then uncomment the following lines in log4j.properties:
## log hibernate prepared statement parameter values log4j.logger.net.sf.hibernate.type=DEBUG, confluencelog log4j.additivity.net.sf.hibernate.type=false
To disable batched updates (for simpler debugging)
Stop Confluence, then edit confluence/WEB-INF/classes/databaseSubsystemContext.xml and uncomment the following <prop> line:
<!-- it can be useful to disable batching during debugging, as HSQLDB doesn't report the exact statement which fails in batch mode --> <prop key="hibernate.jdbc.batch_size">0</prop>
