java.lang.NullPointerException

Atlassian JIRA | Marcel Müller | 1 decade ago
  1. 0

    We plan to implement Jira in our company and for this we must prove that regular updates from our old issue tracking system are possible. For this I am writing a Jira service that should get all the issues that have changed in the old system and create/update the issues in Jira. As a first step I try to simply create a trivial issue from a my own service that is running in Jira: public void run() { ... ImportUtils.setSubvertSecurityScheme(true); // stolen form Mantis import code - necessary? ImportUtils.setIndexIssues(false); IssueManager issueManager = ManagerFactory.getIssueManager(); GenericValue project = ManagerFactory.getProjectManager().getProjectByName("Test Project"); Map fields = new HashMap(); fields.put("projectId", project.getLong("id")); fields.put(IssueFieldConstants.REPORTER, "admin"); fields.put(IssueFieldConstants.ASSIGNEE, "admin"); fields.put(IssueFieldConstants.ISSUE_TYPE, "" + IssueFieldConstants.NEWFEATURE_TYPE_ID); fields.put(IssueFieldConstants.SUMMARY, "automatic test bug"); fields.put(IssueFieldConstants.STATUS, "" + IssueFieldConstants.OPEN_STATUS_ID); GenericValue issue = issueManager.createIssue("admin", fields); } This code throws the following error 2005-06-09 19:19:13,934 WARN [sims.jira.service.WatsonUpdateService] Exception running watson update service: null java.lang.NullPointerException at com.atlassian.jira.workflow.SimpleWorkflowManager.createIssue(SimpleWorkflowManager.java:125) at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:262) at com.atlassian.jira.issue.managers.CachingIssueManager.createIssue(CachingIssueManager.java:71) 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:324) at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:71) at com.atlassian.jira.config.component.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:27) at $Proxy2.createIssue(Unknown Source) at com.sims.jira.service.WatsonUpdateService.run(WatsonUpdateService.java:71) at com.atlassian.jira.service.JiraServiceContainer.run(JiraServiceContainer.java:59) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:50) at org.quartz.core.JobRunShell.run(JobRunShell.java:191) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516) Any ideas? I tried for hours but could not fix it... Thank you very much

    Atlassian JIRA | 1 decade ago | Marcel Müller
    java.lang.NullPointerException
  2. 0

    We plan to implement Jira in our company and for this we must prove that regular updates from our old issue tracking system are possible. For this I am writing a Jira service that should get all the issues that have changed in the old system and create/update the issues in Jira. As a first step I try to simply create a trivial issue from a my own service that is running in Jira: public void run() { ... ImportUtils.setSubvertSecurityScheme(true); // stolen form Mantis import code - necessary? ImportUtils.setIndexIssues(false); IssueManager issueManager = ManagerFactory.getIssueManager(); GenericValue project = ManagerFactory.getProjectManager().getProjectByName("Test Project"); Map fields = new HashMap(); fields.put("projectId", project.getLong("id")); fields.put(IssueFieldConstants.REPORTER, "admin"); fields.put(IssueFieldConstants.ASSIGNEE, "admin"); fields.put(IssueFieldConstants.ISSUE_TYPE, "" + IssueFieldConstants.NEWFEATURE_TYPE_ID); fields.put(IssueFieldConstants.SUMMARY, "automatic test bug"); fields.put(IssueFieldConstants.STATUS, "" + IssueFieldConstants.OPEN_STATUS_ID); GenericValue issue = issueManager.createIssue("admin", fields); } This code throws the following error 2005-06-09 19:19:13,934 WARN [sims.jira.service.WatsonUpdateService] Exception running watson update service: null java.lang.NullPointerException at com.atlassian.jira.workflow.SimpleWorkflowManager.createIssue(SimpleWorkflowManager.java:125) at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:262) at com.atlassian.jira.issue.managers.CachingIssueManager.createIssue(CachingIssueManager.java:71) 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:324) at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:71) at com.atlassian.jira.config.component.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:27) at $Proxy2.createIssue(Unknown Source) at com.sims.jira.service.WatsonUpdateService.run(WatsonUpdateService.java:71) at com.atlassian.jira.service.JiraServiceContainer.run(JiraServiceContainer.java:59) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:50) at org.quartz.core.JobRunShell.run(JobRunShell.java:191) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516) Any ideas? I tried for hours but could not fix it... Thank you very much

    Atlassian JIRA | 1 decade ago | Marcel Müller
    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.workflow.SimpleWorkflowManager.createIssue()
    2. com.atlassian.jira
      CachingIssueManager.createIssue
      1. com.atlassian.jira.workflow.SimpleWorkflowManager.createIssue(SimpleWorkflowManager.java:125)
      2. com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:262)
      3. com.atlassian.jira.issue.managers.CachingIssueManager.createIssue(CachingIssueManager.java:71)
      3 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:324)
      4 frames
    4. com.atlassian.util
      ObjectProfiler.profiledInvoke
      1. com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:71)
      1 frame
    5. com.atlassian.jira
      DelegatingInvocationHandler.invoke
      1. com.atlassian.jira.config.component.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:27)
      1 frame
    6. Unknown
      $Proxy2.createIssue
      1. $Proxy2.createIssue(Unknown Source)
      1 frame
    7. com.sims.jira
      WatsonUpdateService.run
      1. com.sims.jira.service.WatsonUpdateService.run(WatsonUpdateService.java:71)
      1 frame
    8. com.atlassian.jira
      ServiceRunner.execute
      1. com.atlassian.jira.service.JiraServiceContainer.run(JiraServiceContainer.java:59)
      2. com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:50)
      2 frames
    9. quartz
      SimpleThreadPool$WorkerThread.run
      1. org.quartz.core.JobRunShell.run(JobRunShell.java:191)
      2. org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
      2 frames