Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-26354

Branch deletion webhook faces NullPointerException cluttering the logs

      Problem

      In certain conditions mentioned below Jira fails to delete a branch because it already doesn't exist in AO_E8B6CC_BRANCH table therefore a NullPointerException happens filling up the logs without appropriate handling or mention of what repo/branch is missing 

      2025-03-19 13:09:49,051+0000 http-nio-8080-exec-2356 url: /rest/bitbucket/1.0/webhook/github DEBUG anonymous 789x23101419x3 - 140.82.115.92 /rest/bitbucket/1.0/webhook/github [c.a.j.p.d.r.external.v1.HookResource] Failed to execute web-hook
      java.lang.NullPointerException
      at com.atlassian.jira.plugins.dvcs.dao.impl.BranchDaoImpl.lambda$asBranches$1(BranchDaoImpl.java:70)
      at com.atlassian.jira.plugins.dvcs.dao.impl.BranchDaoImpl.lambda$asBranches$0(BranchDaoImpl.java:59)
      at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) 

      Conditions that might cause this :

      • Running scheduled DVCS synchronization prior to receiving a webhook
      • Deletion webhook received twice

      Environment

      Jira 9.6.1

      Expected Results

      Jira doesn't find the branch and optionally report that the branch is already nonexistent or deleted if the user picks a debugging level of logs

      Actual Results

      Jira throws a null pointer exception at each failing webhook with no helpful information on the impacted repository/branch 

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available. 

          Form Name

            [JSWSERVER-26354] Branch deletion webhook faces NullPointerException cluttering the logs

              Unassigned Unassigned
              f0ea184c9b1c Mohamed Kouki
              Affected customers:
              1 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated: