JDK 1.6.0_17
Tomcat 6.0.35
Jacoco 0.6.2.2013020300002
Jenkins 1.513
First I tried to run the test task with -debug from Jenkins, and no errors anymore.
Then I tried to run the test task without -debug from Jenkins, still no error anymore.
FYR, below is some output from my ant task:
Apache Ant(TM) version 1.8.2 compiled on December 20 2010
Trying the default build file: build.xml
Buildfile: /xxx/jacoco/doc/examples/build/build.xml
Adding reference: ant.PropertyHelper
Detected Java version: 1.6 in: /xxx/jdk1.6.0_31/jre
Detected OS: Linux
Anyway I am trying a full build on Jenkins now, will update you of my result ;-)
Apache Ant(TM) version 1.8.2 compiled on December 20 2010
Adding reference: ant.PropertyHelper
Detected Java version: 1.6 in: /xxx/jdk1.6.0_31/jre
Detected OS: Linux
...
[antlib:org.jacoco.ant] Could not load definitions from resource org/jacoco/ant/antlib.xml. It could not be found.
Finding class org.jacoco.core.runtime.AgentOptions
Loaded from /xxx/jacoco/lib/jacocoant.jar org/jacoco/core/runtime/AgentOptions.class
Class org.jacoco.core.runtime.AgentOptions loaded from ant loader (parentFirst)...
...
Execute:Java13CommandLauncher: Executing '/usr/jdk1.6.0_31/jre/bin/java' with arguments:
'-javaagent:/tmp/jacocoagent7474638195405486305.jar=destfile=/xxx/jenkins/jobs/myapp/workspace/test_reports/jacoco.exec'
'-classpath'
'/xxx/jenkins/jobs/myapp/workspace/bin:/xxx/jenkins/jobs/myapp/workspace/lib/<all-the-jars>.jar:/xxx/jenkins/jobs/myapp/workspace/lib/test/junit-4.8.1.jar:/xxx/jenkins/jobs/myapp/workspace/lib/test/mockito-all-1.9.5-rc1.jar:/home/optimeqa/tomcat/apache-tomcat-6.0.35/bin/bootstrap.jar:/xxx/apache-ant-1.8.2/lib/ant-launcher.jar:/xxx/apache-ant-1.8.2/lib/ant.jar:/xxx/apache-ant-1.8.2/lib/ant-junit.jar:/xxx/apache-ant-1.8.2/lib/ant-junit4.jar'
'org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner'
'testsfile=/xxx/jenkins/jobs/myapp/workspace/junittestcases4896000639805670110.properties'
'filtertrace=true'
'haltOnError=false'
'haltOnFailure=false'
'showoutput=false'
'outputtoformatters=true'
'logfailedtests=true'
'logtestlistenerevents=false'
'formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,/xxx/jenkins/jobs/myapp/workspace/test_reports/IGNORETHIS.xml'
'crashfile=/xxx/jenkins/jobs/myapp/workspace/junitvmwatcher3328629704971248104.properties'
'propsfile=/xxx/jenkins/jobs/myapp/workspace/junit2716640935257940019.properties'
The ' characters around the executable and arguments are
not part of the command.
[junit] FATAL ERROR in native method: processing of -javaagent failed
[junit] Exception in thread "main" java.lang.reflect.InvocationTargetException
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:597)
[junit] at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)
[junit] at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
[junit] Caused by: java.lang.RuntimeException: Class java/util/UUID could not be instrumented.
[junit] at org.jacoco.agent.rt.internal_5d10cad.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:138)
[junit] at org.jacoco.agent.rt.internal_5d10cad.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:99)
[junit] at org.jacoco.agent.rt.internal_5d10cad.PreMain.createRuntime(PreMain.java:51)
[junit] at org.jacoco.agent.rt.internal_5d10cad.PreMain.premain(PreMain.java:43)
[junit] ... 6 more
[junit] Caused by: java.lang.NoSuchFieldException: $jacocoAccess
[junit] at java.lang.Class.getField(Class.java:1520)
[junit] at org.jacoco.agent.rt.internal_5d10cad.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:136)
[junit] ... 9 more
Any ideal, when can we expect Java 8 supported??
==============
C:\IBM\WebSphere\AppServer\java_1.7_64\bin>java -version
java version "1.7.0"
Java(TM) SE Runtime Environment (build pwa6470sr4fp1ifix-20130423_02(SR4 FP1+IV3
8579+IV38399+IV40208))
IBM J9 VM (build 2.6, JRE 1.7.0 Windows 7 amd64-64 Compressed References 2013042
1_145945 (JIT enabled, AOT enabled)
J9VM - R26_Java726_SR4_FP1_2_20130421_2353_B145945
JIT - r11.b03_20130131_32403ifx4
GC - R26_Java726_SR4_FP1_2_20130421_2353_B145945_CMPRSS
J9CL - 20130422_145945)
JCL - 20130225_01 based on Oracle 7u13-b08
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
Caused by: java.lang.RuntimeException: Class java/util/UUID could not be instrumented.
at org.jacoco.agent.rt.internal_b0d6a23.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:139)
at org.jacoco.agent.rt.internal_b0d6a23.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:100)
at org.jacoco.agent.rt.internal_b0d6a23.PreMain.createRuntime(PreMain.java:55)
at org.jacoco.agent.rt.internal_b0d6a23.PreMain.premain(PreMain.java:47)
... 6 more
Caused by: java.lang.NoSuchFieldException: $jacocoAccess
at java.lang.Class.getField(Class.java:1703)
at org.jacoco.agent.rt.internal_b0d6a23.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:137)
... 9 more
FATAL ERROR in native method: processing of -javaagent failed
I'm configuring JAVA_OPTS in this way:
export JAVA_OPTS="-javaagent:/tmp/jacoco/lib/jacocoagent.jar=output=tcpserver,address=*,port=6300,includes=*"