Jenkins JBehave Plugin Installation failed ClassNotFoundException dtkit.. TestTypeDescriptor

770 views Asked by At

i want to install jbehave plugin for jenkins, but i got following error:

Failed to scout org.jbehave.jenkins.JBehavePluginType$DescriptorImpl
java.lang.InstantiationException: java.lang.NoClassDefFoundError: com/thalesgroup/dtkit/metrics/hudson/api/descriptor/TestTypeDescriptor
    at net.java.sezpoz.IndexItem.element(IndexItem.java:146)
    at hudson.ExtensionFinder$Sezpoz.scout(ExtensionFinder.java:663)
    at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:339)
    at hudson.ExtensionList.load(ExtensionList.java:300)
    at hudson.ExtensionList.ensureLoaded(ExtensionList.java:253)
    at hudson.ExtensionList.iterator(ExtensionList.java:143)
    at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:338)
    at hudson.ExtensionList.load(ExtensionList.java:300)
    at hudson.ExtensionList.ensureLoaded(ExtensionList.java:253)
    at hudson.ExtensionList.getComponents(ExtensionList.java:154)
    at hudson.DescriptorExtensionList.load(DescriptorExtensionList.java:182)
    at hudson.ExtensionList.ensureLoaded(ExtensionList.java:253)
    at hudson.ExtensionList.iterator(ExtensionList.java:143)
    at org.jenkinsci.plugins.xunit.AliasInitializer.addAliases(AliasInitializer.java:47)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:105)
    at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
    at jenkins.model.Jenkins$7.runTask(Jenkins.java:886)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: com/thalesgroup/dtkit/metrics/hudson/api/descriptor/TestTypeDescriptor

I installed latest xunit plugin. Try latest stable jbehave (3.9) from link! and latest beta (4.0-beta-11) unsuccessfully. Furthermore i tried to add dtkit plugin. Have Jenkins 1.588 installed. I looked into source code, seems that they used a package which doesnt exists anymore link! What to do?

3

There are 3 answers

0
user3173807 On BEST ANSWER

JUnitReporter was no solution. It only was made for eclipse. Only Solution was to change plugin by hand. I modified pom: changed xunit-plugin version from 1.6 to 1.9 and adapt imports. if someone has same issue here is hpi file: jbehaveplugin-modified

1
nerdioculos On

Have you followed the order required by JBehave plugin installation as described here: https://github.com/jbehave/jbehave-core/tree/master/jbehave-jenkins-plugin? It requires to install XUnit BEFORE JBehave plugin.

Also, I'd suggest to try with and older version from Jenkins, the last LTS, for example (1.580.1).

0
Steve On

I created PR 118 to fix this issue. See also JBEHAVE-1160 for the Jira issue I created for this.