Unable to Exit Safe Mode due to Null Pointer Exception

Still need help?

The Atlassian Community is here for you.

Ask the community

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

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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:

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
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:

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
Last modified on Jan 2, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.