"Unknown block type" error

2,015 views
Skip to first unread message

flo...@gmail.com

unread,
Jan 7, 2013, 4:48:37 PM1/7/13
to jac...@googlegroups.com
Hi all!

I'm trying to use JaCoCo thru the sonar integration. When analyzing my project, I'm getting:

java.io.IOException: Unknown block type b.
at org.jacoco.core.data.ExecutionDataReader.readBlock(ExecutionDataReader.java:114)
at org.jacoco.core.data.ExecutionDataReader.read(ExecutionDataReader.java:85)
at org.sonar.plugins.jacoco.AbstractAnalyzer.readExecutionData(AbstractAnalyzer.java:76)
at org.sonar.plugins.jacoco.AbstractAnalyzer.analyse(AbstractAnalyzer.java:59)
... 38 more

Any idea why this could be? Looks like AOP related but not sure how can I fix it... the plugin runs jacoco thru:

-javaagent:/tmp/jacocoagent6916398483803369894.jar=destfile=target/jacoco.exec,excludes=*_javassist_*

Marc R. Hoffmann

unread,
Jan 7, 2013, 5:26:48 PM1/7/13
to jac...@googlegroups.com
Hi,

this happens with broken *.exec files. A common reason is parallel test
execution when multiple processes write to the same file (which is not
supported).

Best regards,
-marc

Marko Dimjašević

unread,
Jan 7, 2013, 5:52:25 PM1/7/13
to jac...@googlegroups.com
"Marc R. Hoffmann" <hoff...@mountainminds.com> writes:

> Hi,
>
> this happens with broken *.exec files. A common reason is parallel
> test execution when multiple processes write to the same file (which
> is not supported).

For this parallel test execution example that you mentioned, is it
possible to write results in parallel to separate .exec files (one .exec
file per test), and then later on sequentially combine those .exec files
into a single .exec file which would the report be generated from?


Thanks,
Marko Dimjašević
signature.asc

Marc R. Hoffmann

unread,
Jan 8, 2013, 2:08:38 AM1/8/13
to jac...@googlegroups.com
Hi Marko,

technically this is possible with JaCoCo APIs. But the Maven integration
does not yet support this. Here is the pending feature request:

https://github.com/jacoco/jacoco/issues/52

Best regards,
-marc

flo...@gmail.com

unread,
Jan 8, 2013, 5:47:16 AM1/8/13
to jac...@googlegroups.com
This is actually the case - our test suite is big, so we run concurrently. I will create a profile in maven which disables the concurrency and run sonar with it.

Thanks a lot!

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