java.lang.NullPointerException: Cannot invoke method getCurrentWorkspace() on null object

Stack Overflow | graeme | 3 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    how do i get the workspace path in a for job dsl inside a pipeline?

    Stack Overflow | 3 months ago | graeme
    java.lang.NullPointerException: Cannot invoke method getCurrentWorkspace() on null object
  2. 0

    GitHub comment 1681#226474726

    GitHub | 10 months ago | maggu2810
    java.lang.NullPointerException: Cannot invoke method getLabel() on null object
  3. 0

    GitHub comment 1238#199815712

    GitHub | 1 year ago | maggu2810
    java.lang.NullPointerException: Cannot invoke method handleConfigurationUpdate() on null object
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    {panel:title=*This issue has moved*} {color:red}This issue has been moved permanently to [Adaptavist's Product Support JIRA instance|https://productsupport.adaptavist.com/browse/GRV-721].{color} All existing users of this instance should have the same username on our Product Support instance. However, you will very likely need to click on the [Can't access your account|https://productsupport.adaptavist.com/secure/ForgotLoginDetails.jspa] link in order to reset to a new password. {panel}Hi Jamie Looks like a bug in the WorkflowUtils.groovy examineConditions(). I created a listener to auto-transition issue on comment, using the already existing fast-transition listener, and it threw an error: 2015-05-26 17:11:12,638 Thread-40924 WARN cust_KLUG14 1031x18532x1 8jqbfn 162.49.177.29 /rest/servicedesk/1/servicedesk/customer/comment [canned.jira.utils.WorkflowUtils] Failed to examine exactly why the transition failed. This exception is thrown for debugging purposes, and does not affect why the transition failed. JIRA said no, but we couldn't work out why. java.lang.NullPointerException: Cannot invoke method getRestriction() on null object at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:88) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:54) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) at com.onresolve.scriptrunner.canned.jira.utils.WorkflowUtils$_examineConditions_closure2.doCall(WorkflowUtils.groovy:241) <+3> (NativeMethodAccessorImpl.java:62) (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:278) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016) at groovy.lang.Closure.call(Closure.java:423) at groovy.lang.Closure.call(Closure.java:439) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1379) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1372) at org.codehaus.groovy.runtime.dgm$149.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at com.onresolve.scriptrunner.canned.jira.utils.WorkflowUtils.examineConditions(WorkflowUtils.groovy:236) at com.onresolve.scriptrunner.canned.jira.utils.WorkflowUtils$examineConditions$1.callStatic(Unknown Source) at com.onresolve.scriptrunner.canned.jira.utils.WorkflowUtils.actionIssueWithFeedBack(WorkflowUtils.groovy:120) <+3> (NativeMethodAccessorImpl.java:62) (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324) at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.invoke(StaticMetaMethodSite.java:43) at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.call(StaticMetaMethodSite.java:88) at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.FasttrackTransition.doTransition(FasttrackTransition.groovy:147) at com.onresolve.scriptrunner.canned.jira.workflow.postfunctions.FasttrackTransition.this$2$doTransition(FasttrackTransition.groovy) <+3> (NativeMethodAccessorImpl.java:62) (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) Also I found that examineConditions explicitly has: def action = workflowDescriptor.getAction(4) RestrictionDescriptor restriction = action.getRestriction(); and 4 is an ID for the default 'Start Progress' transition, but not of the action configured in the listener itself. Looks like a definite bug. Also, two things missing, which would be very nice to have. First, not always user who generated event has the 'transition issue' permission. Would be nice specify an account for the user performing auto-transition, to override it. The second problem is (not sure how to 'fix' it), that action id configured for the workflow, and workflow may change (copy workflow, update, reapply), and then the listeners have to be udpated. I see that it is a very complex question, how to 'tell' it which transition to perform. but anyway, worth mentionning :) Cheers, Oles

    JIRA | 2 years ago | Oleksii Gnatkevych
    java.lang.NullPointerException: Cannot invoke method getRestriction() on null object
  6. 0

    Cannot invoke method getNodeName() on null object

    Stack Overflow | 2 years ago | rohitkadam19
    java.lang.NullPointerException: Cannot invoke method getNodeName() on null object

  1. derprogger 1 times, last 3 weeks ago
  2. Unknown User 1 times, last 3 weeks ago
  3. stigkj 1 times, last 3 weeks ago
  4. johnxfly 2 times, last 2 months ago
  5. musketyr 4 times, last 2 months ago
2 more registered users
22 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    Cannot invoke method getCurrentWorkspace() on null object

    at org.codehaus.groovy.runtime.NullObject.invokeMethod()
  2. Groovy
    AbstractCallSite.call
    1. org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:91)
    2. org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:48)
    3. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    4. org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:35)
    5. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    6. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
    7. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
    7 frames
  3. Unknown
    pipeline$run.call
    1. pipeline.run(pipeline.groovy:1)
    2. pipeline$run.call(Unknown Source)
    2 frames