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

Findbugs can not publish reports on Weblogic 10.3.0

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • findbugs-plugin
    • None
    • Deployed as a war in WebLogic 10.3.0.0

      When attempting to publish reports at the end of a build, I get the following error on first job exection:

      [FINDBUGS] Collecting findbugs analysis files...
      FATAL: null
      java.lang.ExceptionInInitializerError
      	at edu.umd.cs.findbugs.DetectorFactoryCollection.getCoreResource(DetectorFactoryCollection.java:305)
      	at edu.umd.cs.findbugs.SystemProperties.loadPropertiesFromConfigFile(SystemProperties.java:72)
      	at edu.umd.cs.findbugs.SystemProperties.<clinit>(SystemProperties.java:55)
      	at edu.umd.cs.findbugs.SortedBugCollection.<clinit>(SortedBugCollection.java:172)
      	at hudson.plugins.findbugs.parser.FindBugsParser.readXml(FindBugsParser.java:242)
      	at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:196)
      	at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:133)
      	at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:93)
      	at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:224)
      	at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:183)
      	at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:139)
      	at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:30)
      	at hudson.FilePath.act(FilePath.java:756)
      	at hudson.FilePath.act(FilePath.java:738)
      	at hudson.plugins.findbugs.FindBugsPublisher.perform(FindBugsPublisher.java:144)
      	at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:309)
      	at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27)
      	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:629)
      	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:608)
      	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:586)
      	at hudson.model.Build$RunnerImpl.post2(Build.java:156)
      	at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:555)
      	at hudson.model.Run.run(Run.java:1386)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:47)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:145)
      Caused by: org.dom4j.InvalidXPathException: Invalid XPath expression: '/FindbugsPlugin/@pluginid'. Caused by: org/dom4j/DocumentException
      	at org.dom4j.xpath.DefaultXPath.parse(DefaultXPath.java:362)
      	at org.dom4j.xpath.DefaultXPath.<init>(DefaultXPath.java:59)
      	at org.dom4j.DocumentFactory.createXPath(DocumentFactory.java:230)
      	at org.dom4j.tree.AbstractNode.createXPath(AbstractNode.java:207)
      	at org.dom4j.tree.AbstractNode.valueOf(AbstractNode.java:189)
      	at edu.umd.cs.findbugs.PluginLoader.init(PluginLoader.java:441)
      	at edu.umd.cs.findbugs.PluginLoader.loadPlugin(PluginLoader.java:254)
      	at edu.umd.cs.findbugs.PluginLoader.loadInitialPlugins(PluginLoader.java:1053)
      	at edu.umd.cs.findbugs.PluginLoader.<clinit>(PluginLoader.java:1043)
      	at edu.umd.cs.findbugs.DetectorFactoryCollection.getCoreResource(DetectorFactoryCollection.java:305)
      	at edu.umd.cs.findbugs.SystemProperties.loadPropertiesFromConfigFile(SystemProperties.java:72)
      	at edu.umd.cs.findbugs.SystemProperties.<clinit>(SystemProperties.java:55)
      	at edu.umd.cs.findbugs.SortedBugCollection.<clinit>(SortedBugCollection.java:172)
      	at hudson.plugins.findbugs.parser.FindBugsParser.readXml(FindBugsParser.java:242)
      	at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:196)
      	at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:133)
      	at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:93)
      	at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:224)
      	at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:183)
      	at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:139)
      	at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:30)
      	at hudson.FilePath.act(FilePath.java:756)
      	at hudson.FilePath.act(FilePath.java:738)
      	at hudson.plugins.findbugs.FindBugsPublisher.perform(FindBugsPublisher.java:144)
      	at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:309)
      	at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27)
      	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:629)
      	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:608)
      	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:586)
      	at hudson.model.Build$RunnerImpl.post2(Build.java:156)
      	at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:555)
      	at hudson.model.Run.run(Run.java:1386)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	... 2 more
      

      Subsequent Job executions gives me the following error:

      [FINDBUGS] Collecting findbugs analysis files...
      FATAL: edu/umd/cs/findbugs/SortedBugCollection
      java.lang.NoClassDefFoundError: edu/umd/cs/findbugs/SortedBugCollection
      	at hudson.plugins.findbugs.parser.FindBugsParser.readXml(FindBugsParser.java:242)
      	at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:196)
      	at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:133)
      	at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:93)
      	at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:224)
      	at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:183)
      	at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:139)
      	at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:30)
      	at hudson.FilePath.act(FilePath.java:756)
      	at hudson.FilePath.act(FilePath.java:738)
      	at hudson.plugins.findbugs.FindBugsPublisher.perform(FindBugsPublisher.java:144)
      	at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:309)
      	at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27)
      	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:629)
      	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:608)
      	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:586)
      	at hudson.model.Build$RunnerImpl.post2(Build.java:156)
      	at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:555)
      	at hudson.model.Run.run(Run.java:1386)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:47)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:145)
      

      I will get the NoClassDefFoundError until I restart the instance. Once I do that, I get the first error again on first execution and then the latter error on all subsequent executions. I'm betting it has something to do with with weblogic.jar and how it contains every dependency on the internet, but can't say for sure.

      I actually shut off WebLogic and ran Jenkins in the Winstone container and executed the job and it worked fine, so it's definitely a problem with the Findbugs plugin and WebLogic.

          [JENKINS-9815] Findbugs can not publish reports on Weblogic 10.3.0

          Ulli Hafner added a comment -

          Seems that there is a conflicting dependency somewhere. Did the build run on the master or on a slave?

          Ulli Hafner added a comment - Seems that there is a conflicting dependency somewhere. Did the build run on the master or on a slave?

          Eric Miles added a comment -

          This is a master only configuration. Conflicting dependency is a good guess, considering weblogic includes everything under the sun in their single weblogic.jar file that's included at the server level.

          Eric Miles added a comment - This is a master only configuration. Conflicting dependency is a good guess, considering weblogic includes everything under the sun in their single weblogic.jar file that's included at the server level.

          Eric Miles added a comment -

          I tried removing certain dependencies in the findbugs/WEB-INF/lib folder (log4j, xerces, xml apis, and commons-logging) but none of those changed the outcome. the massive, all inclusive library-hudson-2.0.0-3a.jar makes it a bit trickier. That dependency isn't much better than Oracle's (BEA's) weblogic.jar.

          Eric Miles added a comment - I tried removing certain dependencies in the findbugs/WEB-INF/lib folder (log4j, xerces, xml apis, and commons-logging) but none of those changed the outcome. the massive, all inclusive library-hudson-2.0.0-3a.jar makes it a bit trickier. That dependency isn't much better than Oracle's (BEA's) weblogic.jar.

          Ulli Hafner added a comment -

          Yes the library-hudson-2.0.0-3a.jar is really a pain. FindBugs actually is not very modular. I need all these dependencies to simply get the parsing of the XML files done. Maybe I can hide some more of these dependencies...

          Ulli Hafner added a comment - Yes the library-hudson-2.0.0-3a.jar is really a pain. FindBugs actually is not very modular. I need all these dependencies to simply get the parsing of the XML files done. Maybe I can hide some more of these dependencies...

          Ulli Hafner added a comment -

          Is this bug still present? Quite a while ago I upgraded to the new findbugs version 2.0.0. Maybe this version handles fixes that bug.

          Ulli Hafner added a comment - Is this bug still present? Quite a while ago I upgraded to the new findbugs version 2.0.0. Maybe this version handles fixes that bug.

          Ulli Hafner added a comment -

          Seems not to be a problem anymore with findbugs 2.0.0.

          Ulli Hafner added a comment - Seems not to be a problem anymore with findbugs 2.0.0.

            drulli Ulli Hafner
            eric_miles Eric Miles
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: