java.lang.NullPointerException

Atlassian JIRA | Andrew Myers [Atlassian] | 8 years ago
  1. 0

    We have discovered a bug in the com.atlassian.jira.workflow.function.misc.CreateCommentFunction.java. I have attached our fixed and tested class. Notice the changes on Lines 54-57, checking for a null remote user before sending the username into the create comment function. Steps to recreate: # Create new workflow with a transition that has no permission restrictions to execute # Create a blank screen as the screen for that transition (aka only the comment box shows up) # assign to a workflow scheme and a project # allow Group Anyone to add a comment permission on project # Create an incident # Log out and execute workflow transition for incident, filling in comment box Expected result, comment saves as anonymous Actual result, workflow transition throws NullPointerException. {noformat} 2009-01-22 16:17:27,075 http-8080-7 ERROR [workflow.function.misc.CreateCommentFunction] Exception: java.lang.NullPointerException java.lang.NullPointerException at com.atlassian.jira.workflow.function.misc.CreateCommentFunction.execute(CreateCommentFunction.java:56) at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:869) at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1265) at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:567) at com.atlassian.jira.workflow.SimpleWorkflowManager.doWorkflowAction(SimpleWorkflowManager.java:298) at com.atlassian.jira.workflow.WorkflowTransitionUtilImpl.progress(WorkflowTransitionUtilImpl.java:264) at com.atlassian.jira.web.action.issue.CommentAssignIssue.doExecute(CommentAssignIssue.java:245) at webwork.action.ActionSupport.execute(ActionSupport.java:153) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:54) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:132) at com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:178) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) {noformat} Thanks to Brad Svee for raising this bug and developing the fix to check for a null user.

    Atlassian JIRA | 8 years ago | Andrew Myers [Atlassian]
    java.lang.NullPointerException
  2. 0

    We have discovered a bug in the com.atlassian.jira.workflow.function.misc.CreateCommentFunction.java. I have attached our fixed and tested class. Notice the changes on Lines 54-57, checking for a null remote user before sending the username into the create comment function. Steps to recreate: # Create new workflow with a transition that has no permission restrictions to execute # Create a blank screen as the screen for that transition (aka only the comment box shows up) # assign to a workflow scheme and a project # allow Group Anyone to add a comment permission on project # Create an incident # Log out and execute workflow transition for incident, filling in comment box Expected result, comment saves as anonymous Actual result, workflow transition throws NullPointerException. {noformat} 2009-01-22 16:17:27,075 http-8080-7 ERROR [workflow.function.misc.CreateCommentFunction] Exception: java.lang.NullPointerException java.lang.NullPointerException at com.atlassian.jira.workflow.function.misc.CreateCommentFunction.execute(CreateCommentFunction.java:56) at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:869) at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1265) at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:567) at com.atlassian.jira.workflow.SimpleWorkflowManager.doWorkflowAction(SimpleWorkflowManager.java:298) at com.atlassian.jira.workflow.WorkflowTransitionUtilImpl.progress(WorkflowTransitionUtilImpl.java:264) at com.atlassian.jira.web.action.issue.CommentAssignIssue.doExecute(CommentAssignIssue.java:245) at webwork.action.ActionSupport.execute(ActionSupport.java:153) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:54) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:132) at com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:178) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) {noformat} Thanks to Brad Svee for raising this bug and developing the fix to check for a null user.

    Atlassian JIRA | 8 years ago | Andrew Myers [Atlassian]
    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.function.misc.CreateCommentFunction.execute()
    2. com.atlassian.jira
      CreateCommentFunction.execute
      1. com.atlassian.jira.workflow.function.misc.CreateCommentFunction.execute(CreateCommentFunction.java:56)
      1 frame
    3. com.opensymphony.workflow
      AbstractWorkflow.doAction
      1. com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:869)
      2. com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1265)
      3. com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:567)
      3 frames
    4. com.atlassian.jira
      CommentAssignIssue.doExecute
      1. com.atlassian.jira.workflow.SimpleWorkflowManager.doWorkflowAction(SimpleWorkflowManager.java:298)
      2. com.atlassian.jira.workflow.WorkflowTransitionUtilImpl.progress(WorkflowTransitionUtilImpl.java:264)
      3. com.atlassian.jira.web.action.issue.CommentAssignIssue.doExecute(CommentAssignIssue.java:245)
      3 frames
    5. webwork.action
      ActionSupport.execute
      1. webwork.action.ActionSupport.execute(ActionSupport.java:153)
      1 frame
    6. com.atlassian.jira
      JiraActionSupport.execute
      1. com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:54)
      1 frame
    7. webwork.dispatcher
      GenericDispatcher.executeAction
      1. webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:132)
      1 frame
    8. com.atlassian.jira
      JiraServletDispatcher.service
      1. com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:178)
      1 frame
    9. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      1 frame
    10. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      2 frames