java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NullPointerException

Atlassian JIRA | Carlo Bonamico | 4 years ago
  1. 0

    While testing the Jira API with the Groovy Script Runner, I inadvertently called this method with the wrong value of issueLinkTypeId = 1 {code:java} issueLinkManager.createIssueLink(currentIssue.getId(), createdIssueObject.getId(), 1, 1, authenticationContext.getUser()) {code}   After that, the related issues displays an error in the links section. After launching a ReIndex, the reindex fails and all issues in the project disappear. {code}  java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NullPointerException at com.atlassian.jira.index.FutureResult.await(FutureResult.java:35) at com.atlassian.jira.index.CompositeResultBuilder$CompositeResult.await(CompositeResultBuilder.java:82) at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:286) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:81) at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28) at $Proxy153.reIndexAll(Unknown Source) at com.atlassian.jira.util.index.CompositeIndexLifecycleManager.reIndexAll(CompositeIndexLifecycleManager.java:49) at com.atlassian.jira.web.action.admin.index.ReIndexAsyncIndexerCommand.doReindex(ReIndexAsyncIndexerCommand.java:27) at com.atlassian.jira.web.action.admin.index.AbstractAsyncIndexerCommand.call(AbstractAsyncIndexerCommand.java:54) at com.atlassian.jira.web.action.admin.index.AbstractAsyncIndexerCommand.call(AbstractAsyncIndexerCommand.java:23) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:359) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at com.atlassian.multitenant.impl.DefaultMultiTenantManager.runForTenant(DefaultMultiTenantManager.java:61) at com.atlassian.multitenant.juc.MultiTenantExecutors$WrappedRunnable.run(MultiTenantExecutors.java:160) at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:249) at java.lang.Thread.run(Thread.java:662) Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222) at java.util.concurrent.FutureTask.get(FutureTask.java:83) at com.atlassian.jira.index.FutureResult.await(FutureResult.java:31) ... 23 more Caused by: java.lang.NullPointerException at com.atlassian.jira.issue.index.indexers.impl.SubTaskIndexer.addIndex(SubTaskIndexer.java:54) at com.atlassian.jira.issue.index.IssueDocument.getDocument(IssueDocument.java:40) at com.atlassian.jira.issue.index.DefaultIssueDocumentFactory.get(DefaultIssueDocumentFactory.java:15) at com.atlassian.jira.issue.index.DefaultIssueDocumentFactory.get(DefaultIssueDocumentFactory.java:11) at com.atlassian.jira.issue.index.DefaultIssueIndexer$IssueLockDocumentCreationStrategy$2.get(DefaultIssueIndexer.java:519) at com.atlassian.jira.issue.index.DefaultIssueIndexer$IssueLockDocumentCreationStrategy$2.get(DefaultIssueIndexer.java:516) at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:315) at com.atlassian.jira.issue.index.DefaultIssueIndexer$IssueLockDocumentCreationStrategy.get(DefaultIssueIndexer.java:515) at com.atlassian.jira.issue.index.DefaultIssueIndexer$IssueLockDocumentCreationStrategy.get(DefaultIssueIndexer.java:503) at com.atlassian.jira.issue.index.DefaultIssueIndexer$IndexIssuesOperation.perform(DefaultIssueIndexer.java:374) at com.atlassian.jira.issue.index.DefaultIssueIndexer$4$1.get(DefaultIssueIndexer.java:258) at com.atlassian.jira.issue.index.DefaultIssueIndexer$4$1.get(DefaultIssueIndexer.java:254) at com.atlassian.jira.index.SimpleIndexingStrategy.get(SimpleIndexingStrategy.java:9) at com.atlassian.jira.index.SimpleIndexingStrategy.get(SimpleIndexingStrategy.java:5) at com.atlassian.jira.index.MultiThreadedIndexingStrategy$1.call(MultiThreadedIndexingStrategy.java:39) at com.atlassian.jira.index.MultiThreadedIndexingStrategy$1.call(MultiThreadedIndexingStrategy.java:36) at com.atlassian.jira.util.concurrent.BoundedExecutor$2.call(BoundedExecutor.java:70) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at com.atlassian.multitenant.impl.DefaultMultiTenantManager.runForTenant(DefaultMultiTenantManager.java:61) at com.atlassian.multitenant.juc.MultiTenantExecutors$WrappedRunnable.run(MultiTenantExecutors.java:160) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) ... 1 more {code}  Moreover, it is not possible to delete the project containing the corrupted issues. I would suggest that the call validates its parameters before saving the link.

    Atlassian JIRA | 4 years ago | Carlo Bonamico
    java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NullPointerException
  2. 0

    While testing the Jira API with the Groovy Script Runner, I inadvertently called this method with the wrong value of issueLinkTypeId = 1 {code:java} issueLinkManager.createIssueLink(currentIssue.getId(), createdIssueObject.getId(), 1, 1, authenticationContext.getUser()) {code}   After that, the related issues displays an error in the links section. After launching a ReIndex, the reindex fails and all issues in the project disappear. {code}  java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NullPointerException at com.atlassian.jira.index.FutureResult.await(FutureResult.java:35) at com.atlassian.jira.index.CompositeResultBuilder$CompositeResult.await(CompositeResultBuilder.java:82) at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:286) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:81) at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28) at $Proxy153.reIndexAll(Unknown Source) at com.atlassian.jira.util.index.CompositeIndexLifecycleManager.reIndexAll(CompositeIndexLifecycleManager.java:49) at com.atlassian.jira.web.action.admin.index.ReIndexAsyncIndexerCommand.doReindex(ReIndexAsyncIndexerCommand.java:27) at com.atlassian.jira.web.action.admin.index.AbstractAsyncIndexerCommand.call(AbstractAsyncIndexerCommand.java:54) at com.atlassian.jira.web.action.admin.index.AbstractAsyncIndexerCommand.call(AbstractAsyncIndexerCommand.java:23) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:359) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at com.atlassian.multitenant.impl.DefaultMultiTenantManager.runForTenant(DefaultMultiTenantManager.java:61) at com.atlassian.multitenant.juc.MultiTenantExecutors$WrappedRunnable.run(MultiTenantExecutors.java:160) at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:249) at java.lang.Thread.run(Thread.java:662) Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222) at java.util.concurrent.FutureTask.get(FutureTask.java:83) at com.atlassian.jira.index.FutureResult.await(FutureResult.java:31) ... 23 more Caused by: java.lang.NullPointerException at com.atlassian.jira.issue.index.indexers.impl.SubTaskIndexer.addIndex(SubTaskIndexer.java:54) at com.atlassian.jira.issue.index.IssueDocument.getDocument(IssueDocument.java:40) at com.atlassian.jira.issue.index.DefaultIssueDocumentFactory.get(DefaultIssueDocumentFactory.java:15) at com.atlassian.jira.issue.index.DefaultIssueDocumentFactory.get(DefaultIssueDocumentFactory.java:11) at com.atlassian.jira.issue.index.DefaultIssueIndexer$IssueLockDocumentCreationStrategy$2.get(DefaultIssueIndexer.java:519) at com.atlassian.jira.issue.index.DefaultIssueIndexer$IssueLockDocumentCreationStrategy$2.get(DefaultIssueIndexer.java:516) at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:315) at com.atlassian.jira.issue.index.DefaultIssueIndexer$IssueLockDocumentCreationStrategy.get(DefaultIssueIndexer.java:515) at com.atlassian.jira.issue.index.DefaultIssueIndexer$IssueLockDocumentCreationStrategy.get(DefaultIssueIndexer.java:503) at com.atlassian.jira.issue.index.DefaultIssueIndexer$IndexIssuesOperation.perform(DefaultIssueIndexer.java:374) at com.atlassian.jira.issue.index.DefaultIssueIndexer$4$1.get(DefaultIssueIndexer.java:258) at com.atlassian.jira.issue.index.DefaultIssueIndexer$4$1.get(DefaultIssueIndexer.java:254) at com.atlassian.jira.index.SimpleIndexingStrategy.get(SimpleIndexingStrategy.java:9) at com.atlassian.jira.index.SimpleIndexingStrategy.get(SimpleIndexingStrategy.java:5) at com.atlassian.jira.index.MultiThreadedIndexingStrategy$1.call(MultiThreadedIndexingStrategy.java:39) at com.atlassian.jira.index.MultiThreadedIndexingStrategy$1.call(MultiThreadedIndexingStrategy.java:36) at com.atlassian.jira.util.concurrent.BoundedExecutor$2.call(BoundedExecutor.java:70) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at com.atlassian.multitenant.impl.DefaultMultiTenantManager.runForTenant(DefaultMultiTenantManager.java:61) at com.atlassian.multitenant.juc.MultiTenantExecutors$WrappedRunnable.run(MultiTenantExecutors.java:160) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) ... 1 more {code}  Moreover, it is not possible to delete the project containing the corrupted issues. I would suggest that the call validates its parameters before saving the link.

    Atlassian JIRA | 4 years ago | Carlo Bonamico
    java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NullPointerException
  3. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    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

      No message provided

      at com.atlassian.jira.issue.index.indexers.impl.SubTaskIndexer.addIndex()
    2. com.atlassian.jira
      DefaultIssueIndexer$IssueLockDocumentCreationStrategy$2.get
      1. com.atlassian.jira.issue.index.indexers.impl.SubTaskIndexer.addIndex(SubTaskIndexer.java:54)
      2. com.atlassian.jira.issue.index.IssueDocument.getDocument(IssueDocument.java:40)
      3. com.atlassian.jira.issue.index.DefaultIssueDocumentFactory.get(DefaultIssueDocumentFactory.java:15)
      4. com.atlassian.jira.issue.index.DefaultIssueDocumentFactory.get(DefaultIssueDocumentFactory.java:11)
      5. com.atlassian.jira.issue.index.DefaultIssueIndexer$IssueLockDocumentCreationStrategy$2.get(DefaultIssueIndexer.java:519)
      6. com.atlassian.jira.issue.index.DefaultIssueIndexer$IssueLockDocumentCreationStrategy$2.get(DefaultIssueIndexer.java:516)
      6 frames
    3. com.atlassian.util
      ManagedLocks$ManagedLockImpl.withLock
      1. com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:315)
      1 frame
    4. com.atlassian.jira
      BoundedExecutor$2.call
      1. com.atlassian.jira.issue.index.DefaultIssueIndexer$IssueLockDocumentCreationStrategy.get(DefaultIssueIndexer.java:515)
      2. com.atlassian.jira.issue.index.DefaultIssueIndexer$IssueLockDocumentCreationStrategy.get(DefaultIssueIndexer.java:503)
      3. com.atlassian.jira.issue.index.DefaultIssueIndexer$IndexIssuesOperation.perform(DefaultIssueIndexer.java:374)
      4. com.atlassian.jira.issue.index.DefaultIssueIndexer$4$1.get(DefaultIssueIndexer.java:258)
      5. com.atlassian.jira.issue.index.DefaultIssueIndexer$4$1.get(DefaultIssueIndexer.java:254)
      6. com.atlassian.jira.index.SimpleIndexingStrategy.get(SimpleIndexingStrategy.java:9)
      7. com.atlassian.jira.index.SimpleIndexingStrategy.get(SimpleIndexingStrategy.java:5)
      8. com.atlassian.jira.index.MultiThreadedIndexingStrategy$1.call(MultiThreadedIndexingStrategy.java:39)
      9. com.atlassian.jira.index.MultiThreadedIndexingStrategy$1.call(MultiThreadedIndexingStrategy.java:36)
      10. com.atlassian.jira.util.concurrent.BoundedExecutor$2.call(BoundedExecutor.java:70)
      10 frames
    5. Java RT
      FutureTask.run
      1. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      2. java.util.concurrent.FutureTask.run(FutureTask.java:138)
      2 frames
    6. com.atlassian.multitenant
      MultiTenantExecutors$WrappedRunnable.run
      1. com.atlassian.multitenant.impl.DefaultMultiTenantManager.runForTenant(DefaultMultiTenantManager.java:61)
      2. com.atlassian.multitenant.juc.MultiTenantExecutors$WrappedRunnable.run(MultiTenantExecutors.java:160)
      2 frames
    7. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      3. java.lang.Thread.run(Thread.java:662)
      3 frames