Unable to start Confluence due to unsupported version of MySQL
Problem
Confluence is not able to start. The following appears in the atlassian-confluence.log
:
2012-08-12 15:29:26,481 ERROR [scheduler_Worker-9] [org.quartz.core.ErrorLogger] schedulerError Job (DEFAULT.ClusterSafetyJob threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.springframework.transaction.TransactionSystemException: Could not roll back Hibernate transaction; nested exception is net.sf.hibernate.TransactionException: Rollback failed with SQL exception: ]
at org.quartz.core.JobRunShell.run(JobRunShell.java:210)
at com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool$1.run(ConfluenceQuartzThreadPool.java:20)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: org.springframework.transaction.TransactionSystemException: Could not roll back Hibernate transaction; nested exception is net.sf.hibernate.TransactionException: Rollback failed with SQL exception:
at org.springframework.orm.hibernate.HibernateTransactionManager.doRollback(HibernateTransactionManager.java:532)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.doRollbackOnCommitException(AbstractPlatformTransactionManager.java:873)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:760)
....
Caused by: net.sf.hibernate.TransactionException: Rollback failed with SQL exception:
at net.sf.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:91)
at org.springframework.orm.hibernate.HibernateTransactionManager.doRollback(HibernateTransactionManager.java:529)
... 17 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed by the driver.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.Util.getInstance(Util.java:381)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1012)
....
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet successfully received from the server was 26,428 milliseconds ago. The last packet sent successfully to the server was 26,428 milliseconds ago.
at sun.reflect.GeneratedConstructorAccessor419.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1119)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3057)
....
Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2502)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2954)
... 36 more
Cause
You are running MySQL that is not supported by Confluence. Please note that there is a known MySQL bug in the earlier versions of MySQL (5.1.32 - 5.1.36)
Resolution
Upgrade your database server to the supported version. Please check the Supported Platforms page for more information.
Resolution 2
In case you are using a supported version of MySQL and are still facing the above errors, please try the following:
- Shutdown Confluence.
- Shutdown your MySQL database.
- Download the latest version of MySQL driver from this page.
- Remove the mysql-connector-java-*.jar from the <CONFLUENCE INSTALL>\lib\ directory.
- Copy the newly downloaded mysql driver jar file to the <CONFLUENCE INSTALL>\lib\ directory.
- Start your MySQL database.
- Start Confluence.