When trying to list application links Confluence throws '(Invocation of method 'getOrphanedTrustCertificates') NullPointerException' error

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

Problem

While trying to list application links in Confluence Admin >> Application Links, the following stack trace is thrown:

1 2 3 4 5 6 7 org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getOrphanedTrustCertificates' in class com.atlassian.applinks.ui.velocity.ListApplicationLinksContext threw exception java.lang.NullPointerException at com/atlassian/applinks/ui/admin/list_application_links.vm[line 80, column 20] at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:223)

The following appears in the atlassian-confluence.log:

1 2 3 4 5 6 7 8 9 10 11 12 2013-07-30 22:30:26,862 ERROR [http-8090-2] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action -- referer: http://localhost:8090/admin/viewgeneralconfig.action | url: /admin/listapplicationlinks.action | userName: root org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getOrphanedTrustCertificates' in class com.atlassian.applinks.ui.velocity.ListApplicationLinksContext threw exception java.lang.NullPointerException at com/atlassian/applinks/ui/admin/list_application_links.vm[line 80, column 20] at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:223) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262) at org.apache.velocity.runtime.parser.node.ASTReference.evaluate(ASTReference.java:470) at org.apache.velocity.runtime.parser.node.ASTNotNode.evaluate(ASTNotNode.java:63) at org.apache.velocity.runtime.parser.node.ASTAndNode.evaluate(ASTAndNode.java:104) at org.apache.velocity.runtime.parser.node.ASTExpression.evaluate(ASTExpression.java:62) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:85) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336) at org.apache.velocity.runtime.directive.Parse.render(Parse.java:263)

Cause

The com.atlassian.oauth.serviceprovider.ServiceProviderConsumerStore.allConsumerKeys BANDANAVALUE is corrupted in BANDANA (a table in the Confluence Database).

Workaround 1

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.

  1. Shutdown Confluence.

  2. Obtain the current BANDANAVALUE for that particular row via this query:

    1  SELECT * FROM BANDANA WHERE BANDANAKEY = 'com.atlassian.oauth.serviceprovider.ServiceProviderConsumerStore.allConsumerKeys';

    Example of output:

    1 <string>jira%3A5326876/MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnwU6SzPcDiF++cF7MAlyrW0M9CfT3sJaQisUOCKt6wnMpzIHPYpjIYIYY%2BvWP0X++IdJPx8j%2FdXvwdpesLEc%2BDnZdUHonaPF%2FsBeWX2BrKTngYtSLvb++Lme6S%2BG7tF3ODAFpoC8qKEZnflA308SqqA2Tqzg675eo6YaUt3/MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnwU6SzPcDiF++cF7MAlyrW0M9CfT3sJaQisUOCKt6wnMpzIHPYpjIYIYY%2BvWP0X++IdJPx8j%2FdXvwdpesLEc%2BDnZdUHonaPF%2FsBeWX2BrKTngYtSLvb++Lme6S%2BG7tF3ODAFpoC8qKEZnflA308SqqA2Tqzg675eo6YaUt3++7Ystw%2FDQUwIDAQAB</string>

    Notice that the key itself is appended after the application ID? You will need to remove all values after the application ID, which is marked by the front slash, '/'

  3. Extract the Application ID out of the BANDANAVALUE, and update it this way. Example:

    1 UPDATE bandana SET BANDANAVALUE = '<string>jira%3A5326876</string>' WHERE BANDANAKEY = 'com.atlassian.oauth.serviceprovider.ServiceProviderConsumerStore.allConsumerKeys';
  4. Start Confluence.

  5. Flush all the caches in Confluence Admin >> Cache Statistics

Workaround 2

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.

  1. The application link can also be deleted entirely and recreated again.

  2. Shutdown Confluence.

  3. Run the following SQL commands 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.

    Create a backup of the database before performing these SQL commands

    1 2 3 DELETE FROM BANDANA WHERE BANDANAKEY like 'applinks.admin%'; DELETE FROM BANDANA WHERE BANDANAKEY = 'applinks.global.application.ids'; DELETE FROM BANDANA WHERE BANDANAKEY like 'com.atlassian.oauth%';
  4. Start Confluence.

  5. Recreate any application links that are needed

Updated on April 14, 2025

Still need help?

The Atlassian Community is here for you.