Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-15388

Bitbucket Server Validation fails on missing response body

    XMLWordPrintable

    Details

    • Edition:
      Community
    • Production Notes:
      None

      Description

      When making a call to Bitbucket Server to validate connectivity, an error is thrown:

      2021.09.07 12:51:53 ERROR web[AXu/j9kDj127vA2RAAa1][o.s.s.w.WebServiceEngine] Fail to process request http://sonarqube.xxxx.yyy/api/alm_settings/validate?key=EW%20Bitbucket
      java.lang.NullPointerException: null
          at java.base/java.util.Arrays.stream(Unknown Source)
          at java.base/java.util.stream.Stream.of(Unknown Source)
          at org.sonar.alm.client.bitbucketserver.BitbucketServerRestClient.getErrorMessage(BitbucketServerRestClient.java:170)
          at org.sonar.alm.client.bitbucketserver.BitbucketServerRestClient.handleError(BitbucketServerRestClient.java:151)
          at org.sonar.alm.client.bitbucketserver.BitbucketServerRestClient.doCall(BitbucketServerRestClient.java:138)
          at org.sonar.alm.client.bitbucketserver.BitbucketServerRestClient.doGet(BitbucketServerRestClient.java:120)
          at org.sonar.alm.client.bitbucketserver.BitbucketServerRestClient.validateUrl(BitbucketServerRestClient.java:71)
          at org.sonar.server.almsettings.ws.ValidateAction.validateBitbucketServer(ValidateAction.java:147)
      

      It is due to a missing response body, and this NPE in getErrorMessage prevents us to get any useful info from here.

        Attachments

          Activity

            People

            Assignee:
            belen.pruvost Belén Pruvost
            Reporter:
            belen.pruvost Belén Pruvost
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: