java.lang.RuntimeException: Cannot invoke method getName() on null object

JIRA | Thomas Nakken | 4 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 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-218].{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}We use scriptrunner listener service to clone an issue (bulidt in script) when a comment is added on a closed issue. This works fine if we Comment the issue inside Jira, but when a mail is processed by jira (JEHM) and a comment i added to a closed issue from mail. Scriptrunner buidlt in script fails with Nullpointer exception from com.onresolve.jira.groovy.canned.workflow.postfunctions.AbstractCloneIssue.getUser(). Hope someone can helt / fix the bug. Full stacktrace: from the invoker 'SingleParameterMethodListenerInvoker{method=public void com.onresolve.jira.groovy.listener.ScriptRunnerUber Listener.workflowEvent(com.atlassian.jira.event.issue.IssueEvent), listener=com.onresolve.jira.groovy.listener.ScriptRunnerUberListener@3d1d623a}'. java.lang.RuntimeException: Cannot invoke method getName() on null object at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:66) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:32) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:60) at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:160) at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:79) at com.atlassian.multitenant.event.DefaultPeeringEventPublisherManager.publish(DefaultPeeringEventPublisherManager.java:17) at com.atlassian.multitenant.event.PeeringEventPublisher.publish(PeeringEventPublisher.java:23) at com.atlassian.jira.event.issue.DefaultIssueEventManager.publishEvent(DefaultIssueEventManager.java:124) at com.atlassian.jira.event.issue.DefaultIssueEventManager.dispatchEvent(DefaultIssueEventManager.java:102) at com.atlassian.jira.issue.util.DefaultIssueUpdater.doUpdate(DefaultIssueUpdater.java:88) at com.javahollic.jira.emh.service.ProcessorRunner.sendUpdates(ProcessorRunner.java:1101) at com.javahollic.jira.emh.service.ProcessorRunner.runProcessor(ProcessorRunner.java:902) at com.javahollic.jira.emh.service.ProcessorRunner.execute(ProcessorRunner.java:202) at com.javahollic.jira.emh.service.EnterpriseMessageHandlerImpl.handleMessage(EnterpriseMessageHandlerImpl.java:237) at com.javahollic.jira.emh.service.EnterpriseMessageHandlerProxy.handleMessage(EnterpriseMessageHandlerProxy.java:45) at com.atlassian.jira.service.services.mail.MailFetcherService$1.process(MailFetcherService.java:368) at com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl.getAndProcessMail(MailFetcherService.java:271) at com.atlassian.jira.service.services.mail.MailFetcherService.runImpl(MailFetcherService.java:356) at com.atlassian.jira.service.services.file.AbstractMessageHandlingService.run(AbstractMessageHandlingService.java:252) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:47) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at com.atlassian.multitenant.quartz.MultiTenantThreadPool$MultiTenantRunnable.run(MultiTenantThreadPool.java:72) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) Caused by: java.lang.NullPointerException: Cannot invoke method getName() on null object at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) at com.onresolve.jira.groovy.canned.workflow.postfunctions.AbstractCloneIssue.getUser(AbstractCloneIssue.groovy:87) <+3> at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:267) at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:52) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) at com.onresolve.jira.groovy.canned.workflow.postfunctions.AbstractCloneIssue.doScript(AbstractCloneIssue.groovy:44) at com.onresolve.jira.groovy.canned.workflow.postfunctions.CopyIssueWithAttachments.super$2$doScript(CopyIssueWithAttachments.groovy) <+3> at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1054) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128) at com.onresolve.jira.groovy.canned.workflow.postfunctions.CopyIssueWithAttachments.doScript(CopyIssueWithAttachments.groovy:19) at com.onresolve.jira.groovy.canned.workflow.postfunctions.CloneIssue.super$3$doScript(CloneIssue.groovy) <+3> at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1054) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128) at com.onresolve.jira.groovy.canned.workflow.postfunctions.CloneIssue.doScript(CloneIssue.groovy:81) at com.onresolve.jira.groovy.canned.CannedScript$doScript.call(Unknown Source) at com.onresolve.jira.groovy.CannedScriptRunner.runCannedScript(CannedScriptRunner.groovy:60) at com.onresolve.jira.groovy.GroovyRunner.run(GroovyRunner.java:52) <+2> at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSite.invoke(PojoMetaMethodSite.java:189) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120) at com.onresolve.jira.groovy.listener.ScriptRunnerUberListener$_workflowEvent_closure1.doCall(ScriptRunnerUberListener.groovy:48) <+2> at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at groovy.lang.Closure.call(Closure.java:412) at groovy.lang.Closure.call(Closure.java:425) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1377) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1349) 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.jira.groovy.listener.ScriptRunnerUberListener.workflowEvent(ScriptRunnerUberListener.groovy:35) <+2> at java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36) ... 24 more

    JIRA | 4 years ago | Thomas Nakken
    java.lang.RuntimeException: Cannot invoke method getName() on null object
  2. 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-218].{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}We use scriptrunner listener service to clone an issue (bulidt in script) when a comment is added on a closed issue. This works fine if we Comment the issue inside Jira, but when a mail is processed by jira (JEHM) and a comment i added to a closed issue from mail. Scriptrunner buidlt in script fails with Nullpointer exception from com.onresolve.jira.groovy.canned.workflow.postfunctions.AbstractCloneIssue.getUser(). Hope someone can helt / fix the bug. Full stacktrace: from the invoker 'SingleParameterMethodListenerInvoker{method=public void com.onresolve.jira.groovy.listener.ScriptRunnerUber Listener.workflowEvent(com.atlassian.jira.event.issue.IssueEvent), listener=com.onresolve.jira.groovy.listener.ScriptRunnerUberListener@3d1d623a}'. java.lang.RuntimeException: Cannot invoke method getName() on null object at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:66) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:32) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:60) at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:160) at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:79) at com.atlassian.multitenant.event.DefaultPeeringEventPublisherManager.publish(DefaultPeeringEventPublisherManager.java:17) at com.atlassian.multitenant.event.PeeringEventPublisher.publish(PeeringEventPublisher.java:23) at com.atlassian.jira.event.issue.DefaultIssueEventManager.publishEvent(DefaultIssueEventManager.java:124) at com.atlassian.jira.event.issue.DefaultIssueEventManager.dispatchEvent(DefaultIssueEventManager.java:102) at com.atlassian.jira.issue.util.DefaultIssueUpdater.doUpdate(DefaultIssueUpdater.java:88) at com.javahollic.jira.emh.service.ProcessorRunner.sendUpdates(ProcessorRunner.java:1101) at com.javahollic.jira.emh.service.ProcessorRunner.runProcessor(ProcessorRunner.java:902) at com.javahollic.jira.emh.service.ProcessorRunner.execute(ProcessorRunner.java:202) at com.javahollic.jira.emh.service.EnterpriseMessageHandlerImpl.handleMessage(EnterpriseMessageHandlerImpl.java:237) at com.javahollic.jira.emh.service.EnterpriseMessageHandlerProxy.handleMessage(EnterpriseMessageHandlerProxy.java:45) at com.atlassian.jira.service.services.mail.MailFetcherService$1.process(MailFetcherService.java:368) at com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl.getAndProcessMail(MailFetcherService.java:271) at com.atlassian.jira.service.services.mail.MailFetcherService.runImpl(MailFetcherService.java:356) at com.atlassian.jira.service.services.file.AbstractMessageHandlingService.run(AbstractMessageHandlingService.java:252) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:47) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at com.atlassian.multitenant.quartz.MultiTenantThreadPool$MultiTenantRunnable.run(MultiTenantThreadPool.java:72) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) Caused by: java.lang.NullPointerException: Cannot invoke method getName() on null object at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) at com.onresolve.jira.groovy.canned.workflow.postfunctions.AbstractCloneIssue.getUser(AbstractCloneIssue.groovy:87) <+3> at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:267) at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:52) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) at com.onresolve.jira.groovy.canned.workflow.postfunctions.AbstractCloneIssue.doScript(AbstractCloneIssue.groovy:44) at com.onresolve.jira.groovy.canned.workflow.postfunctions.CopyIssueWithAttachments.super$2$doScript(CopyIssueWithAttachments.groovy) <+3> at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1054) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128) at com.onresolve.jira.groovy.canned.workflow.postfunctions.CopyIssueWithAttachments.doScript(CopyIssueWithAttachments.groovy:19) at com.onresolve.jira.groovy.canned.workflow.postfunctions.CloneIssue.super$3$doScript(CloneIssue.groovy) <+3> at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1054) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128) at com.onresolve.jira.groovy.canned.workflow.postfunctions.CloneIssue.doScript(CloneIssue.groovy:81) at com.onresolve.jira.groovy.canned.CannedScript$doScript.call(Unknown Source) at com.onresolve.jira.groovy.CannedScriptRunner.runCannedScript(CannedScriptRunner.groovy:60) at com.onresolve.jira.groovy.GroovyRunner.run(GroovyRunner.java:52) <+2> at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSite.invoke(PojoMetaMethodSite.java:189) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120) at com.onresolve.jira.groovy.listener.ScriptRunnerUberListener$_workflowEvent_closure1.doCall(ScriptRunnerUberListener.groovy:48) <+2> at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at groovy.lang.Closure.call(Closure.java:412) at groovy.lang.Closure.call(Closure.java:425) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1377) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1349) 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.jira.groovy.listener.ScriptRunnerUberListener.workflowEvent(ScriptRunnerUberListener.groovy:35) <+2> at java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36) ... 24 more

    JIRA | 4 years ago | Thomas Nakken
    java.lang.RuntimeException: Cannot invoke method getName() on null object
  3. 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-396].{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}I added a post function "Send custom email" in a workflow on the "Create Issue" step. I moved it down to the bottom, so that it gets executed after the issue has been created. The post function works properly and an email is being sent. However, in the logfiles I encounter this exception when the post function is being executed: 2014-01-07 15:33:46,997 QuartzWorker-0 ERROR ServiceRunner Email support handler [atlassian.event.internal.EventPublisherImpl] There was an exception thrown trying to dispatch event 'com.atlassian.jira.event.issue.IssueEvent@1084c275[issue=TOOL-1094,comment=<null>,worklog=<null>,changelog=<null>,eventTypeId=1,sendMail=true,params={eventsource=workflow, baseurl=https://abcde.fgh.com},subtasksUpdated=false]' from the invoker 'com.atlassian.event.internal.SingleParameterMethodListenerInvoker@25591d82'. java.lang.RuntimeException: Cannot invoke method getName() on null object at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:60) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:28) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:56) at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:151) at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:70) at com.atlassian.multitenant.event.DefaultPeeringEventPublisherManager.publish(DefaultPeeringEventPublisherManager.java:17) at com.atlassian.multitenant.event.PeeringEventPublisher.publish(PeeringEventPublisher.java:23) at com.atlassian.jira.event.issue.IssueEventDispatcher.dispatchEvent(IssueEventDispatcher.java:184) at com.atlassian.jira.event.issue.IssueEventDispatcher.dispatchEvent(IssueEventDispatcher.java:134) at com.atlassian.jira.workflow.function.event.FireIssueEventFunction.execute(FireIssueEventFunction.java:57) at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:1050) at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1446) at com.opensymphony.workflow.AbstractWorkflow.initialize(AbstractWorkflow.java:615) at com.atlassian.jira.workflow.OSWorkflowManager.createIssue(OSWorkflowManager.java:786) at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:441) at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssueObject(DefaultIssueManager.java:518) at com.atlassian.jira.service.util.handler.DefaultMessageHandlerContext.createIssue(DefaultMessageHandlerContext.java:73) at com.atlassian.jira.service.services.mail.DelegatingMessageHandlerContext.createIssue(DelegatingMessageHandlerContext.java:47) at com.atlassian.jira.plugins.mail.handlers.CreateIssueHandler.handleMessage(CreateIssueHandler.java:242) at com.atlassian.jira.plugins.mail.handlers.CreateOrCommentHandler.handleMessage(CreateOrCommentHandler.java:133) at com.atlassian.jira.service.services.mail.MailFetcherService$1.process(MailFetcherService.java:361) at com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl.getAndProcessMail(MailFetcherService.java:264) at com.atlassian.jira.service.services.mail.MailFetcherService.runImpl(MailFetcherService.java:349) at com.atlassian.jira.service.services.file.AbstractMessageHandlingService.run(AbstractMessageHandlingService.java:250) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:47) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at com.atlassian.multitenant.quartz.MultiTenantThreadPool$MultiTenantRunnable.run(MultiTenantThreadPool.java:72) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) Caused by: java.lang.NullPointerException: Cannot invoke method getName() on null object at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) at DevActivityListener.workflowEvent(DevActivityListener.groovy:28) at com.atlassian.jira.event.issue.IssueEventListener$workflowEvent.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at com.atlassian.jira.event.issue.IssueEventListener$workflowEvent.call(Unknown Source) at com.onresolve.jira.groovy.canned.workflow.listeners.CustomListener.doScript(CustomListener.groovy:65) at com.onresolve.jira.groovy.canned.CannedScript$doScript.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at com.onresolve.jira.groovy.canned.CannedScript$doScript.call(Unknown Source) at com.onresolve.jira.groovy.CannedScriptRunner.runCannedScript(CannedScriptRunner.groovy:63) at com.onresolve.jira.groovy.GroovyRunner.run(GroovyRunner.java:52) <+3> (NativeMethodAccessorImpl.java:39) (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSite.invoke(PojoMetaMethodSite.java:189) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120) at com.onresolve.jira.groovy.listener.ScriptRunnerUberListener$_workflowEvent_closure1.doCall(ScriptRunnerUberListener.groovy:48) <+3> (NativeMethodAccessorImpl.java:39) (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at groovy.lang.Closure.call(Closure.java:412) at groovy.lang.Closure.call(Closure.java:425) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1377) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1349) 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.jira.groovy.listener.ScriptRunnerUberListener.workflowEvent(ScriptRunnerUberListener.groovy:35) <+3> (NativeMethodAccessorImpl.java:39) (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36) ... 29 more I am not sure if this exception is based on the Script Runner executing the post function or if it is an exception from the email handler "Email support handler". I tested the same post function in a later transition of the workflow and there I get no exceptions in the log. So I figured it must have something to do with the timing of the issue being created and the post function being executed?

    JIRA | 3 years ago | Florian Zink
    java.lang.RuntimeException: Cannot invoke method getName() 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-399].{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}I've added UpdateBlockedIssues to Resolve Issue transition as stated in the documentation. When resolving an issue no comment is added to the dependent issue. The log contains following stacktrace: 2014-01-22 11:39:13,100 ajp-bio-9009-exec-1692 ERROR rs 699x1028874x1 179yqpi 10.99.99.4 /secure/CommentAssignIssue.jspa [onresolve.jira.groovy .GroovyFunctionPlugin] Error executing post-function java.lang.NullPointerException: Cannot invoke method getName() on null object at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) at com.onresolve.jira.groovy.canned.workflow.postfunctions.UpdateBlockedIssues$_doScript_closure1.doCall(UpdateBlockedIssues.groovy:110 ) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at groovy.lang.Closure.call(Closure.java:412) at groovy.lang.Closure.call(Closure.java:425) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1377) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1349) 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.jira.groovy.canned.workflow.postfunctions.UpdateBlockedIssues.doScript(UpdateBlockedIssues.groovy:105) at com.onresolve.jira.groovy.canned.CannedScript$doScript.call(Unknown Source) at com.onresolve.jira.groovy.CannedScriptRunner.runCannedScript(CannedScriptRunner.groovy:63) at com.onresolve.jira.groovy.GroovyRunner.run(GroovyRunner.java:52) at com.onresolve.jira.groovy.GroovyFunctionPlugin.execute(GroovyFunctionPlugin.java:35) at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:1050) at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1446) at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:564) at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowActionInsideTxn(OSWorkflowManager.java:955) at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowAction(OSWorkflowManager.java:910) at com.atlassian.jira.bc.issue.DefaultIssueService.transition(DefaultIssueService.java:451) at com.atlassian.jira.web.action.issue.CommentAssignIssue.doExecute(CommentAssignIssue.java:196) at webwork.action.ActionSupport.execute(ActionSupport.java:165) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:83) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39) at webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31) ...

    JIRA | 3 years ago | Rainer Schmitz
    java.lang.NullPointerException: Cannot invoke method getName() on null object
  6. 0

    Routes - Expose all Variables to Validate

    GitHub | 6 years ago | codeconsole
    java.lang.NullPointerException: Cannot invoke method getAt() on null object
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 getName() on null object

    at org.codehaus.groovy.runtime.NullObject.invokeMethod()
  2. Groovy
    AbstractCallSite.call
    1. org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77)
    2. org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
    3. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    4. org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32)
    5. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    6. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
    6 frames
  3. com.onresolve.jira
    AbstractCloneIssue.getUser
    1. com.onresolve.jira.groovy.canned.workflow.postfunctions.AbstractCloneIssue.getUser(AbstractCloneIssue.groovy:87)
    1 frame
  4. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Unknown Source)
    1 frame
  5. Groovy
    AbstractCallSite.callCurrent
    1. org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:267)
    2. org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:52)
    3. org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
    3 frames
  6. com.onresolve.jira
    CopyIssueWithAttachments.super$2$doScript
    1. com.onresolve.jira.groovy.canned.workflow.postfunctions.AbstractCloneIssue.doScript(AbstractCloneIssue.groovy:44)
    2. com.onresolve.jira.groovy.canned.workflow.postfunctions.CopyIssueWithAttachments.super$2$doScript(CopyIssueWithAttachments.groovy)
    2 frames
  7. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Unknown Source)
    1 frame
  8. Groovy
    ScriptBytecodeAdapter.invokeMethodOnSuperN
    1. org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    2. groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    3. groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1054)
    4. org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128)
    4 frames
  9. com.onresolve.jira
    CloneIssue.super$3$doScript
    1. com.onresolve.jira.groovy.canned.workflow.postfunctions.CopyIssueWithAttachments.doScript(CopyIssueWithAttachments.groovy:19)
    2. com.onresolve.jira.groovy.canned.workflow.postfunctions.CloneIssue.super$3$doScript(CloneIssue.groovy)
    2 frames
  10. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Unknown Source)
    1 frame
  11. Groovy
    ScriptBytecodeAdapter.invokeMethodOnSuperN
    1. org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    2. groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    3. groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1054)
    4. org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128)
    4 frames
  12. com.onresolve.jira
    GroovyRunner.run
    1. com.onresolve.jira.groovy.canned.workflow.postfunctions.CloneIssue.doScript(CloneIssue.groovy:81)
    2. com.onresolve.jira.groovy.canned.CannedScript$doScript.call(Unknown Source)
    3. com.onresolve.jira.groovy.CannedScriptRunner.runCannedScript(CannedScriptRunner.groovy:60)
    4. com.onresolve.jira.groovy.GroovyRunner.run(GroovyRunner.java:52)
    4 frames
  13. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Unknown Source)
    1 frame
  14. Groovy
    AbstractCallSite.call
    1. org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSite.invoke(PojoMetaMethodSite.java:189)
    2. org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
    3. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
    3 frames
  15. com.onresolve.jira
    ScriptRunnerUberListener$_workflowEvent_closure1.doCall
    1. com.onresolve.jira.groovy.listener.ScriptRunnerUberListener$_workflowEvent_closure1.doCall(ScriptRunnerUberListener.groovy:48)
    1 frame
  16. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Unknown Source)
    1 frame
  17. Groovy
    AbstractCallSite.call
    1. org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    2. groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    3. org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
    4. groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884)
    5. groovy.lang.Closure.call(Closure.java:412)
    6. groovy.lang.Closure.call(Closure.java:425)
    7. org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1377)
    8. org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1349)
    9. org.codehaus.groovy.runtime.dgm$149.invoke(Unknown Source)
    10. org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
    11. org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
    12. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    12 frames
  18. com.onresolve.jira
    ScriptRunnerUberListener.workflowEvent
    1. com.onresolve.jira.groovy.listener.ScriptRunnerUberListener.workflowEvent(ScriptRunnerUberListener.groovy:35)
    1 frame
  19. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Unknown Source)
    1 frame
  20. com.atlassian.event
    EventPublisherImpl.publish
    1. com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36)
    2. com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:66)
    3. com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:32)
    4. com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:60)
    5. com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:160)
    6. com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:79)
    6 frames
  21. com.atlassian.multitenant
    PeeringEventPublisher.publish
    1. com.atlassian.multitenant.event.DefaultPeeringEventPublisherManager.publish(DefaultPeeringEventPublisherManager.java:17)
    2. com.atlassian.multitenant.event.PeeringEventPublisher.publish(PeeringEventPublisher.java:23)
    2 frames
  22. com.atlassian.jira
    DefaultIssueUpdater.doUpdate
    1. com.atlassian.jira.event.issue.DefaultIssueEventManager.publishEvent(DefaultIssueEventManager.java:124)
    2. com.atlassian.jira.event.issue.DefaultIssueEventManager.dispatchEvent(DefaultIssueEventManager.java:102)
    3. com.atlassian.jira.issue.util.DefaultIssueUpdater.doUpdate(DefaultIssueUpdater.java:88)
    3 frames
  23. com.javahollic.jira
    EnterpriseMessageHandlerProxy.handleMessage
    1. com.javahollic.jira.emh.service.ProcessorRunner.sendUpdates(ProcessorRunner.java:1101)
    2. com.javahollic.jira.emh.service.ProcessorRunner.runProcessor(ProcessorRunner.java:902)
    3. com.javahollic.jira.emh.service.ProcessorRunner.execute(ProcessorRunner.java:202)
    4. com.javahollic.jira.emh.service.EnterpriseMessageHandlerImpl.handleMessage(EnterpriseMessageHandlerImpl.java:237)
    5. com.javahollic.jira.emh.service.EnterpriseMessageHandlerProxy.handleMessage(EnterpriseMessageHandlerProxy.java:45)
    5 frames
  24. com.atlassian.jira
    ServiceRunner.execute
    1. com.atlassian.jira.service.services.mail.MailFetcherService$1.process(MailFetcherService.java:368)
    2. com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl.getAndProcessMail(MailFetcherService.java:271)
    3. com.atlassian.jira.service.services.mail.MailFetcherService.runImpl(MailFetcherService.java:356)
    4. com.atlassian.jira.service.services.file.AbstractMessageHandlingService.run(AbstractMessageHandlingService.java:252)
    5. com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61)
    6. com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:47)
    6 frames
  25. quartz
    JobRunShell.run
    1. org.quartz.core.JobRunShell.run(JobRunShell.java:195)
    1 frame
  26. com.atlassian.multitenant
    MultiTenantThreadPool$MultiTenantRunnable.run
    1. com.atlassian.multitenant.quartz.MultiTenantThreadPool$MultiTenantRunnable.run(MultiTenantThreadPool.java:72)
    1 frame
  27. quartz
    SimpleThreadPool$WorkerThread.run
    1. org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
    1 frame