Unable to create application links after cloning Jira Server

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

An application link can't be created after cloning a JIRA instance to another server. Deleting and recreating the application link manually does not resolve the issue.

The following appears in the atlassian-jira.log 

2015-12-04 13:44:23,324 http-nio-8080-exec-11 WARN xxxx xxx xxx xxxx /rest/applinks/3.0/applicationlinkForm/manifest.json [c.a.applinks.core.DefaultApplicationLinkService] Couldn't find type id for application link with id 5d1fd5e9-861e-300a-9412-e0ef36630081. Link is corrupted

Diagnosis

Environment

  • JIRA
  • Any other Atlassian application to be linked

Diagnosis Steps

Run the SQL queries below according to your JIRA version

For JIRA 7.0 or newer
SELECT * FROM propertyentry pe, propertystring ps WHERE pe.id = ps.id AND pe.property_key = 'applinks.global.application.ids';
For JIRA older than 7.0
SELECT * FROM propertyentry pe, propertytext pt WHERE pe.id = pt.id AND pe.property_key = 'applinks.global.application.ids';
 
SELECT SUBSTR(a.property_key,16,36) as "Application Key", b.propertyvalue as "Application Name" FROM propertyentry a join propertystring b on a.id=b.id where a.property_key like 'applinks.admin%name';



You should get a result similar to the below.

  id   |   entity_name   | entity_id |          property_key           | propertytype |  id   |  propertyvalue
-------+-----------------+-----------+---------------------------------+--------------+-------+-----------------
 12345 | jira.properties |         1 | applinks.global.application.ids |            5 | 12345 | #java.util.List
       |                 |           |                                 |              |       | 5d1fd5e9-861e-300a-9412-e0ef36630081

Cause

JIRA database is storing the corrupted Application links ID.

Workaround

If you get any result from the Diagnosis steps, please follow the rest of the steps below:

Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

  1. Stop JIRA

  2. Run the SQL command below.  You will need to modify this SQL statement to contain the id value found in the select query above.

    MySQL

    -- For JIRA 7.0 or newer
    UPDATE propertystring SET propertyvalue = '#java.util.List\n' WHERE id = '<id-from-select-query>';
    
    
    -- For JIRA older than 7.0
    UPDATE propertytext SET propertyvalue = '#java.util.List\n' WHERE id = '<id-from-select-query>';

    PostgreSQL

    -- For JIRA 7.0 or newer
    UPDATE propertystring SET propertyvalue = E'#java.util.List\n' WHERE id = '<id-from-select-query>';
    
    
    -- For JIRA older than 7.0
    UPDATE propertytext SET propertyvalue = E'#java.util.List\n' WHERE id = '<id-from-select-query>';
    tip/resting Created with Sketch.

    These queries will clear out all application link IDs. If you're looking to only clear out 1 application link, you'll need to modify the query to exclude the offending applink ID.

  3. Start JIRA.

Last modified on Sep 25, 2019

Was this helpful?

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