JIRA shows NullPointerException in the Incoming Authentication configuration to Fisheye
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
The following is seen when accessing Incoming/Outgoing Authentication tab for a Trusted Apps link
Screenshot from Fisheye


Screenshot from JIRA


The following trace is thrown in the atlassian-jira.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2015-02-12 04:19:00,037 TP-Processor55,
unique_id=VNxwBArD2pkAAANjtHUAAAAT, time=1423732740031,
uri=/jira/plugins/servlet/applinks/auth/conf/trusted/inbound-ual/de13fbde-be24-32ba-9f25-78cbd341430e
ERROR [500ErrorPage.jsp] Exception caught in 500 page null
java.lang.NullPointerException
at com.atlassian.applinks.core.auth.trusted.ProviderConfigurationServlet.render(ProviderConfigurationServlet.java:320)
at com.atlassian.applinks.core.auth.trusted.ProviderConfigurationServlet.doGet(ProviderConfigurationServlet.java:134)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at com.atlassian.applinks.ui.AbstractApplinksServlet.service(AbstractApplinksServlet.java:157)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at com.atlassian.plugin.servlet.DelegatingPluginServlet.service(DelegatingPluginServlet.java:42)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at com.atlassian.plugin.servlet.DelegatingPluginServlet.service(DelegatingPluginServlet.java)
at com.atlassian.plugin.servlet.ServletModuleContainerServlet.service(ServletModuleContainerServlet.java:52)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at com.atlassian.plugin.servlet.ServletModuleContainerServlet.service(ServletModuleContainerServlet.java)
at com.atlassian.jira.plugin.servlet.ServletModuleContainerServlet.service(ServletModuleContainerServlet.java)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
Cause
The trustedapp table in the JIRA database is missing the entry for this particular application
Resolution
Configure the Application Links authentication by following the OAuth security for application links guide.
Click here to expand for an alternative resolution option...
Please contact the Atlassian Support before applying the steps below
Manually enter the value in the database following these steps
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.
Stop JIRA
Run the following query against your JIRA database
1 2 3 4
SELECT a.propertyvalue, b.PROPERTY_KEY FROM propertyentry as b LEFT JOIN propertystring as a ON a.ID = b.ID LEFT JOIN propertynumber as c ON a.ID = c.ID WHERE PROPERTY_KEY LIKE '%rpc.url%'
Identify the application which is running into this problem. In the property_key column, you see see something like "applinks.admin.a73d7d06-6693-36fb-9a92-d919e60d73fc.rpc.url".
a73d7d06-6693-36fb-9a92-d919e60d73fc would be the important string from this query
Run the following query replacing the string you retrieved from the above query
1 2 3
select b.propertyvalue FROM propertyentry as a LEFT JOIN propertystring as b on a.ID=b.ID WHERE property_key LIKE '%a73d7d06-6693-36fb-9a92-d919e60d73fc.trustedapps.incoming.applicationId%'
The result would be something like 0A3C020B014B92B73479F06B21620778
In the Fisheye Instance Directory, open the config.xml
Towards the bottom of this file, copy the string located between <publicKey>...</publicKey>
1
<currentApplication><id>0A3C020B014B92B73479F06B21620778</id><publicKey>MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAibBKVYUEJLx3HrRoHxED+5ITxP51qFXnCMWHPp3/WnprVis2Lg3NMNeHgWLzN5BijYXPm+2yFUsZJ80rkOx9CaFL+dx5ohLnXltR/WpyJwhcqGXp9CO7GielMWUIxziCtIvKB5//Pcy1c46WwphgQfWNdQX8ViD4TbcA0k1F1wuHKWEIs2Yk4cJjofdHJql4NAH4PaBV2iPNc7I3+58owRD05hSx6xrgMu+rf66QOLdQpi7jI7IZR7mqzd+visB2whEapKKSX3yiQS62JUygUa1UJRnf+YXPYFMxymdCD7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pigQlKJFiWR/eorEYU9AIwzowM99oMVzQNQR0uE4P5HZUXXfofBr0Q56CBTnfQFV/rpVQQKBgQCiIR3+7yXbqWvJ9Lt4oOns9lm6547n0cJifpntxfvk6+IthVyRM2+IZCEr/fTp+klPFyTzbLToRK0sf8Vh1JFXZtUTzRhj8/qgyy9L57O39RX0Kw5pAtn9fal5DAi8WqGGCxNRR2mzSPEnnWailcxAAieZRWEC6/M5Gjc8JhFl3wKBgQCV2VYrvuaa8iVealzZa3xjB+XDSqijwvnm8vnTpOrkpNHymjYjtDkCgME6S8KoD1LWQaVFcpJn7eJQMlHIS4sEcxkKY9wdCNnyCXatlwh9X06pFa7RQv14UOwrgTO53uEx5HVrW74kZyb4EOGFclUrT97uuSWIx+M3IR2ByrxVQQKBgFWLOt97/PkKSAyzIa0EXyXzyvG8ryKifw05fqC79kiQ78UTuOSPBM35ljEwBXtIMbc3VoxLyRcW8oOEO1OteD2L6u6v0Unv6uDiGRagbJT842XHkibutU3j3+9s0LwPTMJxN8JzFHczqiLP6496EnwPkaVFGYL/OvJqlThSt0Lj</privateKey></currentApplication><trustedApplication><name>jira:10175990</name><id>jira:10175990</id><publicKey>MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApZ8ZnIFi9hw0XGP3a5in/EJxewDi4kPrLrGiZpgBwxgQ/M/vVQ5kz16gxuxyujNBQBmNj3FesiOZy641jTtp+TgoXn0Y7l7Wiy12yXEd/n3M4EobBBLnoYrt3jy7+EfO+n7E4/HRqmEq6csWEyS+Tn8UbgQJWsJs5QidARc6+IkLbu9ti82Xu2bDOYtNiMOayYDHxbAifiHfOc0c4HdInNsjjawgvIcYfjZ+MDVgYzh0F8GKlRxj2VhZiz9iW1I4TziBwv0ao0VFpayp937ee1MV5no9uLlRd8Jyv0RgXH1owmzUmlqcViB8gV/S6mvoboIn/jv+5KFlNsazmHV+gwIDAQAB</publicKey><certificateTimeout>10000</certificateTimeout></trustedApplication><trustedApplication><name>jira:4639306</name><id>jira:4639306</id><publicKey>MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgJ5CC92mVClLbVWuXYFwRW9HN91rcraFoKvNjmRLi/qi1nzntFTh1vNXUHRkur4u2LkUhsYUK+J215OY2LcuNN02zTSaPxCIeG76uQ8iulsRfzvpDJyHjVI47VmK6yXjOEJ8Vb7E/3BN4pgo1UFcD2aFPfCl5xAT0kGwfh32moNsSZfA7kTOmG0OgSoujefOHNeIK1iVrF1fAgmElLi8q8/QePDOBR8DKdCAnKvSfQQfkjGVaaikVpSzEMDKOuUBqfS5I5uozbeIbYtXTSEnO3/Z7m7WXODS/bNhs8J4yvmo5OcMPOdZoBBBBbiNaiRjpldDbGS7VFvHn+fnHZ+aGwIDAQAB</publicKey><certificateTimeout>10000</certificateTimeout></trustedApplication><check-for-updates/><snippet/></config>
In the above example, it will be
1
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAibBKVYUEJLx3HrRoHxED+5ITxP51qFXnCMWHPp3/WnprVis2Lg3NMNeHgWLzN5BijYXPm+2yFUsZJ80rkOx9CaFL+dx5ohLnXltR/WpyJwhcqGXp9CO7GielMWUIxziCtIvKB5//Pcy1c46WwphgQfWNdQX8ViD4TbcA0k1F1wuHKWEIs2Yk4cJjofdHJql4NAH4PaBV2iPNc7I3+58owRD05hSx6xrgMu+rf66QOLdQpi7jI7IZR7mqzd+visB2whEapKKSX3yiQS62JUygUa1UJRnf+YXPYFMxymdCD7ft9bqq7Si8laIDoOkdRJELKaa5+4EkrHfyjj6t85eqqwIDAQAB
Run the following query against your JIRA database
1 2
insert into trustedapp values (99999,'<result from #5>','<result from #5>','<string from #8>','','',10000,'2015-01-13 14:16:59.707+08','<admin username>','2015-01-13 14:16:59.707+08','<admin username>');
Replace the items in <> with the results obtained from the previous steps. In this example, it would be the following query
1
insert into trustedapp values (99999,'0A3C020B014B92B73479F06B21620778','0A3C020B014B92B73479F06B21620778','MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAibBKVYUEJLx3HrRoHxED+5ITxP51qFXnCMWHPp3/WnprVis2Lg3NMNeHgWLzN5BijYXPm+2yFUsZJ80rkOx9CaFL+dx5ohLnXltR/WpyJwhcqGXp9CO7GielMWUIxziCtIvKB5//Pcy1c46WwphgQfWNdQX8ViD4TbcA0k1F1wuHKWEIs2Yk4cJjofdHJql4NAH4PaBV2iPNc7I3+58owRD05hSx6xrgMu+rf66QOLdQpi7jI7IZR7mqzd+visB2whEapKKSX3yiQS62JUygUa1UJRnf+YXPYFMxymdCD7ft9bqq7Si8laIDoOkdRJELKaa5+4EkrHfyjj6t85eqqwIDAQAB','','',10000,'2015-01-13 14:16:59.707+08','admin','2015-01-13 14:16:59.707+08','admin');
Restart your JIRA
Was this helpful?