java.lang.NullPointerException

Atlassian JIRA | Fidel Castro Armario | 1 year ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Hi, I have found that since version 7.1.0, when I call to method [search()|https://docs.atlassian.com/software/jira/docs/api/latest/com/atlassian/jira/bc/issue/search/SearchService.html#search-com.atlassian.jira.user.ApplicationUser-com.atlassian.query.Query-com.atlassian.jira.web.bean.PagerFilter-] of [com.atlassian.jira.bc.issue.search.DefaultSearchService|https://docs.atlassian.com/software/jira/docs/api/latest/com/atlassian/jira/bc/issue/search/DefaultSearchService.html] from a thread different from the current session's thread (sorry for the terminology), I get a *NullPointerException*. When the method is called from JIRA current session's thread the exception is not thrown, and all works correctly. This problem doesn't happen with versions previous to 7.1.0, and is related with the introduction of class [DefaultInstrumentationListenerManager|https://docs.atlassian.com/software/jira/docs/api/latest/com/atlassian/jira/instrumentation/DefaultInstrumentationListenerManager.html] since version 7.1.0. A stack trace related with the problem is: {noformat} 2016-03-23 14:53:19,003 Timer-11 ERROR admin 893x1320x1 13kzhkq 0:0:0:0:0:0:0:1 /secure/WorkflowUIDispatcher.jspa [c.a.jira.workflow.OSWorkflowManager] Caught exception while attempting to perform action 1151 from workflow 10600 on issue 'CRM-1' com.opensymphony.workflow.WorkflowException: An unknown exception occured executing Validator com.atlassian.jira.workflow.SkippableValidator@20ba407e: root cause: java.lang.NullPointerException at com.opensymphony.workflow.AbstractWorkflow.verifyInputs(AbstractWorkflow.java:1523) at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1203) at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:564) at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowActionInsideTxn(OSWorkflowManager.java:826) at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowAction(OSWorkflowManager.java:786) at com.atlassian.jira.bc.issue.DefaultIssueService.transition(DefaultIssueService.java:449) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.fca.jira.plugins.workflowToolbox.shared.ReflectionHelper.invokeMethod(ReflectionHelper.java:136) at com.fca.jira.plugins.workflowToolbox.shared.JIRACompatibilityHelper.transition(JIRACompatibilityHelper.java:206) at com.fca.jira.plugins.workflowToolbox.shared.IssueTransitionManager.transitionIssue(IssueTransitionManager.java:433) at com.fca.jira.plugins.workflowToolbox.shared.IssueTransitionManager.executeTransitionIssue(IssueTransitionManager.java:381) at com.fca.jira.plugins.workflowToolbox.shared.IssueTransitionManager.directTransitioner(IssueTransitionManager.java:178) at com.fca.jira.plugins.workflowToolbox.shared.IssueTransitionManager.executeAssignment(IssueTransitionManager.java:311) at com.fca.jira.plugins.workflowToolbox.tasks.FieldWriterTask.run(FieldWriterTask.java:46) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) Caused by: java.lang.NullPointerException at com.atlassian.jira.instrumentation.DefaultInstrumentationListenerManager.getCurrentTraceId(DefaultInstrumentationListenerManager.java:200) at com.atlassian.jira.issue.search.providers.DualSearchProvider.recordMetrics(DualSearchProvider.java:169) at com.atlassian.jira.issue.search.providers.DualSearchProvider.performSearch(DualSearchProvider.java:138) at com.atlassian.jira.issue.search.providers.DualSearchProvider.search(DualSearchProvider.java:79) at com.atlassian.jira.bc.issue.search.DefaultSearchService.search(DefaultSearchService.java:111) ... 1 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy358.search(Unknown Source) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136) at com.sun.proxy.$Proxy358.search(Unknown Source) at com.fca.jira.plugins.workflowToolbox.JQLCondition.jqlQueryConditionEvaluation(JQLCondition.java:101) at com.fca.jira.plugins.workflowToolbox.JQLValidator.validate(JQLValidator.java:44) at com.atlassian.jira.workflow.SkippableValidator.validate(SkippableValidator.java:45) at com.opensymphony.workflow.AbstractWorkflow.verifyInputs(AbstractWorkflow.java:1512) ... 18 more Root cause: java.lang.NullPointerException at com.atlassian.jira.instrumentation.DefaultInstrumentationListenerManager.getCurrentTraceId(DefaultInstrumentationListenerManager.java:200) at com.atlassian.jira.issue.search.providers.DualSearchProvider.recordMetrics(DualSearchProvider.java:169) at com.atlassian.jira.issue.search.providers.DualSearchProvider.performSearch(DualSearchProvider.java:138) at com.atlassian.jira.issue.search.providers.DualSearchProvider.search(DualSearchProvider.java:79) at com.atlassian.jira.bc.issue.search.DefaultSearchService.search(DefaultSearchService.java:111) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy358.search(Unknown Source) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136) at com.sun.proxy.$Proxy358.search(Unknown Source) at com.fca.jira.plugins.workflowToolbox.JQLCondition.jqlQueryConditionEvaluation(JQLCondition.java:101) at com.fca.jira.plugins.workflowToolbox.JQLValidator.validate(JQLValidator.java:44) at com.atlassian.jira.workflow.SkippableValidator.validate(SkippableValidator.java:45) at com.opensymphony.workflow.AbstractWorkflow.verifyInputs(AbstractWorkflow.java:1512) at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1203) at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:564) at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowActionInsideTxn(OSWorkflowManager.java:826) at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowAction(OSWorkflowManager.java:786) at com.atlassian.jira.bc.issue.DefaultIssueService.transition(DefaultIssueService.java:449) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.fca.jira.plugins.workflowToolbox.shared.ReflectionHelper.invokeMethod(ReflectionHelper.java:136) at com.fca.jira.plugins.workflowToolbox.shared.JIRACompatibilityHelper.transition(JIRACompatibilityHelper.java:206) at com.fca.jira.plugins.workflowToolbox.shared.IssueTransitionManager.transitionIssue(IssueTransitionManager.java:433) at com.fca.jira.plugins.workflowToolbox.shared.IssueTransitionManager.executeTransitionIssue(IssueTransitionManager.java:381) at com.fca.jira.plugins.workflowToolbox.shared.IssueTransitionManager.directTransitioner(IssueTransitionManager.java:178) at com.fca.jira.plugins.workflowToolbox.shared.IssueTransitionManager.executeAssignment(IssueTransitionManager.java:311) at com.fca.jira.plugins.workflowToolbox.tasks.FieldWriterTask.run(FieldWriterTask.java:46) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) 2016-03-23 14:53:19,425 http-nio-8080-exec-23 WARN admin 893x1321x1 13kzhkq 0:0:0:0:0:0:0:1 /secure/AjaxIssueAction!default.jspa [c.a.j.i.search.util.SearchPropertiesManager] Invalid filter ID in user preferences: {noformat}

    Atlassian JIRA | 1 year ago | Fidel Castro Armario
    java.lang.NullPointerException
  2. 0

    Hi, I have found that since version 7.1.0, when I call to method [search()|https://docs.atlassian.com/software/jira/docs/api/latest/com/atlassian/jira/bc/issue/search/SearchService.html#search-com.atlassian.jira.user.ApplicationUser-com.atlassian.query.Query-com.atlassian.jira.web.bean.PagerFilter-] of [com.atlassian.jira.bc.issue.search.DefaultSearchService|https://docs.atlassian.com/software/jira/docs/api/latest/com/atlassian/jira/bc/issue/search/DefaultSearchService.html] from a thread different from the current session's thread (sorry for the terminology), I get a *NullPointerException*. When the method is called from JIRA current session's thread the exception is not thrown, and all works correctly. This problem doesn't happen with versions previous to 7.1.0, and is related with the introduction of class [DefaultInstrumentationListenerManager|https://docs.atlassian.com/software/jira/docs/api/latest/com/atlassian/jira/instrumentation/DefaultInstrumentationListenerManager.html] since version 7.1.0. A stack trace related with the problem is: {noformat} 2016-03-23 14:53:19,003 Timer-11 ERROR admin 893x1320x1 13kzhkq 0:0:0:0:0:0:0:1 /secure/WorkflowUIDispatcher.jspa [c.a.jira.workflow.OSWorkflowManager] Caught exception while attempting to perform action 1151 from workflow 10600 on issue 'CRM-1' com.opensymphony.workflow.WorkflowException: An unknown exception occured executing Validator com.atlassian.jira.workflow.SkippableValidator@20ba407e: root cause: java.lang.NullPointerException at com.opensymphony.workflow.AbstractWorkflow.verifyInputs(AbstractWorkflow.java:1523) at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1203) at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:564) at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowActionInsideTxn(OSWorkflowManager.java:826) at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowAction(OSWorkflowManager.java:786) at com.atlassian.jira.bc.issue.DefaultIssueService.transition(DefaultIssueService.java:449) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.fca.jira.plugins.workflowToolbox.shared.ReflectionHelper.invokeMethod(ReflectionHelper.java:136) at com.fca.jira.plugins.workflowToolbox.shared.JIRACompatibilityHelper.transition(JIRACompatibilityHelper.java:206) at com.fca.jira.plugins.workflowToolbox.shared.IssueTransitionManager.transitionIssue(IssueTransitionManager.java:433) at com.fca.jira.plugins.workflowToolbox.shared.IssueTransitionManager.executeTransitionIssue(IssueTransitionManager.java:381) at com.fca.jira.plugins.workflowToolbox.shared.IssueTransitionManager.directTransitioner(IssueTransitionManager.java:178) at com.fca.jira.plugins.workflowToolbox.shared.IssueTransitionManager.executeAssignment(IssueTransitionManager.java:311) at com.fca.jira.plugins.workflowToolbox.tasks.FieldWriterTask.run(FieldWriterTask.java:46) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) Caused by: java.lang.NullPointerException at com.atlassian.jira.instrumentation.DefaultInstrumentationListenerManager.getCurrentTraceId(DefaultInstrumentationListenerManager.java:200) at com.atlassian.jira.issue.search.providers.DualSearchProvider.recordMetrics(DualSearchProvider.java:169) at com.atlassian.jira.issue.search.providers.DualSearchProvider.performSearch(DualSearchProvider.java:138) at com.atlassian.jira.issue.search.providers.DualSearchProvider.search(DualSearchProvider.java:79) at com.atlassian.jira.bc.issue.search.DefaultSearchService.search(DefaultSearchService.java:111) ... 1 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy358.search(Unknown Source) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136) at com.sun.proxy.$Proxy358.search(Unknown Source) at com.fca.jira.plugins.workflowToolbox.JQLCondition.jqlQueryConditionEvaluation(JQLCondition.java:101) at com.fca.jira.plugins.workflowToolbox.JQLValidator.validate(JQLValidator.java:44) at com.atlassian.jira.workflow.SkippableValidator.validate(SkippableValidator.java:45) at com.opensymphony.workflow.AbstractWorkflow.verifyInputs(AbstractWorkflow.java:1512) ... 18 more Root cause: java.lang.NullPointerException at com.atlassian.jira.instrumentation.DefaultInstrumentationListenerManager.getCurrentTraceId(DefaultInstrumentationListenerManager.java:200) at com.atlassian.jira.issue.search.providers.DualSearchProvider.recordMetrics(DualSearchProvider.java:169) at com.atlassian.jira.issue.search.providers.DualSearchProvider.performSearch(DualSearchProvider.java:138) at com.atlassian.jira.issue.search.providers.DualSearchProvider.search(DualSearchProvider.java:79) at com.atlassian.jira.bc.issue.search.DefaultSearchService.search(DefaultSearchService.java:111) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy358.search(Unknown Source) ... 2 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136) at com.sun.proxy.$Proxy358.search(Unknown Source) at com.fca.jira.plugins.workflowToolbox.JQLCondition.jqlQueryConditionEvaluation(JQLCondition.java:101) at com.fca.jira.plugins.workflowToolbox.JQLValidator.validate(JQLValidator.java:44) at com.atlassian.jira.workflow.SkippableValidator.validate(SkippableValidator.java:45) at com.opensymphony.workflow.AbstractWorkflow.verifyInputs(AbstractWorkflow.java:1512) at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1203) at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:564) at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowActionInsideTxn(OSWorkflowManager.java:826) at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowAction(OSWorkflowManager.java:786) at com.atlassian.jira.bc.issue.DefaultIssueService.transition(DefaultIssueService.java:449) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:498) at com.fca.jira.plugins.workflowToolbox.shared.ReflectionHelper.invokeMethod(ReflectionHelper.java:136) at com.fca.jira.plugins.workflowToolbox.shared.JIRACompatibilityHelper.transition(JIRACompatibilityHelper.java:206) at com.fca.jira.plugins.workflowToolbox.shared.IssueTransitionManager.transitionIssue(IssueTransitionManager.java:433) at com.fca.jira.plugins.workflowToolbox.shared.IssueTransitionManager.executeTransitionIssue(IssueTransitionManager.java:381) at com.fca.jira.plugins.workflowToolbox.shared.IssueTransitionManager.directTransitioner(IssueTransitionManager.java:178) at com.fca.jira.plugins.workflowToolbox.shared.IssueTransitionManager.executeAssignment(IssueTransitionManager.java:311) at com.fca.jira.plugins.workflowToolbox.tasks.FieldWriterTask.run(FieldWriterTask.java:46) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) 2016-03-23 14:53:19,425 http-nio-8080-exec-23 WARN admin 893x1321x1 13kzhkq 0:0:0:0:0:0:0:1 /secure/AjaxIssueAction!default.jspa [c.a.j.i.search.util.SearchPropertiesManager] Invalid filter ID in user preferences: {noformat}

    Atlassian JIRA | 1 year ago | Fidel Castro Armario
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.atlassian.jira.instrumentation.DefaultInstrumentationListenerManager.getCurrentTraceId()
    2. com.atlassian.jira
      DefaultSearchService.search
      1. com.atlassian.jira.instrumentation.DefaultInstrumentationListenerManager.getCurrentTraceId(DefaultInstrumentationListenerManager.java:200)
      2. com.atlassian.jira.issue.search.providers.DualSearchProvider.recordMetrics(DualSearchProvider.java:169)
      3. com.atlassian.jira.issue.search.providers.DualSearchProvider.performSearch(DualSearchProvider.java:138)
      4. com.atlassian.jira.issue.search.providers.DualSearchProvider.search(DualSearchProvider.java:79)
      5. com.atlassian.jira.bc.issue.search.DefaultSearchService.search(DefaultSearchService.java:111)
      5 frames