-
Bug
-
Resolution: Fixed
-
Medium
-
5.1
-
None
Steps to Reproduce
- Install a fresh Confluence 5.1 using MySQL datasouce
- Once the installation is completed, go to Confluence Admin > System Information and notice that the "Database Driver Name" is set to N/A, as shown in the following screenshot:
- Stop Confluence
- Start Confluence
Expected Results
Confluence should be able to start without any errors
Actual Results
Tomcat is throwing this NullPointerException instead and Confluence is not able to start
2013-04-02 16:04:42,334 ERROR [main] [atlassian.confluence.setup.ConfluenceConfigurationListener] contextInitialized An error was encountered while bootstrapping Confluence (see below): null java.lang.NullPointerException at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at com.atlassian.confluence.setup.DefaultBootstrapManager.isDriverPresent(DefaultBootstrapManager.java:257) at com.atlassian.confluence.setup.DefaultBootstrapManager.checkMySQLDriverIsPresent(DefaultBootstrapManager.java:240) at com.atlassian.confluence.setup.DefaultBootstrapManager.performPersistenceUpgrade(DefaultBootstrapManager.java:175) at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.init(DefaultAtlassianBootstrapManager.java:76) at com.atlassian.config.util.BootstrapUtils.init(BootstrapUtils.java:35) at com.atlassian.confluence.setup.ConfluenceConfigurationListener.initialiseBootstrapContext(ConfluenceConfigurationListener.java:90) at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(ConfluenceConfigurationListener.java:46) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Environment Information
Confluence 5.1
MySQL datasource (but we believe that this may occur in other databases too)
Findings
Confluence 5.1 and above requires hibernate.connection.driver_class property in confluence.cfg.xml when using datasource. In the previous Confluence versions, this property was not created and it was not a required property to start Confluence with datasource.
However, in Confluence 5.1, the hibernate.connection.driver_class property is required and it's throwing NullPointerException during the Bootstrap check because it's not able to find this property
Workaround
- Stop Confluence
- Add the following property in confluence.cfg.xml
- MySQL
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
- MS Server
<property name="hibernate.connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
- Oracle
<property name="hibernate.connection.driver_class">oracle.jdbc.OracleDriver</property>
- PostgreSQL
<property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
- MySQL
- Start Confluence
Hi spacelysprocketslimited, this ticket is for an issue that affected Confluence 5.1.0 and was subsequently resolved in 5.1.3. If you are experiencing this with Confluence 6.7.0, it is most likely a misconfiguration. Please contact Atlassian Support for help.
Regards,
Niraj Bhawnani
Development Team Lead, Confluence Server