Application link cannot be deleted and gives a REST error
Platform Notice: Data Center Only - This article only applies to Atlassian apps 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
You cannot delete an existing application link
You receive the following REST error in the user interface in Confluence:

And/or the following is seen in the
atlassian-confluence.log:2013-05-26 14:30:59,027 ERROR [http-443-1] [common.error.jersey.ThrowableExceptionMapper] toResponse Uncaught exception thrown by REST service -- url: /rest/applinks/2.0/permission/reciprocate-application-delete/86c7afb6-875b-31da-b02f-200f44181f97 | userName: UserName | referer: http://MyConfluence.com/admin/listapplicationlinks.action java.lang.NullPointerException: currentApplication
Causes
Confluence cannot reach the external application that the link is for.
The information for the application link has somehow been removed from the external application, but not from Confluence.
Resolution
Cause one
Ensure Confluence can contact the external application and that it is operational
Cause two
Warning: Backup your database before proceeding.
Before running any SQL in this article, create a full backup of your Jira database. This is a database-level operation with no undo other than restoring from backup. Only proceed if you're comfortable running SQL directly against the Jira database, and test on a staging or cloned environment first, wherever possible.
Shutdown Confluence
Run the following SQL command to clean out all of the application links in Confluence:
This SQL command will delete all application links established in Confluence. If there are other existing links, delete all that can be before running this command and remember to recreate them after running the command.
DELETE FROM BANDANA WHERE BANDANAKEY like 'applinks.admin%'; DELETE FROM BANDANA WHERE BANDANAKEY = 'applinks.global.application.ids';Start Confluence
Recreate any application links that are needed
Was this helpful?