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

NullPointerException with CLI create-job

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: cli
    • Labels:
      None
    • Environment:
      Ubuntu, Hudson 1.364

      Description

      When I try to create a new job by using the CLI create-job command, I get a NullPointerException:

      java.lang.NullPointerException
              at hudson.util.CaseInsensitiveComparator.compare(CaseInsensitiveComparator.java:40)
              at hudson.util.CaseInsensitiveComparator.compare(CaseInsensitiveComparator.java:34)
              at java.util.TreeMap.getEntryUsingComparator(TreeMap.java:351)
              at java.util.TreeMap.getEntry(TreeMap.java:322)
              at java.util.TreeMap.get(TreeMap.java:255)
              at hudson.util.CopyOnWriteMap.get(CopyOnWriteMap.java:89)
              at hudson.model.Hudson.getItem(Hudson.java:1907)
              at hudson.cli.CreateJobCommand.run(CreateJobCommand.java:47)
              at hudson.cli.CLICommand.main(CLICommand.java:176)
      

      I run the command using:

      java -jar hudson-cli.jar -s http://hudson:8080/hudson/ create-job < test-config.xml
      

      I have attached the test-config.xml configuration file I try to create the job from.

        Activity

        Hide
        dcoraboe dcoraboe added a comment -

        The name parameter was missing. The correct command to send is:

        java -jar hudson-cli.jar -s http://hudson:8080/hudson/ create-job TEST < test-config.xml
        

        where TEST is the name of the job to create.

        Show
        dcoraboe dcoraboe added a comment - The name parameter was missing. The correct command to send is: java -jar hudson-cli.jar -s http://hudson:8080/hudson/ create-job TEST < test-config.xml where TEST is the name of the job to create.
        Hide
        dogfood dogfood added a comment -

        Integrated in jenkins_main_trunk #799
        [FIXED JENKINS-6958] Make name parameter of create-job mandatory.

        Ulli Hafner : 008bb9db6541782288138923feedb6b2fe9481b3
        Files :

        • core/src/main/java/hudson/cli/CreateJobCommand.java
        Show
        dogfood dogfood added a comment - Integrated in jenkins_main_trunk #799 [FIXED JENKINS-6958] Make name parameter of create-job mandatory. Ulli Hafner : 008bb9db6541782288138923feedb6b2fe9481b3 Files : core/src/main/java/hudson/cli/CreateJobCommand.java
        Hide
        scm_issue_link SCM/JIRA link daemon added a comment -
        Show
        scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: changelog.html http://jenkins-ci.org/commit/jenkins/208c7b613c9bc380e1e6f377be789e09f936bb84 Log: JENKINS-6958 Added changelog. Compare: https://github.com/jenkinsci/jenkins/compare/d18d775...208c7b6
        Hide
        dogfood dogfood added a comment -

        Integrated in jenkins_main_trunk #800
        JENKINS-6958 Added changelog.

        Ulli Hafner : 208c7b613c9bc380e1e6f377be789e09f936bb84
        Files :

        • changelog.html
        Show
        dogfood dogfood added a comment - Integrated in jenkins_main_trunk #800 JENKINS-6958 Added changelog. Ulli Hafner : 208c7b613c9bc380e1e6f377be789e09f936bb84 Files : changelog.html
        Hide
        scm_issue_link SCM/JIRA link daemon added a comment -

        Code changed in jenkins
        User: Ulli Hafner
        Path:
        core/src/main/java/hudson/cli/CreateJobCommand.java
        http://jenkins-ci.org/commit/jenkins/008bb9db6541782288138923feedb6b2fe9481b3
        Log:
        [FIXED JENKINS-6958] Make name parameter of create-job mandatory.

        Show
        scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: core/src/main/java/hudson/cli/CreateJobCommand.java http://jenkins-ci.org/commit/jenkins/008bb9db6541782288138923feedb6b2fe9481b3 Log: [FIXED JENKINS-6958] Make name parameter of create-job mandatory.
        Hide
        scm_issue_link SCM/JIRA link daemon added a comment -

        Code changed in jenkins
        User: Ulli Hafner
        Path:
        changelog.html
        http://jenkins-ci.org/commit/jenkins/208c7b613c9bc380e1e6f377be789e09f936bb84
        Log:
        JENKINS-6958 Added changelog.

        Show
        scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: changelog.html http://jenkins-ci.org/commit/jenkins/208c7b613c9bc380e1e6f377be789e09f936bb84 Log: JENKINS-6958 Added changelog.
        Hide
        scm_issue_link SCM/JIRA link daemon added a comment -

        Code changed in jenkins
        User: Ulli Hafner
        Path:
        core/src/main/java/hudson/cli/CreateJobCommand.java
        http://jenkins-ci.org/commit/jenkins/008bb9db6541782288138923feedb6b2fe9481b3
        Log:
        [FIXED JENKINS-6958] Make name parameter of create-job mandatory.

        Show
        scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: core/src/main/java/hudson/cli/CreateJobCommand.java http://jenkins-ci.org/commit/jenkins/008bb9db6541782288138923feedb6b2fe9481b3 Log: [FIXED JENKINS-6958] Make name parameter of create-job mandatory.
        Hide
        scm_issue_link SCM/JIRA link daemon added a comment -

        Code changed in jenkins
        User: Ulli Hafner
        Path:
        changelog.html
        http://jenkins-ci.org/commit/jenkins/208c7b613c9bc380e1e6f377be789e09f936bb84
        Log:
        JENKINS-6958 Added changelog.

        Show
        scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: changelog.html http://jenkins-ci.org/commit/jenkins/208c7b613c9bc380e1e6f377be789e09f936bb84 Log: JENKINS-6958 Added changelog.

          People

          • Assignee:
            drulli Ulli Hafner
            Reporter:
            dcoraboe dcoraboe
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: