Accessing Crowd's Applications Link page crashes with 500 Internal Server Error

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

Summary

Attempting to access the Application Links page throws a 500 internal server error.

Environment

4.0.2

Diagnosis

When attempting to access the Application links page, Crowd returns an HTTP 500 internal server error message.  Reviewing the 

atlassian-crowd.log, we find the following:

2021-05-25 16:21:18,916 http-nio-8095-exec-3 ERROR [[Catalina].[localhost].[/crowd].[servlet-module-container-servlet]] Servlet.service() for servlet [servlet-module-container-servlet] in context with path [/crowd] threw exception
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/common_header.vm[line 7, column 20]
	at com.atlassian.templaterenderer.velocity.one.six.internal.VelocityTemplateRendererImpl.render(VelocityTemplateRendererImpl.java:104)
	at sun.reflect.GeneratedMethodAccessor1294.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
....
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/common_header.vm[line 7, column 20]
	at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:228)
	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)
	at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
	at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
	at org.apache.velocity.Template.merge(Template.java:328)
	at org.apache.velocity.Template.merge(Template.java:235)
	at com.atlassian.templaterenderer.velocity.one.six.internal.VelocityTemplateRendererImpl.render(VelocityTemplateRendererImpl.java:99)
	... 170 more
Caused by: java.lang.NullPointerException
	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:877)
	at com.atlassian.oauth.Consumer$InstanceBuilder.name(Consumer.java:214)
	at com.atlassian.oauth.serviceprovider.sal.PluginSettingsServiceProviderConsumerStore.get(PluginSettingsServiceProviderConsumerStore.java:53)
	at com.atlassian.oauth.serviceprovider.sal.PluginSettingsServiceProviderConsumerStore$1.apply(PluginSettingsServiceProviderConsumerStore.java:89)
	at com.atlassian.oauth.serviceprovider.sal.PluginSettingsServiceProviderConsumerStore$1.apply(PluginSettingsServiceProviderConsumerStore.java:87)
	at com.google.common.collect.Iterators$6.transform(Iterators.java:785)
	at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:47)


Cause

This can be caused by corrupt application links in the database. 

Solution

To resolve this issue, we'll want to clear out the application links in the database. Once this is done, we'll need to recreate the application links:

  1. Stop the Crowd application.
  2.  Backup the Crowd Database 
  3. Run the following SQL queries.

    delete from cwd_property where property_name like '%com.atlassian.oauth.%';
    delete from cwd_property where property_name like '%applink.%';
  4. Restart the Crowd application.
  5. Recreate any application links that are needed.



Last modified on Feb 25, 2022

Was this helpful?

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