This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1311132 - Error using Cobertura plugin with Fedora 23 jenkins
Error using Cobertura plugin with Fedora 23 jenkins
Product: Fedora
Classification: Fedora
Component: jenkins (Show other bugs)
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Michal Srb
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2016-02-23 08:10 EST by Aaron Conole
Modified: 2016-03-17 16:54 EDT (History)
3 users (show)

See Also:
Fixed In Version: jenkins-1.625.3-3.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-03-17 16:54:30 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Aaron Conole 2016-02-23 08:10:07 EST
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:

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/

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(
at Method)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at java.util.ServiceLoader$LazyIterator.nextService(
at java.util.ServiceLoader$
at java.util.ServiceLoader$
at Method)
at hudson.plugins.cobertura.CoberturaPublisher$ParseReportCallable.invoke(
at hudson.plugins.cobertura.CoberturaPublisher$ParseReportCallable.invoke(
at hudson.FilePath.act(
at hudson.FilePath.act(
at hudson.plugins.cobertura.CoberturaPublisher.perform(
at hudson.tasks.BuildStepMonitor$3.perform(
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(
at hudson.model.Build$BuildExecution.post2(
at hudson.model.AbstractBuild$
at hudson.model.Run.execute(
at hudson.model.ResourceController.execute(
Caused by: java.lang.ClassNotFoundException: org.codehaus.stax2.XMLInputFactory2
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(
... 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
Comment 1 Michal Srb 2016-03-02 14:05:14 EST
Thanks for the detailed bug report Aaron.
Comment 2 Fedora Update System 2016-03-03 08:02:20 EST
jenkins-1.625.3-3.fc23 jenkins-remoting-2.53.3-1.fc23 has been submitted as an update to Fedora 23.
Comment 3 Fedora Update System 2016-03-03 16:57:43 EST
jenkins-1.625.3-3.fc23, jenkins-remoting-2.53.3-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See for
instructions on how to install test updates.
You can provide feedback for this update here:
Comment 4 Fedora Update System 2016-03-17 16:54:18 EDT
jenkins-1.625.3-3.fc23, jenkins-remoting-2.53.3-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.