NullPointerException when creating an issue
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
Only one user couldn't create the issue and the following appears in the atlassian-jira.log:
1
2
3
4
5
6
7
8
9
10
11
An error occurred whilst rendering this message. Please contact the administrators, and inform them of this bug. Details: -------
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getValueFromIssue' in class
com.atlassian.greenhopper.customfield.epiclink.EpicLinkCFType threw exception com.atlassian.cache.CacheException: java.lang.NullPointerException at
com.pyxis.greenhopper.jira:gh-epic-link/templates/greenhopper/jira/customfield/epiclink/edit-epiclink.vm[line 37, column 57] at
org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337) at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284) 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.parser.node.ASTMethod.execute(ASTMethod.java:155) at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262) at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:342) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87) 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
Diagnosis
Look for create issue transition from the workflow xml. For example:
1
2
3
4
5
6
7
<validator name="" type="class">
<arg name="FIELD_ERROR_MSG">You dont have permission to create Defects</arg>
<arg name="class.name">com.onresolve.jira.groovy.GroovyValidator</arg>
<arg name="FIELD_FORM_FIELD"></arg>
<arg name="FIELD_CONDITION"> !isUserMemberOfRole('Customers')</arg>
<arg name="scriptFileName">com.onresolve.jira.groovy.canned.workflow.validators.SimpleScriptedValidator</arg>
</validator>
Cause
Workflow validator is blocking the user to create an issue.
Solution
Resolution
Remove the validator or fulfil the validator criteria. For example,
remove the user from the '
Customers'
project role
<validator name=
"" type="
class">
<arg name=
"FIELD_ERROR_MSG"
>You dont have permission to create Defects</arg>
<arg name=
"class.name"
>com.onresolve.jira.groovy.GroovyValidator</arg>
<arg name=
"FIELD_FORM_FIELD"
></arg>
<arg name=
"FIELD_CONDITION"
> !isUserMemberOfRole('Customers')</arg>
<arg name=
"scriptFileName"
>com.onresolve.jira.groovy.canned.workflow.validators.SimpleScriptedValidator</arg>
</validator>
Was this helpful?