Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-50487

Caused by: java.util.NoSuchElementException in GitReadSaveService.getApiUrl()

    XMLWordPrintable

    Details

    • Sprint:
      Blue Ocean 1.5 - beta 3
    • Similar Issues:

      Description

      This happens if there are no SCM sources attached, corner case but when it happens pipeline responses fails with

      Mar 29, 2018 4:24:53 PM io.jenkins.blueocean.commons.stapler.export.ExportInterceptor$1 getValue
      WARNING: Failed to get "id" from a io.jenkins.blueocean.rest.impl.pipeline.scm.ScmSourceImpl
      java.lang.reflect.InvocationTargetException
      	at io.jenkins.blueocean.commons.stapler.export.MethodProperty.getValue(MethodProperty.java:74)
      	at io.jenkins.blueocean.commons.stapler.export.ExportInterceptor$1.getValue(ExportInterceptor.java:46)
      	at io.jenkins.blueocean.commons.stapler.Export$BlueOceanExportInterceptor.getValue(Export.java:167)
      	at io.jenkins.blueocean.commons.stapler.export.Property.writeTo(Property.java:136)
      	at io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:228)
      	at io.jenkins.blueocean.commons.stapler.export.Model.writeNestedObjectTo(Model.java:224)
      	at io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:303)
      	at io.jenkins.blueocean.commons.stapler.export.Property.writeValue(Property.java:169)
      ...
      Caused by: java.util.NoSuchElementException
        at java.util.ArrayList$Itr.next(ArrayList.java:854)
        at io.jenkins.blueocean.blueocean_git_pipeline.GitReadSaveService.getApiUrl(GitReadSaveService.java:79)
        at io.jenkins.blueocean.blueocean_git_pipeline.GitReadSaveService.support(GitReadSaveService.java:205)
        at io.jenkins.blueocean.rest.impl.pipeline.ScmContentProvider.resolve(ScmContentProvider.java:67)
        at io.jenkins.blueocean.rest.impl.pipeline.scm.ScmSourceImpl.getId(ScmSourceImpl.java:20)
        at io.jenkins.blueocean.commons.stapler.export.MethodProperty.getValue(MethodProperty.java:72)
      

        Attachments

          Activity

          Show
          vivek Vivek Pandey added a comment - Fixed in PR https://github.com/jenkinsci/blueocean-plugin/pull/1703 .

            People

            • Assignee:
              vivek Vivek Pandey
              Reporter:
              vivek Vivek Pandey
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: