DVCS page throws exception after upgrading JIRA
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
Summary
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 an exception and the repositories that were previously configured is not visible anymore.

The following appears in the XXXXXXXXXXX.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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 :
Solution
Workaround
To resolve this issue, please run this query on the database to set the state to approved :
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.
1
update "AO_E8B6CC_ORGANIZATION_MAPPING" set "APPROVAL_STATE" = 'APPROVED';
Was this helpful?