DVCS page throws exception after upgrading JIRA

Still need help?

The Atlassian Community is here for you.

Ask the community

This article only applies to the Atlassian server platform. Learn more about the differences between cloud and server.

Problem

After upgrade from JIRA which in this case was from JIRA version 7.0.9 to JIRA Version 7.1.2 , navigation to the DVCS page throws exception and the resposotires that were previously configured is not visible anymore. 


The following appears in the XXXXXXXXXXX.log

2016-03-29 21:09:18,979 http-nio-8712-exec-8 ERROR sysadmin 1269x398x1 1rgp816 127.0.0.1 /secure/admin/ConfigureDvcsOrganizations!default.jspa [velocity] Exception in macro #printOrganizations at com.atlassian.jira.plugins.jira-bitbucket-connector-plugin:repositoryConfiguration//templates/dvcs/add-organization.vm[line 113, column 13]
2016-03-29 21:09:18,980 http-nio-8712-exec-8 ERROR sysadmin 1269x398x1 1rgp816 127.0.0.1 /secure/admin/ConfigureDvcsOrganizations!default.jspa [c.atlassian.velocity.DefaultVelocityManager] MethodInvocationException occurred getting message body from Velocity: com.atlassian.cache.CacheException: java.lang.NullPointerException: Name is null
com.atlassian.cache.CacheException: java.lang.NullPointerException: Name is null
	at com.atlassian.cache.memory.DelegatingCachedReference.get(DelegatingCachedReference.java:84)
	at com.atlassian.jira.plugins.dvcs.dao.impl.CachingOrganizationDaoImpl.getAllCachedOrgs(CachingOrganizationDaoImpl.java:192)
	at com.atlassian.jira.plugins.dvcs.dao.impl.CachingOrganizationDaoImpl.getAll(CachingOrganizationDaoImpl.java:69)
	at com.atlassian.jira.plugins.dvcs.service.OrganizationServiceImpl.getAll(OrganizationServiceImpl.java:89)
	at com.atlassian.jira.plugins.dvcs.webwork.ConfigureDvcsOrganizations.loadOrganizations(ConfigureDvcsOrganizations.java:155)
	... 3 filtered
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:385)
	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:374)
	at com.atlassian.velocity.htmlsafe.introspection.UnboxingMethod.invoke(UnboxingMethod.java:30)
	at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
	at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
	at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:507)
	at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:282)
	at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
	at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:212)
	at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:247)
	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 org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:381)
	at com.atlassian.velocity.DefaultVelocityManager.writeEncodedBodyImpl(DefaultVelocityManager.java:117)
	at com.atlassian.velocity.DefaultVelocityManager.writeEncodedBody(DefaultVelocityManager.java:97)
	at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.toWriterImpl(DefaultVelocityTemplatingEngine.java:122)
	at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.asHtml(DefaultVelocityTemplatingEngine.java:113)
	... 4 filtered
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
	... 50 filtered
	at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:59)
	... 66 filtered
	at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70)
	... 89 filtered
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException: Name is null
	at java.lang.Enum.valueOf(Enum.java:236)
	at com.atlassian.jira.plugins.dvcs.model.Organization$ApprovalState.valueOf(Organization.java:284)
	at com.atlassian.jira.plugins.dvcs.dao.impl.OrganizationAOFacadeImpl.transform(OrganizationAOFacadeImpl.java:98)
	at com.atlassian.jira.plugins.dvcs.dao.impl.OrganizationAOFacadeImpl.lambda$transformCollection$24(OrganizationAOFacadeImpl.java:160)
	at org.apache.commons.collections.CollectionUtils.collect(CollectionUtils.java:632)
	at org.apache.commons.collections.CollectionUtils.collect(CollectionUtils.java:575)
	at com.atlassian.jira.plugins.dvcs.dao.impl.OrganizationAOFacadeImpl.transformCollection(OrganizationAOFacadeImpl.java:157)
	at com.atlassian.jira.plugins.dvcs.dao.impl.OrganizationAOFacadeImpl.fetch(OrganizationAOFacadeImpl.java:145)
	at com.atlassian.cache.memory.MemoryCacheManager$1$1.load(MemoryCacheManager.java:93)
	at com.atlassian.cache.memory.MemoryCacheManager$1$1.load(MemoryCacheManager.java:69)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
	at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
	at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4830)
	at com.atlassian.cache.memory.DelegatingCachedReference.getUnderLock(DelegatingCachedReference.java:94)
	at com.atlassian.cache.memory.DelegatingCachedReference.get(DelegatingCachedReference.java:79)

Diagnosis

Environment

  • JIRA version 7.1.2
  • JIRA DVCS Connector for JIRA Version 3.3.25

Cause

The only way this value ( Caused by: java.lang.NullPointerException: Name is null  ) could be null would be if an upgrade task failed to run. 

For reference this is the upgrade task  which has been in place since last november :

Workaround

To resolve this issue, please run this query on the database to set the state to approved  :

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.

update "AO_E8B6CC_ORGANIZATION_MAPPING" set "APPROVAL_STATE" = 'APPROVED';

 

 

 

 

Last modified on Mar 30, 2016

Was this helpful?

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