Blog

Maven build error: “Caused by: java.io.IOException: Incompatible version 1007”

I was encountering this error in Jenkins when it tried to build a project I was working on:


Caused by: java.io.IOException: Incompatible version 1007.
at org.jacoco.core.data.ExecutionDataReader.readHeader(ExecutionDataReader.java:127)
at org.jacoco.core.data.ExecutionDataReader.readBlock(ExecutionDataReader.java:107)
at org.jacoco.core.data.ExecutionDataReader.read(ExecutionDataReader.java:87)
at org.sonar.plugins.jacoco.AbstractAnalyzer.readExecutionData(AbstractAnalyzer.java:134)
at org.sonar.plugins.jacoco.AbstractAnalyzer.analyse(AbstractAnalyzer.java:107)

The problem was due to a breakage/bug in the jacoco-maven-plugin. To fix, simply add a version in your pom.xml, like so:


<plugin>
    <groupId>org.jacoco</groupId>
    <artifactId>jacoco-maven-plugin</artifactId>
    <version>0.7.4.201502262128</version>
    <executions>
        <execution>
            <goals>
                <goal>prepare-agent</goal>
            </goals>
        </execution>
    </executions>
</plugin>

That’s it!

Seven performance metrics for Java applications

I came across this in this blog post and am adding it here as a checklist. It’s a worthwhile¬†list to have so you can understand how your Java app behaves in production.

  1. Response times and throughput
  2. Load Average
  3. Error Rates (and how to solve them)
  4. GC rate and pause duration
  5. Business Metrics
  6. Uptime and service health
  7. Log size