Jacoco fails in Jenkins

388 views
Skip to first unread message

Daniel Watrous

unread,
Feb 13, 2018, 1:52:59 PM2/13/18
to JaCoCo and EclEmma Users
I have tried to introduce jacoco into my build pipeline, but it fails and I can't find anything online to help me understand why. The plugin itself appears to work, but they it complains that it can't access the files. Here's a snippet of the error stacktrace.

[Pipeline] { (Code coverage (jacoco))
[Pipeline] jacoco
[JaCoCo plugin] Collecting JaCoCo coverage data...
[JaCoCo plugin] **/target/**.exec;**/classes;**/src/main/java; locations are configured
[JaCoCo plugin] Number of found exec files for pattern **/target/**.exec: 1
[JaCoCo plugin] Saving matched execfiles:  /home/jenkins/workspace/elopment_automation_jenkins-DUMUCGCV43HJK2LF4OUPIWNQHCBBPCZUYH3HIEXOZKSSQM4BXWQA/target/jacoco.exec
[JaCoCo plugin] Saving matched class directories for class-pattern: **/classes: 
[JaCoCo plugin]  - /home/jenkins/workspace/elopment_automation_jenkins-DUMUCGCV43HJK2LF4OUPIWNQHCBBPCZUYH3HIEXOZKSSQM4BXWQA/target/api-termination/WEB-INF/classes 130 files[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // podTemplate
[Pipeline] End of Pipeline
java.nio.file.AccessDeniedException: /var/jenkins_home/jobs/api-termination/jobs/api-termination-automation-development/branches/automation-jenkins.4nehn8/builds/42/jacoco/classes/com/company/common/AuditActn.class
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
	at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
	at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
	at java.nio.file.Files.newOutputStream(Files.java:216)
	at hudson.util.IOUtils.copy(IOUtils.java:39)
	at hudson.FilePath.readFromTar(FilePath.java:2307)
Also:   	Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from 10.233.69.140/10.233.69.140:39734
			at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1693)
			at hudson.remoting.UserResponse.retrieve(UserRequest.java:310)
			at hudson.remoting.Channel$2.adapt(Channel.java:944)

The AccessDeniedException is for a directory that doesn't exist: /var/jenkins_home... I'm not sure if the jacoco plugin is trying to create that directory or if something else is suggesting that is a valid directory.

Any ideas to get this build working?

Daniel Watrous

unread,
Feb 13, 2018, 2:20:19 PM2/13/18
to JaCoCo and EclEmma Users
I explicitly added the path to the compiled classes and the plugin now works. The incorrect path may be a default path in the plugin that it used when I didn't explicitly provide one.

Marc Hoffmann

unread,
Feb 14, 2018, 11:52:06 AM2/14/18
to jac...@googlegroups.com

Hi Daniel,

the Jenkins plug-in is not maintained by us. please have a look at the project site to find their mailing list: https://plugins.jenkins.io/jacoco

Thanks for your understanding,
-marc

--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/b2f984cc-bbe1-486a-8289-9aea960a4f8b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

 

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages