HTTP Status 500 - java.lang.NullPointerException

Hi,

I have a problem with last version of confluence (5.6.5) since I upgraded Mac OS to yosemite

actual configuration:   
    -OS: OS X Yosemite
    -mysql(5.5.38) and phpMyAdmin in MAMP
    -tomcat (7.0.50)

To connect confluence with mysql, I use the last version of recommended mysql driver (5.1.34)

When i start confluence, i get this error:

type Exception report
message
description
The server encountered an internal error () that prevented it from fulfilling this request.
exception:

com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException

    com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)

    com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)

    com.atlassian.confluence.setup.ConfluenceEncodingFilter.getGlobalSettings(ConfluenceEncodingFilter.java:47)

    com.atlassian.confluence.setup.ConfluenceEncodingFilter.getEncodingInternal(ConfluenceEncodingFilter.java:37)

    com.atlassian.confluence.setup.ConfluenceEncodingFilter.getEncoding(ConfluenceEncodingFilter.java:29)

    com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:38)

    com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)

    com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44)

    com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:71)

    com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:50)

    com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)

root cause

 

java.lang.NullPointerException

    com.atlassian.spring.container.ContainerManager.getComponent(ContainerManager.java:33)

    com.atlassian.confluence.util.LazyComponentReference$Accessor.get(LazyComponentReference.java:46)

    com.atlassian.util.concurrent.Lazy$Strong.create(Lazy.java:85)

    com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:321)

    com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143)

    com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)

    com.atlassian.confluence.setup.ConfluenceEncodingFilter.getGlobalSettings(ConfluenceEncodingFilter.java:47)

    com.atlassian.confluence.setup.ConfluenceEncodingFilter.getEncodingInternal(ConfluenceEncodingFilter.java:37)

    com.atlassian.confluence.setup.ConfluenceEncodingFilter.getEncoding(ConfluenceEncodingFilter.java:29)

    com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:38)

    com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)

    com.atlassian.core.filters.HeaderSanitisingFilter.doFilter(HeaderSanitisingFilter.java:44)

    com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:71)

    com.atlassian.confluence.web.filter.DebugFilter.doFilter(DebugFilter.java:50)

    com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.50 logs.

 

I searched on the web and the problem came to connection with database.

When I tried to connect to mysql with command and with the driver it's work.

 

My tomcat configuration for confluence is :

<Context path="/confluence" docBase="/Users/admin/Documents/confluence-5.6.5/confluence" debug="0" reloadable="true">
    <Resource name="jdbc/confluence" auth="Container" type="javax.sql.DataSource"
              username="confluence"
              password="**********"
              driverClassName="com.mysql.jdbc.Driver"
              url="jdbc:mysql://localhost:8889/confluence?useUnicode=true&characterEncoding=utf8"
              maxActive="15"
              maxIdle="7"
              defaultTransactionIsolation="READ_COMMITTED"
              validationQuery="Select 1" />
</Context>

1 answer

This widget could not be displayed.

Hi Franck,

If you install a Confluence from scracth using the same startup folder, are you able to point to another database and start Confluence without problems? if you can start Confluence correctly, this might indicate a problem with the current configuration. Usually Nullpointeexceptions at the startup indicate that Confluence might not be able to reach the database using the current username and password.

I hope this helps. I'll leave the question open for others to help as well.

Cheers,

Rodrigo

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

445 views 5 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you