Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-21242

Tag trigger shows an NullPointerException in logs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 7.2.4
    • 7.2.1
    • Triggers
    • None

    Description

      Issue Summary

      When using tag triggers, Bamboo will log a NullPpointerExceltion if there is data inconsistency in the Database.

      Steps to Reproduce

      This is a way to reproduce the error:

      1. Create a repository with 1 tag: release1.
      2. Push the tag to Bitbucket Server.
      3. Create a Linked Repository in Bamboo and link it to a plan.
      4. Add a tag trigger to that plan.
      5. Wait for it to detect the initial tag:
      6. Delete that tag and create + push a new one:

      Expected Results

      No errors displayed in logs.

      Actual Results

      The following error is displayed in the server logs:

      2021-02-15 15:39:46,076 ERROR [26-TagDetectionBackgroundThread:pool-49-thread-1] [TagDetectionServiceImpl] An exception occurred when trying to read and handle tags from repository
      java.lang.NullPointerException
      	at com.atlassian.bamboo.tag.service.NewTagsDetector.compareAndReturnNewTags(NewTagsDetector.java:39)
      	at com.atlassian.bamboo.tag.service.TagDetectionServiceImpl.detectTagsForRepository(TagDetectionServiceImpl.java:107)
      	at com.atlassian.bamboo.tag.service.TagDetectorThread$1.run(TagDetectorThread.java:26)
      	at com.atlassian.bamboo.plugin.BambooPluginUtils$Runnable.call(BambooPluginUtils.java:108)
      	at com.atlassian.bamboo.plugin.BambooPluginUtils$Runnable.call(BambooPluginUtils.java:101)
      	at com.atlassian.bamboo.plugin.BambooPluginUtils.callUnsafeCode(BambooPluginUtils.java:55)
      	at com.atlassian.bamboo.tag.service.TagDetectorThread.run(TagDetectorThread.java:50)
      	at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
      	at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
      	at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
      	at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
      	at java.lang.Thread.run(Thread.java:748)
      

      There are a variety of scenarios to get a NullPointerException, realted to the content of the table VCS_TAG, regardless of whether the trigger works or not.

      Workaround

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

      Attachments

        Issue Links

          Activity

            People

              8e64d0eeb173 Jan Kolanowski (Inactive)
              pdemitrio Patricio
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: