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

NPE prevents jobs using plugin from loading

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • mask-passwords-plugin
    • None
    • Windows Server 2008
      Jenkins 1.436
      Mask Passwords 2.7

      After upgrading to 2.7 from 2.6.1, I noticed that several of my jobs were not showing up in my Jenkins dashboard.
      Looking at jenkins.err.log shows this:

      SEVERE: Failed Loading job <JOBNAME>

      hudson.util.IOException2: Unable to read <PATH_TO_JOB>\config.xml
      at hudson.XmlFile.read(XmlFile.java:137)
      at hudson.model.Items.load(Items.java:114)
      at jenkins.model.Jenkins$14.run(Jenkins.java:2357)
      at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
      at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
      at jenkins.model.Jenkins$5.runTask(Jenkins.java:798)
      at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
      at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by: com.thoughtworks.xstream.converters.ConversionException: null : null
      ---- Debugging information ----
      cause-exception : java.lang.NullPointerException
      cause-message : null
      class : hudson.model.FreeStyleProject
      required-type : com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper
      path : /project/buildWrappers/com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper
      line number : 175
      -------------------------------

      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:89)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
      at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71)
      at hudson.util.CopyOnWriteList$ConverterImpl.unmarshal(CopyOnWriteList.java:193)
      at hudson.util.DescribableList$ConverterImpl.unmarshal(DescribableList.java:245)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
      at hudson.util.RobustReflectionConverter.unmarshalField(RobustReflectionConverter.java:290)
      at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:233)
      at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:180)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:63)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137)
      at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:926)
      at hudson.util.XStream2.unmarshal(XStream2.java:91)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:912)
      at com.thoughtworks.xstream.XStream.fromXML(XStream.java:864)
      at hudson.XmlFile.read(XmlFile.java:133)
      ... 10 more
      Caused by: java.lang.NullPointerException
      at com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsConfig.getGlobalVarPasswordPairs(MaskPasswordsConfig.java:140)
      at com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper.<init>(MaskPasswordsBuildWrapper.java:77)
      at com.michelin.cio.hudson.plugins.maskpasswords.MaskPasswordsBuildWrapper$ConverterImpl.unmarshal(MaskPasswordsBuildWrapper.java:336)
      at hudson.util.XStream2$AssociatedConverterImpl.unmarshal(XStream2.java:293)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
      ... 34 more
      27/10/2011 1:39:51 PM jenkins.model.Jenkins$6 onTaskFailed

      The jobs that failed to load were the ones that had specified passwords.

      I tried to add a new password to the global Jenkins configuration, but the change did not save after I hit submit.
      Reverting to 2.6.1 "fixes" the problem.

            rseguy Romain Seguy
            capnkeelhauler Capn Keelhauler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: