• Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • pmd-plugin
    • None

      Failed to load PMD plugin using current versions of: Hudson (1.379), analysis-core (1.14), analysis-collector (1.8), pmd (3.10) and others like checkstyle, findbugs.

      Error from the log file:

      SEVERE: Failed Loading plugin pmd
      hudson.util.IOException2: Failed to initialize
      at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:295)
      at hudson.PluginManager$2$1$1.run(PluginManager.java:268)
      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$3.runTask(Hudson.java:679)
      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:619)
      Caused by: java.lang.NoClassDefFoundError: org/jaxen/XPath
      at java.lang.Class.getDeclaredConstructors0(Native Method)
      at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
      at java.lang.Class.getConstructor0(Class.java:2699)
      at java.lang.Class.newInstance0(Class.java:326)
      at java.lang.Class.newInstance(Class.java:308)
      at net.sourceforge.pmd.RuleSetFactory.parseSingleRuleNode(RuleSetFactory.java:309)
      at net.sourceforge.pmd.RuleSetFactory.parseRuleNode(RuleSetFactory.java:253)
      at net.sourceforge.pmd.RuleSetFactory.parseRuleSetNode(RuleSetFactory.java:209)
      at net.sourceforge.pmd.RuleSetFactory.createSingleRuleSet(RuleSetFactory.java:135)
      at net.sourceforge.pmd.RuleSetFactory.createRuleSets(RuleSetFactory.java:85)
      at net.sourceforge.pmd.RuleSetFactory.createRuleSets(RuleSetFactory.java:70)
      at net.sourceforge.pmd.RuleSetFactory.getRegisteredRuleSets(RuleSetFactory.java:53)
      at hudson.plugins.pmd.parser.PmdMessages.initialize(PmdMessages.java:50)
      at hudson.plugins.pmd.PmdPlugin.start(PmdPlugin.java:15)
      at hudson.ClassicPluginStrategy.startPlugin(ClassicPluginStrategy.java:303)
      at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:292)
      ... 9 more
      Caused by: java.lang.ClassNotFoundException: org.jaxen.XPath
      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      ... 25 more

          [JENKINS-7716] Failed Loading plugin pmd

          Ulli Hafner added a comment - - edited

          Which JDK are you using? And in which container is Hudson running?

          Ulli Hafner added a comment - - edited Which JDK are you using? And in which container is Hudson running?

          n4tht4n added a comment -

          I'm using JDK 1.6.0_21 with Hudson's default container.

          Updated to Hudson 1.386 with the same error.

          n4tht4n added a comment - I'm using JDK 1.6.0_21 with Hudson's default container. Updated to Hudson 1.386 with the same error.

          Ulli Hafner added a comment -

          Hmm, that is strange. I can't reproduce this. Seems that PMD tries to instantiate a rule with the class reference 'org.jaxen.XPath'.

          Do you use some custom PMD rules or do you have some special PMD system properties set?

          Ulli Hafner added a comment - Hmm, that is strange. I can't reproduce this. Seems that PMD tries to instantiate a rule with the class reference 'org.jaxen.XPath'. Do you use some custom PMD rules or do you have some special PMD system properties set?

          n4tht4n added a comment -

          I'm using the following definition in my POM's reporting section:

          <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>2.5</version>
          <configuration>
          <rulesets>
          <ruleset>${pmdConf}</ruleset>
          </rulesets>
          <minimumTokens>100</minimumTokens>
          <targetJdk>1.6</targetJdk>
          <aggregate>true</aggregate>
          </configuration>
          </plugin>

          That shouldn't affect the startup exception, should it?

          <pmdConf>/rulesets/basic.xml</pmdConf>

          n4tht4n added a comment - I'm using the following definition in my POM's reporting section: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <version>2.5</version> <configuration> <rulesets> <ruleset>${pmdConf}</ruleset> </rulesets> <minimumTokens>100</minimumTokens> <targetJdk>1.6</targetJdk> <aggregate>true</aggregate> </configuration> </plugin> That shouldn't affect the startup exception, should it? <pmdConf>/rulesets/basic.xml</pmdConf>

          Ulli Hafner added a comment -

          That setting should not affect the plug-in (actually the plugin is initialized on startup of Hudson).

          Since I can't reproduce that issue: Can you please try to download the latest Hudson, start it with java -jar hudson.war (in a clean HUDSON home directory with no jobs) and install only the latest versions of the plug-ins pmd and analysis-core. Restart Hudson and check if the exception is still there.

          Ulli Hafner added a comment - That setting should not affect the plug-in (actually the plugin is initialized on startup of Hudson). Since I can't reproduce that issue: Can you please try to download the latest Hudson, start it with java -jar hudson.war (in a clean HUDSON home directory with no jobs) and install only the latest versions of the plug-ins pmd and analysis-core. Restart Hudson and check if the exception is still there.

          n4tht4n added a comment -

          Seems to work with Hudson 1.388, analysis-core 1.14 and PMD 3.10.

          So it seems I have to check how to "reset" Hudson without disturbing all the build jobs .

          n4tht4n added a comment - Seems to work with Hudson 1.388, analysis-core 1.14 and PMD 3.10. So it seems I have to check how to "reset" Hudson without disturbing all the build jobs .

          Ulli Hafner added a comment -

          A second step could be to install all the other plug-ins (or copy them) to the new Hudson, and try the steps above again. Maybe one of the other plug-ins causes the problem...

          Ulli Hafner added a comment - A second step could be to install all the other plug-ins (or copy them) to the new Hudson, and try the steps above again. Maybe one of the other plug-ins causes the problem...

          n4tht4n added a comment -

          It must be a wrong configuration somewhere. Using the same Hudson version and all the plugins but with a new $HUDSON_HOME loads all plugins without a problem.

          Thanks for the hints, I've to work that out.

          n4tht4n added a comment - It must be a wrong configuration somewhere. Using the same Hudson version and all the plugins but with a new $HUDSON_HOME loads all plugins without a problem. Thanks for the hints, I've to work that out.

            drulli Ulli Hafner
            n4tht4n n4tht4n
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: