java.lang.NullPointerException

Atlassian JIRA | Amalia Sanusi [Atlassian] | 4 years ago
  1. 0

    h4. Steps to Reproduce # Install a fresh Confluence 5.1 [using MySQL datasouce|https://confluence.atlassian.com/display/DOC/Configuring+a+MySQL+Datasource+in+Apache+Tomcat] # 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: !screenshot000.jpg! # Stop Confluence # Start Confluence h4. Expected Results Confluence should be able to start without any errors h4. Actual Results Tomcat is throwing this NullPointerException instead and Confluence is not able to start {code} 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) {code} h4. Environment Information Confluence 5.1 MySQL datasource (but we believe that this may occur in other databases too) h4. 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 h4. Workaround # Stop Confluence # Add the following property in {{confluence.cfg.xml}} #* *MySQL* {code:xml}<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>{code} #* *MS Server* {code:xml}<property name="hibernate.connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>{code} #* *Oracle* {code:xml}<property name="hibernate.connection.driver_class">oracle.jdbc.OracleDriver</property>{code} #* *PostgreSQL* {code:xml}<property name="hibernate.connection.driver_class">org.postgresql.Driver</property> {code} # Start Confluence

    Atlassian JIRA | 4 years ago | Amalia Sanusi [Atlassian]
    java.lang.NullPointerException
  2. 0

    h4. Steps to Reproduce # Install a fresh Confluence 5.1 [using MySQL datasouce|https://confluence.atlassian.com/display/DOC/Configuring+a+MySQL+Datasource+in+Apache+Tomcat] # 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: !screenshot000.jpg! # Stop Confluence # Start Confluence h4. Expected Results Confluence should be able to start without any errors h4. Actual Results Tomcat is throwing this NullPointerException instead and Confluence is not able to start {code} 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) {code} h4. Environment Information Confluence 5.1 MySQL datasource (but we believe that this may occur in other databases too) h4. 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 h4. Workaround # Stop Confluence # Add the following property in {{confluence.cfg.xml}} #* *MySQL* {code:xml}<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>{code} #* *MS Server* {code:xml}<property name="hibernate.connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>{code} #* *Oracle* {code:xml}<property name="hibernate.connection.driver_class">oracle.jdbc.OracleDriver</property>{code} #* *PostgreSQL* {code:xml}<property name="hibernate.connection.driver_class">org.postgresql.Driver</property> {code} # Start Confluence

    Atlassian JIRA | 4 years ago | Amalia Sanusi [Atlassian]
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Pig Output Location Validation Failed

    Stack Overflow | 3 years ago | Piyush Jindal
    org.apache.pig.impl.plan.VisitorException: ERROR 2116: &lt;file snappy_conversion.pig, line 4, column 0&gt; Output Location Validation Failed for: '/abc/def/snappy/
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    No message provided

    at java.lang.Class.forName0()
  2. Java RT
    Class.forName
    1. java.lang.Class.forName0(Native Method)
    2. java.lang.Class.forName(Class.java:169)
    2 frames
  3. com.atlassian.confluence
    DefaultBootstrapManager.performPersistenceUpgrade
    1. com.atlassian.confluence.setup.DefaultBootstrapManager.isDriverPresent(DefaultBootstrapManager.java:257)
    2. com.atlassian.confluence.setup.DefaultBootstrapManager.checkMySQLDriverIsPresent(DefaultBootstrapManager.java:240)
    3. com.atlassian.confluence.setup.DefaultBootstrapManager.performPersistenceUpgrade(DefaultBootstrapManager.java:175)
    3 frames
  4. com.atlassian.config
    BootstrapUtils.init
    1. com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.init(DefaultAtlassianBootstrapManager.java:76)
    2. com.atlassian.config.util.BootstrapUtils.init(BootstrapUtils.java:35)
    2 frames
  5. com.atlassian.confluence
    ConfluenceConfigurationListener.contextInitialized
    1. com.atlassian.confluence.setup.ConfluenceConfigurationListener.initialiseBootstrapContext(ConfluenceConfigurationListener.java:90)
    2. com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(ConfluenceConfigurationListener.java:46)
    2 frames
  6. Glassfish Core
    Catalina.start
    1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
    2. org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
    3. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
    4. org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    5. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
    6. org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    7. org.apache.catalina.core.StandardService.start(StandardService.java:525)
    8. org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    9. org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    9 frames
  7. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  8. Glassfish Core
    Bootstrap.main
    1. org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    2. org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
    2 frames