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

NPE in hudson.model.ExternalJob.newBuild(ExternalJob.java:47)

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • other
    • None
    • Platform: PC, OS: Linux

      I found an NPE while trying to monitor an external process as described here:

      example batch file:
      {{{
      #!/bin/sh

      echo "hello"
      }}}

      (after copying graph-layouter-1.0-jdk14.jar, servlet-api-2.4.jar to the same dir
      as hudson-core-1.136.jar...)

      output from run:
      {{{
      $ java -jar hudson-core-1.136.jar "import" hello.sh
      Sep 6, 2007 6:07:35 PM hudson.TcpSlaveAgentListener <init>
      INFO: JNLP slave agent listener started on TCP port 40260
      Sep 6, 2007 6:07:36 PM hudson.model.Hudson load
      INFO: Took 192 ms to load
      java.lang.NullPointerException
      at hudson.model.ExternalJob.newBuild(ExternalJob.java:47)
      at hudson.Main.localPost(Main.java:70)
      at hudson.Main.run(Main.java:49)
      at hudson.Main.main(Main.java:32)
      }}}

      I'm not sure which 'Subcomponent' this issue belongs to either... looking for
      something like 'main/core/' but didn't find it.

          [JENKINS-799] NPE in hudson.model.ExternalJob.newBuild(ExternalJob.java:47)

          davidjdavis added a comment -

          I forgot to mention that HUDSON_HOME was set to a local directory:
          {{{
          $ export HUDSON_HOME=/tmp/hudson
          }}}

          I also found that when HUDSON_HOME=http://localhost:8080/hudson, everthing
          worked fine, as expected.

          davidjdavis added a comment - I forgot to mention that HUDSON_HOME was set to a local directory: {{{ $ export HUDSON_HOME=/tmp/hudson }}} I also found that when HUDSON_HOME= http://localhost:8080/hudson , everthing worked fine, as expected.

          HUDSON_HOME as local file path just doesn't work very well anyway. Doc has been
          talking about using HTTP, so I'm removing it from 1.137.

          Kohsuke Kawaguchi added a comment - HUDSON_HOME as local file path just doesn't work very well anyway. Doc has been talking about using HTTP, so I'm removing it from 1.137.

            Unassigned Unassigned
            davidjdavis davidjdavis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: