Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-9930

Build info submitted without an agent property will produce a blank build

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Affects Version/s: 4.2.0, 4.5.2, 4.7.4
    • Fix Version/s: 4.8.1
    • Component/s: REST API
    • Labels:
      None
    • Severity:
      Medium

      Description

      Build info submitted without an agent property will produce a blank build and an NPE exception in the logs.

      To reproduce:
      1. Use curl to submit a build.json without the agent property (see below)

      • curl -u $ARTIFACTORY_USER_ACCESS -X PUT $ARTIFACTORY_URL/api/build -H "Content-Type: application/json" --upload-file build.json 

      2. In the UI navigate to the build number. Observe the blank page.
      3. Examine the logs for the NPE

      • 2016-04-23 15:34:14,539 [http-nio-8081-exec-9] [ERROR] (o.a.r.c.e.GlobalExceptionMapper:46) - null
        java.lang.NullPointerException: null
        	at org.artifactory.ui.rest.service.builds.buildsinfo.tabs.GetBuildGeneralInfoService.getBuildAndUpdateResponse(GetBuildGeneralInfoService.java:71)
        ....
        

      build.json

      {
        "version" : "1.0",
        "name" : "MyBuild",
        "number" : "1",
      
       "buildAgent" : {
         "name" : "emacs",
         "version" : "22.1.1"
        },
        "started" : "2015-03-20T11:01:38.445+0200"
      }
      

        Attachments

          Activity

              People

              Assignee:
              alexeiv Alexei Vainshtein
              Reporter:
              arturoa Arturo Aparicio
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: