Confluence returns NullPointerException while creating application link to JIRA
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
Summary
Problem
Confluence returns network error, NullPointerException while creating application link to JIRA. However, JIRA seems to be connected just fine from Confluence.

The following appears in the atlassian-confluence.log
1
2
WARN [ajp-nio-8009-exec-3] [applinks.internal.status.DefaultApplinkStatusService] logApplinkError Unrecognized error while attempting to retrieve status of Application Link '877d2179-0ee0-3d5f-826f-40d9d0bf1eee'
-- referer: https://<CONFLUENCE-SERVER-BASE-URL>/admin/listapplicationlinks.action?applinkCreationStatusLog=%22%5B%7B%5C%22status%5C%22%3A%5C%22inprogress.creation%5C%22%7D%2C%7B%5C%22status%5C%22%3A%5C%22completed.creation.local%5C%22%7D%2C%7B%5C%22status%5C%22%3A%5C%22inprogress.creation.reciprocal%5C%22%7D%2C%7B%5C%22status%5C%22%3A%5C%22completed.creation.reciprocal%5C%22%7D%5D%22&applinkOriginalCreatedId=%22877d2179-0ee0-3d5f-826f-40d9d0bf1eee%22&sharedUserbase=false&applinkConfigInUserAuth=true&applinkConfigInServerAuth=true&applinkConfigInPreAuth=true&applinkConfigOutUserAuth=true&applinkConfigOutServerAuth=true&applinkConfigOutPreAuth=true | url: /rest/applinks/3.0/status/877d2179-0ee0-3d5f-826f-40d9d0bf1eee | traceId: 6882967a70371cc5 | userName: sysadmin
and
1
2
3
4
5
6
7
8
ERROR [ajp-nio-8009-exec-7] [common.error.jersey.ThrowableExceptionMapper] toResponse Uncaught exception thrown by REST service: null
-- referer: https://<CONFLUENCE-SERVER-BASE-URL>/display/<SPACE-KEY>/<PAGE-NAME> | url: /rest/jiraanywhere/1.0/servers | traceId: 4b56e9c912c374e5 | userName: <USERNAME>
java.lang.NullPointerException
at com.atlassian.oauth.consumer.sal.PluginSettingsConsumerTokenStore.get(PluginSettingsConsumerTokenStore.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
Diagnosis
Environment
Both JIRA and Confluence were migrated from Cloud and now running on servers.
Diagnostic Steps
Application link was not able to connect even after proxy and SSL was bypassed.
Regardless if Confluence and JIRA are running on the same or different server.
Cause
This issue wasn't caused by the network as shown in the error message. There might be some old OAuth token in the database used in the Cloud instance that's not longer used in servers. These OAuth token needs to be removed and recreated.
Solution
Resolution
Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.
Delete any existing application link from both JIRA and Confluence.
Shut down both applications.
View the OAuth Tokens that exist in the database, by running the following query in your Confluence database:
1
SELECT * from BANDANA where BANDANAKEY LIKE '%oauth%';
Remove the old OAuth Token by running the following query in your Confluence database :
1
DELETE from BANDANA where BANDANAKEY LIKE '%oauth%';
Start up both applications and recreate the application link.
Was this helpful?