Unable to Exit Safe Mode due to Null Pointer Exception

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

Symptoms

User are unable to exit Plugin Safe mode due to Null pointer exception. They are getting a red error box on the UPM screen and prompting to check the logs. Nothing appears in the atlassian-confluence.log, but the following appears in the catalina.out:

1 2 3 4 5 6 7 8 9 10 11 com.sun.jersey.server.impl.application.WebApplicationImpl onException SEVERE: Internal server error java.lang.NullPointerException at com.atlassian.upm.PluginAccessorAndControllerImpl.getModuleNameOrKey(PluginAccessorAndControllerImpl.java:487) at com.atlassian.upm.PluginAccessorAndControllerImpl.access$500(PluginAccessorAndControllerImpl.java:56) at com.atlassian.upm.PluginAccessorAndControllerImpl$6.doInTransaction(PluginAccessorAndControllerImpl.java:428) at com.atlassian.upm.PluginAccessorAndControllerImpl$6.doInTransaction(PluginAccessorAndControllerImpl.java:425) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:25) at com.atlassian.sal.spring.component.SpringHostContextAccessor$1.doInTransaction(SpringHostContextAccessor.java:88) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:127) at com.atlassian.sal.spring.component.SpringHostContextAccessor.doInTransaction(SpringHostContextAccessor.java:82)

Cause

One of the plugin binaries is corrupt and there needs to be a systematic removal of plugins until the corrupt plugin is discovered.

Resolution 1

  • One of the plugin binaries is corrupt

  • Visit your UPM and make a list of all user installed plugins you have installed.

  • Run the following SQL command to remove all user installed plugins

1 delete from plugindata;

  • Restart Confluence

  • Download and reinstall your plugins from your list

Resolution 2

You can also leave the safe mode by running the following cURL command:

1 curl -H "Content-Type:application/vnd.atl.plugins.safe.mode.flag+json" --user admin:admin -X PUT -d '{"enabled": false, "links": {}}' http://localhost:8090/rest/plugins/1.0/safe-mode
Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.