简体   繁体   中英

Problems with Hudson CI and FindBugs/Static Analysis plugin

I have Hudson v2.20 installed. I am trying to install the FindBugs plugin, but when Hudson restarts after downloading the plugin, the plugin fails to load with the following error below. Has anyone else seen this? And if so, how would I solve it?

I installed the plugin using the Hudson plugin interface. My guess is that the plugin is incompatible with the Hudson version for some reason?

hudson.util.IOException2: Failed to load plugin instance for: analysis-core
    at org.hudsonci.inject.internal.plugin.SmoothiePluginStrategy.load(SmoothiePluginStrategy.java:193)
    at org.hudsonci.inject.internal.plugin.DelegatingPluginStrategy.load(DelegatingPluginStrategy.java:72)
    at hudson.PluginManager$2$1$1.run(PluginManager.java:297)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
    at hudson.model.Hudson$4.runTask(Hudson.java:698)
    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(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.LinkageError: loader (instance of  org/hudsonci/inject/internal/plugin/PluginClassLoader): attempted  duplicate class definition for name: "org/apache/xerces/parsers/SAXParser"
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:139)
    at org.aspectj.weaver.bcel.ExtensibleURLClassLoader.defineClass(ExtensibleURLClassLoader.java:63)
    at org.aspectj.weaver.loadtime.WeavingURLClassLoader.defineClass(WeavingURLClassLoader.java:151)
    at org.aspectj.weaver.bcel.ExtensibleURLClassLoader.defineClass(ExtensibleURLClassLoader.java:97)
    at org.aspectj.weaver.bcel.ExtensibleURLClassLoader.findClass(ExtensibleURLClassLoader.java:52)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at hudson.ClassicPluginStrategy$DependencyClassLoader.findClass(ClassicPluginStrategy.java:426)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at org.xml.sax.helpers.NewInstance.newInstance(NewInstance.java:49)
    at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:187)
    at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:150)
    at org.aspectj.weaver.loadtime.definition.DocumentParser.getXMLReader(DocumentParser.java:167)
    at org.aspectj.weaver.loadtime.definition.DocumentParser.saxParsing(DocumentParser.java:137)
    at org.aspectj.weaver.loadtime.definition.DocumentParser.parse(DocumentParser.java:117)
    at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.parseDefinitions(ClassLoaderWeavingAdaptor.java:258)
    at org.aspectj.weaver.loadtime.DefaultWeavingContext.getDefinitions(DefaultWeavingContext.java:130)
    at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.initialize(ClassLoaderWeavingAdaptor.java:161)
    at org.aspectj.weaver.loadtime.WeavingURLClassLoader.createAdaptor(WeavingURLClassLoader.java:171)
    at org.aspectj.weaver.loadtime.WeavingURLClassLoader.defineClass(WeavingURLClassLoader.java:132)
    at org.aspectj.weaver.bcel.ExtensibleURLClassLoader.defineClass(ExtensibleURLClassLoader.java:97)
    at org.aspectj.weaver.bcel.ExtensibleURLClassLoader.findClass(ExtensibleURLClassLoader.java:52)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at org.hudsonci.inject.internal.plugin.SmoothiePluginStrategy.loadPluginClass(SmoothiePluginStrategy.java:217)
    at org.hudsonci.inject.internal.plugin.SmoothiePluginStrategy.load(SmoothiePluginStrategy.java:188)
    ... 10 more

On the advice of one of my colleagues, I installed Jenkins instead. Everything worked first time with no errors. I guess the community has moved on to Jenkins and noone bothered going back to hudson once Oracle gave it to the eclipse foundation.

Sorry you had a bad experience with this. This plugin is one of many that plugin owners has designated as compatible with both Hudson and Jenkins [1]. Unfortunately it seems that Jenkins has broken that compatibility through a change to its maven-plugin, part of core, which the plugin directly depends on. Hudson has temporarily reverted to an earlier version of static analsysis and will now fork and maintain it and the related plugins directly.

Hudson has worked very hard to maintain compatibility between the two systems as well as adding new functionality like the Maven 3 integration from Sonatype and the Cascading projects feature, as well as improving performance and stability over the last year. These are not reflected in Jenkins.

Hudson is in milestone release from Eclipse and will be fully released in June now that the huge task of getting through Eclipse's IP and provenance checks (and the associated code and library cleanup that entailed) is nearing completion. You can read more about that on the blog or the the Eclipse site [2]. It is still thriving and the Hudson community of users has not all moved on.

[1] http://wiki.hudson-ci.org/display/HUDSON/Plugins#Plugins-tier3

[2] http://www.eclipse.org/hudson

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM