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

NPE in AbstractProject constructor if Jenkins instance has not been completely initialized

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None

      I got into the error during my experiments with automatic job creation on the plugin startup.

      NPE may happen if...

      • Jenkins instance has been already initialized
      • Nodes have not been loaded yet

      Stacktrace example (the code has not been committed yet):

      SEVERE: Failed Initializing plugin docker-traceability
      java.lang.NullPointerException
      at hudson.model.AbstractProject.<init>(AbstractProject.java:269)
      at org.jenkinsci.plugins.docker.traceability.model.jobs.DockerBuildReferenceJob.<init>(DockerBuildReferenceJob.java:65)
      at org.jenkinsci.plugins.docker.traceability.model.jobs.DockerBuildReferenceJob.loadJob(DockerBuildReferenceJob.java:134)
      at org.jenkinsci.plugins.docker.traceability.model.jobs.DockerBuildReferenceFactory.onStart(DockerBuildReferenceFactory.java:55)
      at org.jenkinsci.plugins.docker.traceability.DockerTraceabilityPlugin.postInitialize(DockerTraceabilityPlugin.java:66)
      at hudson.PluginManager$2$1$2.run(PluginManager.java:376)

            oleg_nenashev Oleg Nenashev
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: