java.lang.NullPointerException

Atlassian JIRA | Andreas Knecht | 3 years ago
  1. 0

    In LegacyAdminLinkFactory we have this code: {noformat} @Override public List<SimpleLink> getLinks(User user, Map<String, Object> params) { final JiraHelper helper = new JiraHelper(ServletActionContext.getRequest()); final List<SimpleLink> ret = new ArrayList<SimpleLink>(); final List<SimpleLinkSection> sections = simpleLinkManager.getSectionsForLocation(SYSTEM_ADMIN_LOCATION, user, helper); for (SimpleLinkSection section : sections) { ret.addAll(simpleLinkManager.getLinksForSection(SYSTEM_ADMIN_LOCATION + "/" + section.getId(), user, helper)); } return ret; } {noformat} This causes problems when using admin quick search g + g (which goes through REST) with legacy links: {noformat} [INFO] [talledLocalContainer] 2013-08-16 13:17:46,204 http-bio-2990-exec-40 DEBUG admin 797x2281x1 h451kq 0:0:0:0:0:0:0:1%0 /rest/adminquicksearch/latest/links/default [jira.plugin.webfragment.DefaultSimpleLinkManager] RuntimeException converting item 'com.atlassian.jira.ext.anyfooter:anyfooter-config-link' to Simple link. This link will be skipped. [INFO] [talledLocalContainer] java.lang.NullPointerException [INFO] [talledLocalContainer] at com.atlassian.plugin.web.model.DefaultWebLink.getDisplayableUrl(DefaultWebLink.java:47) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.webfragment.model.JiraWebLink.getDisplayableUrl(JiraWebLink.java:39) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.convertWebItemToSimpleLink(DefaultSimpleLinkManager.java:286) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinks(DefaultSimpleLinkManager.java:191) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinksForSection(DefaultSimpleLinkManager.java:132) [INFO] [talledLocalContainer] at com.atlassian.jira.admin.LegacyAdminLinkFactory.getLinks(LegacyAdminLinkFactory.java:46) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinks(DefaultSimpleLinkManager.java:204) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinksForSection(DefaultSimpleLinkManager.java:132) [INFO] [talledLocalContainer] at sun.reflect.GeneratedMethodAccessor281.invoke(Unknown Source) [INFO] [talledLocalContainer] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegati {noformat} It should use ExcecutingHttpRequest.get() to get the request which also works for REST (ServletActionContext only works for webwork requests).

    Atlassian JIRA | 3 years ago | Andreas Knecht
    java.lang.NullPointerException
  2. 0

    In LegacyAdminLinkFactory we have this code: {noformat} @Override public List<SimpleLink> getLinks(User user, Map<String, Object> params) { final JiraHelper helper = new JiraHelper(ServletActionContext.getRequest()); final List<SimpleLink> ret = new ArrayList<SimpleLink>(); final List<SimpleLinkSection> sections = simpleLinkManager.getSectionsForLocation(SYSTEM_ADMIN_LOCATION, user, helper); for (SimpleLinkSection section : sections) { ret.addAll(simpleLinkManager.getLinksForSection(SYSTEM_ADMIN_LOCATION + "/" + section.getId(), user, helper)); } return ret; } {noformat} This causes problems when using admin quick search g + g (which goes through REST) with legacy links: {noformat} [INFO] [talledLocalContainer] 2013-08-16 13:17:46,204 http-bio-2990-exec-40 DEBUG admin 797x2281x1 h451kq 0:0:0:0:0:0:0:1%0 /rest/adminquicksearch/latest/links/default [jira.plugin.webfragment.DefaultSimpleLinkManager] RuntimeException converting item 'com.atlassian.jira.ext.anyfooter:anyfooter-config-link' to Simple link. This link will be skipped. [INFO] [talledLocalContainer] java.lang.NullPointerException [INFO] [talledLocalContainer] at com.atlassian.plugin.web.model.DefaultWebLink.getDisplayableUrl(DefaultWebLink.java:47) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.webfragment.model.JiraWebLink.getDisplayableUrl(JiraWebLink.java:39) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.convertWebItemToSimpleLink(DefaultSimpleLinkManager.java:286) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinks(DefaultSimpleLinkManager.java:191) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinksForSection(DefaultSimpleLinkManager.java:132) [INFO] [talledLocalContainer] at com.atlassian.jira.admin.LegacyAdminLinkFactory.getLinks(LegacyAdminLinkFactory.java:46) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinks(DefaultSimpleLinkManager.java:204) [INFO] [talledLocalContainer] at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinksForSection(DefaultSimpleLinkManager.java:132) [INFO] [talledLocalContainer] at sun.reflect.GeneratedMethodAccessor281.invoke(Unknown Source) [INFO] [talledLocalContainer] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegati {noformat} It should use ExcecutingHttpRequest.get() to get the request which also works for REST (ServletActionContext only works for webwork requests).

    Atlassian JIRA | 3 years ago | Andreas Knecht
    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.plugin.web.model.DefaultWebLink.getDisplayableUrl()
    2. com.atlassian.plugin
      DefaultWebLink.getDisplayableUrl
      1. com.atlassian.plugin.web.model.DefaultWebLink.getDisplayableUrl(DefaultWebLink.java:47)
      1 frame
    3. com.atlassian.jira
      DefaultSimpleLinkManager.getLinksForSection
      1. com.atlassian.jira.plugin.webfragment.model.JiraWebLink.getDisplayableUrl(JiraWebLink.java:39)
      2. com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.convertWebItemToSimpleLink(DefaultSimpleLinkManager.java:286)
      3. com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinks(DefaultSimpleLinkManager.java:191)
      4. com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinksForSection(DefaultSimpleLinkManager.java:132)
      5. com.atlassian.jira.admin.LegacyAdminLinkFactory.getLinks(LegacyAdminLinkFactory.java:46)
      6. com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinks(DefaultSimpleLinkManager.java:204)
      7. com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinksForSection(DefaultSimpleLinkManager.java:132)
      7 frames
    4. Java RT
      GeneratedMethodAccessor281.invoke
      1. sun.reflect.GeneratedMethodAccessor281.invoke(Unknown Source)
      1 frame