java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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).
    via by Andreas Knecht,
  • 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).
    via by Andreas Knecht,
    • java.lang.NullPointerException at com.atlassian.plugin.web.model.DefaultWebLink.getDisplayableUrl(DefaultWebLink.java:47) at com.atlassian.jira.plugin.webfragment.model.JiraWebLink.getDisplayableUrl(JiraWebLink.java:39) at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.convertWebItemToSimpleLink(DefaultSimpleLinkManager.java:286) at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinks(DefaultSimpleLinkManager.java:191) at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinksForSection(DefaultSimpleLinkManager.java:132) at com.atlassian.jira.admin.LegacyAdminLinkFactory.getLinks(LegacyAdminLinkFactory.java:46) at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinks(DefaultSimpleLinkManager.java:204) at com.atlassian.jira.plugin.webfragment.DefaultSimpleLinkManager.getLinksForSection(DefaultSimpleLinkManager.java:132) at sun.reflect.GeneratedMethodAccessor281.invoke(Unknown Source)
    No Bugmate found.