NullPointerException when browsing to Confluence

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

When you try to access Confluence after starting up, the following appears in the browser window and logs:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 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) . . . Caused by: java.lang.NullPointerException . . . Referer URL Unknown 

This error is generic and, therefore, difficult to troubleshoot. However, it can be triggered by a few things, noted below in Cause.

Cause

There are some things you can check:

  1. The Confluence user in the operating system might not have full read/write permissions on the <Confluence-Installation> or <Confluence-Home> directories.

  2. The <Confluence-Home> directory might have been moved to another location mistakenly.

  3. The database is not running or performing correctly. The database's credentials could be invalid.

  4. There is a corrupted cache or a connectivity issue on the server.

  5. If you have recently migrated to new server, there might be a corruption in search indices.

  6. If you are using a Data Center installation of Confluence, confluence.cluster.peers, have not been configured in confluence.cfg.xml.

  7. If you're getting NullPointer while uploading the attachment with non-English symbols in the name.

Solution

  1. Verify that the Confluence user has enough permissions to run Confluence on the server (especially on Linux OS).

  2. Check that the <Confluence-Home> directory was not moved to another location.

  3. Check that the database is running fine as expected.

  4. Restart the server to clear cache or connectivity issues (sometimes this resolves most of the problems).

  5. How to Rebuild the Content Indexes From Scratch on Unclustered Confluence.

  6. Ensure that at least one address has been configured for the confluence.cluster.peers property in confluence.cfg.xml. See Change Node Discovery from Multicast to TCP/IP or AWS for details.

  7. Check java.lang.NullPointerException while uploading/downloading attachments with non-latin characters

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.