java.lang.NullPointerException

Atlassian JIRA | Tim Pettersen | 6 years ago
  1. 0

    The list of JIRA projects in a linked JIRA instance is loaded once and cached permanently: {code} private Map<String, Long> getProjects() throws IOException, RemoteJiraException, CredentialsRequiredException, NotPermittedException { if (projectIds == null) { final ImmutableMap.Builder<String, Long> builder = ImmutableMap.builder(); for (RemoteProject project : invoke(new JiraSoapOperation<RemoteProject[]>() { public RemoteProject[] run(JiraSoapService jiraSoapService, String authToken) throws RemoteException { return jiraSoapService.getProjectsNoSchemes(authToken); } })) { builder.put(project.getKey(), Long.parseLong(project.getId())); } projectIds = builder.build(); } return projectIds; } {code} This should be time expired, or we should provide some flushing mechanism. This causes NPEs (due to autounboxing a null Long value) when attempting to retrieve JIRA issues from a project that was created in JIRA _after_ your Application Link was created but _before_ the next FishEye server restart. {code} java.lang.NullPointerException at com.atlassian.fisheye.jira.JiraIssueImpl.copyFieldsFrom(JiraIssueImpl.java:92) at com.atlassian.fisheye.jira.JiraIssueImpl.<init>(JiraIssueImpl.java:75) at com.atlassian.fisheye.jira.JiraServerImpl.getIssue(JiraServerImpl.java:249) at com.atlassian.fisheye.jira.issue.JiraIssueServiceImpl.retrieveJiraIssue(JiraIssueServiceImpl.java:277) at com.atlassian.fisheye.jira.issue.JiraIssueServiceImpl.getJiraIssue(JiraIssueServiceImpl.java:183) at com.atlassian.fisheye.jira.issue.JiraIssueServiceImpl.getJiraIssue(JiraIssueServiceImpl.java:126) at com.atlassian.fisheye.jira.action.JiraIssueAjaxAction.execute(JiraIssueAjaxAction.java:34) at sun.reflect.GeneratedMethodAccessor4452.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.opensymphony.xwork.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:358) ........snip........ {code}

    Atlassian JIRA | 6 years ago | Tim Pettersen
    java.lang.NullPointerException
  2. 0

    The list of JIRA projects in a linked JIRA instance is loaded once and cached permanently: {code} private Map<String, Long> getProjects() throws IOException, RemoteJiraException, CredentialsRequiredException, NotPermittedException { if (projectIds == null) { final ImmutableMap.Builder<String, Long> builder = ImmutableMap.builder(); for (RemoteProject project : invoke(new JiraSoapOperation<RemoteProject[]>() { public RemoteProject[] run(JiraSoapService jiraSoapService, String authToken) throws RemoteException { return jiraSoapService.getProjectsNoSchemes(authToken); } })) { builder.put(project.getKey(), Long.parseLong(project.getId())); } projectIds = builder.build(); } return projectIds; } {code} This should be time expired, or we should provide some flushing mechanism. This causes NPEs (due to autounboxing a null Long value) when attempting to retrieve JIRA issues from a project that was created in JIRA _after_ your Application Link was created but _before_ the next FishEye server restart. {code} java.lang.NullPointerException at com.atlassian.fisheye.jira.JiraIssueImpl.copyFieldsFrom(JiraIssueImpl.java:92) at com.atlassian.fisheye.jira.JiraIssueImpl.<init>(JiraIssueImpl.java:75) at com.atlassian.fisheye.jira.JiraServerImpl.getIssue(JiraServerImpl.java:249) at com.atlassian.fisheye.jira.issue.JiraIssueServiceImpl.retrieveJiraIssue(JiraIssueServiceImpl.java:277) at com.atlassian.fisheye.jira.issue.JiraIssueServiceImpl.getJiraIssue(JiraIssueServiceImpl.java:183) at com.atlassian.fisheye.jira.issue.JiraIssueServiceImpl.getJiraIssue(JiraIssueServiceImpl.java:126) at com.atlassian.fisheye.jira.action.JiraIssueAjaxAction.execute(JiraIssueAjaxAction.java:34) at sun.reflect.GeneratedMethodAccessor4452.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.opensymphony.xwork.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:358) ........snip........ {code}

    Atlassian JIRA | 6 years ago | Tim Pettersen
    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.fisheye.jira.JiraIssueImpl.copyFieldsFrom()
    2. com.atlassian.fisheye
      JiraIssueAjaxAction.execute
      1. com.atlassian.fisheye.jira.JiraIssueImpl.copyFieldsFrom(JiraIssueImpl.java:92)
      2. com.atlassian.fisheye.jira.JiraIssueImpl.<init>(JiraIssueImpl.java:75)
      3. com.atlassian.fisheye.jira.JiraServerImpl.getIssue(JiraServerImpl.java:249)
      4. com.atlassian.fisheye.jira.issue.JiraIssueServiceImpl.retrieveJiraIssue(JiraIssueServiceImpl.java:277)
      5. com.atlassian.fisheye.jira.issue.JiraIssueServiceImpl.getJiraIssue(JiraIssueServiceImpl.java:183)
      6. com.atlassian.fisheye.jira.issue.JiraIssueServiceImpl.getJiraIssue(JiraIssueServiceImpl.java:126)
      7. com.atlassian.fisheye.jira.action.JiraIssueAjaxAction.execute(JiraIssueAjaxAction.java:34)
      7 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor4452.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:597)
      3 frames
    4. XWork Tiger Extensions
      DefaultActionInvocation.invokeAction
      1. com.opensymphony.xwork.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:358)
      1 frame