NullPointerException When Trying to Configure Application links

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

When trying to add the Jira URL in 'Confluence Admin >> Application Links', Confluence throws a NullPointerException. The following appears in the atlassian-confluence.log:

1 2 3 4 5 Dec 1, 2011 10:05:59 AM com.sun.jersey.server.impl.application.WebApplicationImpl onException SEVERE: Internal server error java.lang.NullPointerException at com.atlassian.confluence.applinks.ConfluenceInternalHostApplication.getId(ConfluenceInternalHostApplication.java:221) ...

or,

1 2 3 4 5 6 2012-08-30 15:02:45,327 ERROR [http-9090-1] [common.error.jersey.ThrowableExceptionMapper] toResponse Uncaught exception thrown by REST service -- url: /rest/applinks/1.0/manifest | userName: anonymous java.lang.NullPointerException at com.atlassian.confluence.applinks.ConfluenceInternalHostApplication.getId(ConfluenceInternalHostApplication.java:226) ...

Cause

Server ID of Confluence is either missing in the database or incorrectly set. This cause is covered more at Server ID Shows as $action.serverId, $action.sid or n.v.

Resolution

  1. Stop Confluence

  2. Fix the Server ID missing issue by performing the resolution steps at Server ID Shows as $action.serverId, $action.sid or n.v.

  3. Restart Confluence

  4. Re-configure Application link

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.