Unable to Exit Safe Mode due to Null Pointer Exception

Still need help?

The Atlassian Community is here for you.

Ask the community

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 Sep 4, 2017

Was this helpful?

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