java.lang.NullPointerException

Atlassian JIRA | Josh Wheeler | 10 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    {code:java}UserUtil.userExists(String userName){code}[(JavaDoc)|https://docs.atlassian.com/jira/latest/com/atlassian/jira/user/util/UserUtil.html#userExists-java.lang.String-] is supposed to return a *boolean*. Searching through the source code, there's an issue with {code:java} UserUtilImpl.userExists(final String userName) {code} *userExists* is calling {code:java} crowdService.getUser(userName) {code} I wasn't able to find that class from the Jira Software 7.1.2 source, but I'd imagine that a _user-not-found_ instance is not being caught. {noformat} 2016-04-18 13:40:38,536 http-nio-8080-exec-12 ERROR [o.a.c.c.C.[.[localhost].[/jira].[default]] Servlet.service() for servlet [default] in context with path [/jira] threw exception java.lang.NullPointerException at com.example.jira.WamAuthenticator.getUser(WamAuthenticator.java:138) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:139) at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ... 13 filtered at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37) ... 3 filtered at com.atlassian.jira.rest.auth.JiraRestSeraphAuthFilter.doFilter(JiraRestSeraphAuthFilter.java:41) ... 74 filtered at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) {noformat}

    Atlassian JIRA | 10 months ago | Josh Wheeler
    java.lang.NullPointerException
  2. 0

    {code:java}UserUtil.userExists(String userName){code}[(JavaDoc)|https://docs.atlassian.com/jira/latest/com/atlassian/jira/user/util/UserUtil.html#userExists-java.lang.String-] is supposed to return a *boolean*. Searching through the source code, there's an issue with {code:java} UserUtilImpl.userExists(final String userName) {code} *userExists* is calling {code:java} crowdService.getUser(userName) {code} I wasn't able to find that class from the Jira Software 7.1.2 source, but I'd imagine that a _user-not-found_ instance is not being caught. {noformat} 2016-04-18 13:40:38,536 http-nio-8080-exec-12 ERROR [o.a.c.c.C.[.[localhost].[/jira].[default]] Servlet.service() for servlet [default] in context with path [/jira] threw exception java.lang.NullPointerException at com.example.jira.WamAuthenticator.getUser(WamAuthenticator.java:138) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:139) at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) ... 13 filtered at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37) ... 3 filtered at com.atlassian.jira.rest.auth.JiraRestSeraphAuthFilter.doFilter(JiraRestSeraphAuthFilter.java:41) ... 74 filtered at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) {noformat}

    Atlassian JIRA | 10 months ago | Josh Wheeler
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.example.jira.WamAuthenticator.getUser()
    2. com.example.jira
      WamAuthenticator.getUser
      1. com.example.jira.WamAuthenticator.getUser(WamAuthenticator.java:138)
      1 frame
    3. com.atlassian.seraph
      SecurityFilter.doFilter
      1. com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:139)
      1 frame
    4. com.atlassian.jira
      JiraSecurityFilter.doFilter
      1. com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70)
      1 frame
    5. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames