Confluence system error - java.lang.NullPointerException
Asked by Van Pham:

After some effort on some confluence-unrelated activities, our confluence server cannot be accessed anymore. These activities were: install http, route jira database from another machine to this server, and install phpMyadmin

Retrieving the log, we were able to find this:

---

The SystemInformationService could not be retrieved from the container. Therefore very limited information is available in this error report.

The SystemInformationService could not be retrieved due to the following error: java.lang.NullPointerException

Cause

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

at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:152)

caused by: java.lang.NullPointerException

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

Stack Trace: hide

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

at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:152)

at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:115)

at com.atlassian.confluence.setup.ConfluenceEncodingFilter.getGlobalSettings(ConfluenceEncodingFilter.java:45)

at com.atlassian.confluence.setup.ConfluenceEncodingFilter.getEncodingInternal(ConfluenceEncodingFilter.java:35)

at com.atlassian.confluence.setup.ConfluenceEncodingFilter.getEncoding(ConfluenceEncodingFilter.java:27)

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

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

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

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

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at com.atlassian.confluence.servlet.FourOhFourErrorLoggingFilter.doFilter(FourOhFourErrorLoggingFilter.java:65)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)

at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.NullPointerException

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

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

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

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

at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:146)

... 24 more

Referer URL

http://....


Answers:
author: Daniel Herrmann
body: I know this thread is quite old, but it is highly ranked in google and finally helped my to find the solution. In my case, the partition containing the MySQL data was completely full - resulting in problems in MySQL connections. After doing a "service mysql restart", MySQL did not come back. While the credentials were correct, the NullPointerException happened due to failed connections to the (not running) MySQL server.

Hope this helps someone.


author: Van Pham
body: It happened to be the problem with our Mysql credentials, so Confluence could not connect to the databases: the credentials set in your confluence.cfg.xml file are not valid to access the database. This is resolved now.


author: PeterKoczan
body: Greetings,

This error is most commonly caused by either of the following:

* corrupted plugin cache - this can be fixed by [clearing the plugin cache](https://confluence.atlassian.com/display/CONFKB/How+to+Clear+Confluence+Plugins+Cache)
* Confluence database not available - check the connection parameters in \<CONFLUENCE-HOME\>/confluence.cfg.xml and verify if the database user has access to all confluence tables
* \<CONFLUENCE-HOME\> not writable - check the permission of the directory and sub-directories

comments: author: Van Pham
body: Thank you. It happened to be the problem with our Mysql credentials, so Confluence could not connect to the databases. This is resolved now.


author: angelmzz@sina.com
body: Thank you. I have the same problem. Can you show me the steps for how to resolve? Thank you very much.


author: PeterKoczan
body: Hi,

Since the root cause of the same error can be a wide variety, as explained above, please raise a support ticket at support.atlassian.com, attaching your logs from `<CONFLUENCE-HOME>`/logs and `<CONFLUENCE-INSTALL>`/logs so that one of our support team members can review them to identify the steps you need to take to resolve the issue.