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

build-failure-analyzer fails to load on startup, exception thrown.

      The plugin fails to load on jenkins startup, and is there for ignored completely. The settings are not visible in Configure Jenkins nor is the plugin listed in Installed Plugins.
      jenkins.err.log contains the following:

      SEVERE: Failed Loading plugin Build Failure Analyzer v1.21.0 (build-failure-analyzer)
      java.io.IOException: Failed to initialize
      at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:388)
      at hudson.PluginManager$2$1$1.run(PluginManager.java:545)
      at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
      at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
      at jenkins.model.Jenkins$5.runTask(Jenkins.java:1095)
      at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
      at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: java.io.IOException: Unable to read E:\JenkinsData\build-failure-analyzer.xml
      at hudson.XmlFile.unmarshal(XmlFile.java:181)
      at hudson.XmlFile.unmarshal(XmlFile.java:161)
      at hudson.Plugin.load(Plugin.java:267)
      at com.sonyericsson.jenkins.plugins.bfa.PluginImpl.start(PluginImpl.java:151)
      at hudson.ClassicPluginStrategy.startPlugin(ClassicPluginStrategy.java:396)
      at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:385)
      ... 9 more
      Caused by: com.thoughtworks.xstream.converters.ConversionException: Expected 1 instance of hudson.diagnosis.OldDataMonitor but got 0 : Expected 1 instance of hudson.diagnosis.OldDataMonitor but got 0
      ---- Debugging information ----
      message : Expected 1 instance of hudson.diagnosis.OldDataMonitor but got 0
      cause-exception : java.lang.IllegalStateException
      cause-message : Expected 1 instance of hudson.diagnosis.OldDataMonitor but got 0
      class : com.sonyericsson.jenkins.plugins.bfa.PluginImpl
      required-type : com.sonyericsson.jenkins.plugins.bfa.PluginImpl
      converter-type : hudson.util.RobustReflectionConverter
      path : /com.sonyericsson.jenkins.plugins.bfa.PluginImpl
      line number : 2884
      version : not available
      -------------------------------
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
      at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1189)
      at hudson.util.XStream2.unmarshal(XStream2.java:161)
      at hudson.util.XStream2.unmarshal(XStream2.java:132)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1173)
      at hudson.XmlFile.unmarshal(XmlFile.java:178)
      ... 14 more
      Caused by: java.lang.IllegalStateException: Expected 1 instance of hudson.diagnosis.OldDataMonitor but got 0
      at hudson.ExtensionList.lookupSingleton(ExtensionList.java:451)
      at hudson.diagnosis.OldDataMonitor.get(OldDataMonitor.java:92)
      at hudson.diagnosis.OldDataMonitor.report(OldDataMonitor.java:227)
      at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:369)
      at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:268)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
      ... 24 more

      I am attaching the log file and build-failure-analyzer.xml
       

       

          [JENKINS-59582] build-failure-analyzer fails to load on startup, exception thrown.

          Hi,

           

          I tried reproducing this in Linux (which is my work environment), but wasn't succesful.

          Before I start spinning up a vm to test this in Windows, could you check out https://issues.jenkins-ci.org/browse/JENKINS-55945

          and see if it is related to your issue in any way?

           

          Br Tomas

          Tomas Westling added a comment - Hi,   I tried reproducing this in Linux (which is my work environment), but wasn't succesful. Before I start spinning up a vm to test this in Windows, could you check out https://issues.jenkins-ci.org/browse/JENKINS-55945 and see if it is related to your issue in any way?   Br Tomas

          Jens Brejner added a comment -

          Hi Tomas.
          The issue does not seem to be related, but I will test tomorrow, when I am at work again.
          If I read that issue correctly the root of that problem is the .net version required by the windows server executable and eventually the restart command.
          So I will test by launching jenkins from command line - the good old way, then we can see if that changes anything
          Br
          Jens

          Jens Brejner added a comment - Hi Tomas. The issue does not seem to be related, but I will test tomorrow, when I am at work again. If I read that issue correctly the root of that problem is the .net version required by the windows server executable and eventually the restart command. So I will test by launching jenkins from command line - the good old way, then we can see if that changes anything Br Jens

          Jens Brejner added a comment -

          Hi Tomas.
          I get the same behaviour, so I think it is not related to the bug mentioned. But I have made it work now.
          What I did:

          • shut down Jenkins
          • Remove build-failure-analyzer.jpi and folder from plugins folder
          • Rename build-failure-analyzer.xml
          • Start Jenkins
          • Install Build-failure-analyzer
          • Restart Jenknis
          • Add a failure cause
          • shutdown jenkins
          • Merge the failure causes over from old "build-failure-analyzer - Copy.bak.xml" into the new
          • Start Jenkins
          • Remove the dummy failure cause

          So maybe I have an entry in "build-failure-analyzer - Copy.bak.xml" which is not parseable ? - which also could explain the part of the original exception message that mentions hudson.diagnosis.OldDataMonitor ?

          Anyway - I am happy again, but I am attaching both files, maybe you can spot if there is data in the old file that does not make sense. build-failure-analyzer - Copy.bak.xml build-failure-analyzer.xml

          Jens Brejner added a comment - Hi Tomas. I get the same behaviour, so I think it is not related to the bug mentioned. But I have made it work now. What I did: shut down Jenkins Remove build-failure-analyzer.jpi and folder from plugins folder Rename build-failure-analyzer.xml Start Jenkins Install Build-failure-analyzer Restart Jenknis Add a failure cause shutdown jenkins Merge the failure causes over from old "build-failure-analyzer - Copy.bak.xml" into the new Start Jenkins Remove the dummy failure cause So maybe I have an entry in "build-failure-analyzer - Copy.bak.xml" which is not parseable ? - which also could explain the part of the original exception message that mentions hudson.diagnosis.OldDataMonitor ? Anyway - I am happy again, but I am attaching both files, maybe you can spot if there is data in the old file that does not make sense. build-failure-analyzer - Copy.bak.xml build-failure-analyzer.xml

          Jens Brejner added a comment -

          Ups - NOT happy.
          I do not know if this bug is build-failure-analyzer, but If I make a change to the global jenkins configuration - which also have settings from BFA, and save, then all my failure causes are deleted.... That is really bad.

          Do you want me to log a new bug for this ?

          Jens Brejner added a comment - Ups - NOT happy. I do not know if this bug is build-failure-analyzer, but If I make a change to the global jenkins configuration - which also have settings from BFA, and save, then all my failure causes are deleted.... That is really bad. Do you want me to log a new bug for this ?

          Yeah that doesn't seem related to this one, so please add a new one. Is this reproducible every time?
          I.e. if you add a failure cause, save, is it immediately deleted?

          As for the original issue, I took a quick look at your xml, but since it was so large it was hard to deduce
          what the problem with it was.

          Tomas Westling added a comment - Yeah that doesn't seem related to this one, so please add a new one. Is this reproducible every time? I.e. if you add a failure cause, save, is it immediately deleted? As for the original issue, I took a quick look at your xml, but since it was so large it was hard to deduce what the problem with it was.

          Jens Brejner added a comment - - edited

          Hi Tomas.
          It is not deleted immediately, apperantly it is deleted when global jenkins configuration is saved, but I will test reproducability, and document in the new bug.

          https://issues.jenkins-ci.org/browse/JENKINS-59610

          Jens Brejner added a comment - - edited Hi Tomas. It is not deleted immediately, apperantly it is deleted when global jenkins configuration is saved, but I will test reproducability, and document in the new bug. https://issues.jenkins-ci.org/browse/JENKINS-59610

          Hi Tomas and Jens,

          I was able to reproduce the issue that Tomas just mentioned. It seems to me that it is likely related to the bug that I logged yesterday: https://issues.jenkins-ci.org/browse/JENKINS-59593 .

          Cheers

          Stephen Humphries added a comment - Hi Tomas and Jens, I was able to reproduce the issue that Tomas just mentioned. It seems to me that it is likely related to the bug that I logged yesterday: https://issues.jenkins-ci.org/browse/JENKINS-59593 . Cheers

          Jens Brejner added a comment -

          Hi Stephen.
          I agree that your bug sounds a lot like this and the other I have submitted because Tomas couldn't reproduce this bug.
          I think this one: https://issues.jenkins-ci.org/browse/JENKINS-59610 is closely related to your https://issues.jenkins-ci.org/browse/JENKINS-59593
          Br
          Jens

          Jens Brejner added a comment - Hi Stephen. I agree that your bug sounds a lot like this and the other I have submitted because Tomas couldn't reproduce this bug. I think this one: https://issues.jenkins-ci.org/browse/JENKINS-59610 is closely related to your https://issues.jenkins-ci.org/browse/JENKINS-59593 Br Jens

          In case anyone has the same issue.

          The problem happened when we upgraded `build-failure-analyzer` from 1.22.0 to 1.23.1 and then downgraded due to compatibility issue.

          So the conf file build-failure-analyzer.xml had v1.23.1 ... and looks like it's not compatible with v1.22.0.

          Removed the setting file and it has been generated again using v1.22.0 (of course if you have any customization, you need to set them again)

          Ahmed AbouZaid added a comment - In case anyone has the same issue. The problem happened when we upgraded `build-failure-analyzer` from 1.22.0 to 1.23.1 and then downgraded due to compatibility issue. So the conf file build-failure-analyzer.xml had v1.23.1 ... and looks like it's not compatible with v1.22.0. Removed the setting file and it has been generated again using v1.22.0 (of course if you have any customization, you need to set them again)

          Ramon Leon added a comment -

          Ramon Leon added a comment - similar case here: https://issues.jenkins-ci.org/browse/JENKINS-62231

            t_westling Tomas Westling
            jbrejner1 Jens Brejner
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: