https://bugzilla.redhat.com/show_bug.cgi?id=1311132
Bug ID: 1311132
Summary: Error using Cobertura plugin with Fedora 23 jenkins
Product: Fedora
Version: 23
Component: jenkins
Severity: medium
Assignee: msrb(a)redhat.com
Reporter: aconole(a)redhat.com
QA Contact: extras-qa(a)fedoraproject.org
CC: java-sig-commits(a)lists.fedoraproject.org,
mizdebsk(a)redhat.com, msrb(a)redhat.com
Description of problem:
Cobertura plugin fails with the fedora23 bundled jenkins
Version-Release number of selected component (if applicable):
Jenkins - 1.625.3
Cobertura plugin - 1.9.7
How reproducible:
Very
Steps to Reproduce:
1. installed jenkins from the Fedora 23 repository.
2. installed cobertura plugin, and git client plugin
3. Added a single job building a c/makefile project (openvswitch).
4. Used gcovr to make a cobertura coverage.xml file from the unit test output
5. Added 'Publish Cobertura Coverage results' post-build action
Actual results:
Got the following exception:
Running gcov: 'gcov
/var/lib/jenkins/jobs/openvswitch-build/workspace/lib/dirs.gcda --branch-counts
--branch-probabilities --preserve-paths --object-directory
/var/lib/jenkins/jobs/openvswitch-build/workspace/lib' in
'/var/lib/jenkins/jobs/openvswitch-build/workspace/lib'
Parsing coverage data for file
/var/lib/jenkins/jobs/openvswitch-build/workspace/lib/dirs.c.in
Parsing coverage data for file
/var/lib/jenkins/jobs/openvswitch-build/workspace/include/openvswitch/thread.h
Gathered coveraged data for 302 files
[Cobertura] Publishing Cobertura coverage report...
ERROR: Step ‘Publish Cobertura Coverage Report’ aborted due to exception:
java.lang.NoClassDefFoundError: org/codehaus/stax2/XMLInputFactory2
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at
org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:421)
at
org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:370)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at javax.xml.stream.FactoryFinder$1.run(FactoryFinder.java:353)
at java.security.AccessController.doPrivileged(Native Method)
at javax.xml.stream.FactoryFinder.findServiceProvider(FactoryFinder.java:341)
at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:313)
at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:227)
at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:154)
at
hudson.plugins.cobertura.CoberturaPublisher$ParseReportCallable.invoke(CoberturaPublisher.java:538)
at
hudson.plugins.cobertura.CoberturaPublisher$ParseReportCallable.invoke(CoberturaPublisher.java:525)
at hudson.FilePath.act(FilePath.java:991)
at hudson.FilePath.act(FilePath.java:969)
at
hudson.plugins.cobertura.CoberturaPublisher.perform(CoberturaPublisher.java:343)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at
hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
at
hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at
hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
at hudson.model.Run.execute(Run.java:1766)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:408)
Caused by: java.lang.ClassNotFoundException:
org.codehaus.stax2.XMLInputFactory2
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at
org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:430)
at
org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:383)
... 36 more
Finished: FAILURE
Expected results:
Cobertura plugin would be able to run with all dependencies satisfied
Additional info:
Installing Jenkins from the official repo fixed this problem.
I tried the following (before making that change):
* Modifying the cobertura plugin pom.xml to include the stax2 dependency
* Adding the stax2 jar contents to the plugin classes/ directory
* Adding the stax2 jar to the plugin lib/ directory
* Uninstalling/reinstalling the cobertura plugin
--
You are receiving this mail because:
You are on the CC list for the bug.