Not able to remove Fisheye Application Link
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
After working through Remove an application link from Jira server using SQL, you see the following error:
1
2
The webpage at http://localhost:8081/jira/plugins/servlet/applinks/listApplicationLinks might be temporarily down or it may have moved permanently to a new web address.
Error code: ERR_CONTENT_DECODING_FAILED
Or:
1
2
3
4
5
6
7
8
9
10
11
2013-11-04 21:08:06,246 http-bio-8081-exec-14 ERROR [500ErrorPage.jsp] Exception caught in 500 page 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]
com.atlassian.templaterenderer.RenderingException: 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 com.atlassian.templaterenderer.velocity.one.six.internal.VelocityTemplateRendererImpl.render(VelocityTemplateRendererImpl.java:113)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
Caused by: 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)
...
Caused by: java.lang.NullPointerException
at com.atlassian.applinks.core.DefaultTypeAccessor.loadApplicationType(DefaultTypeAccessor.java:106)
at com.atlassian.applinks.core.DefaultApplicationLinkService.retrieveApplicationLink(DefaultApplicationLinkService.java:396)
Cause
There are a couple inconsistencies in the Fisheye/Crucible application link as the Project Mapping data has not been cleared up completely
Workaround
In this example, our applink key is 'd04c4377-186a-3973-a0d4-1b4c4e2c79eb'.
To find the key of the Fisheye instance you want to remove, please use:
1
2
3
4
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';
-- NOTE: For MSSQL use the following query:
SELECT substring(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';
Stop JIRA.
Run the following SQL commands and make sure every query is returning results:
1 2 3 4 5 6 7
SELECT * from propertyentry where id in (select id from propertytext where propertyvalue like '%d04c4377-186a-3973-a0d4-1b4c4e2c79eb%'); SELECT * from propertytext where propertyvalue like '%d04c4377-186a-3973-a0d4-1b4c4e2c79eb%'; SELECT * from propertyentry where id in (select id from propertystring where propertyvalue like '%d04c4377-186a-3973-a0d4-1b4c4e2c79eb%'); SELECT * from propertystring where propertyvalue like '%d04c4377-186a-3973-a0d4-1b4c4e2c79eb%'; SELECT * from propertystring where id in (select id from propertyentry where property_key like '%Project_Key%'); SELECT * from propertytext where id in (select id from propertyentry where property_key like '%Project_Key%'); SELECT * from propertyentry where property_key like '%<Project_Key>%';
Next , run the SQL commands below to delete the corrupted data:
1 2 3 4 5 6 7
delete from propertyentry where id in (select id from propertytext where propertyvalue like '%d04c4377-186a-3973-a0d4-1b4c4e2c79eb%'); delete from propertytext where propertyvalue like '%d04c4377-186a-3973-a0d4-1b4c4e2c79eb%'; delete from propertyentry where id in (select id from propertystring where propertyvalue like '%d04c4377-186a-3973-a0d4-1b4c4e2c79eb%'); delete from propertystring where propertyvalue like '%d04c4377-186a-3973-a0d4-1b4c4e2c79eb%'; delete from propertystring where id in (select id from propertyentry where property_key like '%Project_Key%'); delete from propertytext where id in (select id from propertyentry where property_key like '%Project_Key%'); delete from propertyentry where property_key like '%Project_Key%';
Restart JIRA and delete the Fisheye/Crucible Application Link via UI.
Was this helpful?