On Tuesday, July 1, 2014 11:14:34 PM UTC+8, Marc R. Hoffmann wrote: > Hi, > > > > we only test against Sun/OpenJDK 1.5, 1.6, 1.7 and 1.8. Currently we > > cannot consider other JREs vendors. > > > > The problem is with the "runtime access", the strategy to connect > > instrumented classes with the JaCoCo runtime. We have several > > implementations, all with different pros and cons. Unfortunatelly one of > > them (which works best with the JRE above) is hardcoded on the JaCoCo > > agent. Future versions of JaCoCo might have a option to switch between > > different runtimes. > > > > Alternatively you can use "offline instrumentation" which dies not need > > "runtime access" as the instrumented classes get a direct dependency on > > JaCoCo: http://www.eclemma.org/jacoco/trunk/doc/offline.html > > > > Best regards, > > -marc > > > > > > > > > > On 2014-07-01 13:47, [email protected] wrote: > > > Environment: > > > OS: CentOS 6.5 64-bit > > > WebSphere: 8.5.5.2 with JDK 1.7.0.4 32 bit > > > add parameter > > > "-javaagent:/opt/jcc/jacocoagent.jar=includes=com.yyy.*,output=tcpserver,address=xxx.xxx.xxx.xx,port=16666" > > > in JVM. > > > I tried to start application server, but threw below exception. I > > > tested with IBM JDK 1.6, everything is fine. > > > ---------------------------------------------------------------------- > > > Fatal error: processing of -javaagent failed > > > Exception in thread "main" java.lang.reflect.InvocationTargetException > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > at > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88) > > > at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) > > > at java.lang.reflect.Method.invoke(Method.java:613) > > > at > > > sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:404) > > > at > > > sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:419) > > > Caused by: java.lang.RuntimeException: Class java/util/UUID could not > > > be instrumented. > > > at > > > org.jacoco.agent.rt.internal_932a715.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:139) > > > at > > > org.jacoco.agent.rt.internal_932a715.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:100) > > > at > > > org.jacoco.agent.rt.internal_932a715.PreMain.createRuntime(PreMain.java:55) > > > at > > > org.jacoco.agent.rt.internal_932a715.PreMain.premain(PreMain.java:47) > > > ... 6 more > > > Caused by: java.lang.NoSuchFieldException: $jacocoAccess > > > at java.lang.Class.getFieldImpl(Native Method) > > > at java.lang.Class.getField(Class.java:854) > > > at > > > org.jacoco.agent.rt.internal_932a715.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:137) > > > ... 9 more > > > ----------------------------------------------------------------------
On Tuesday, July 1, 2014 11:14:34 PM UTC+8, Marc R. Hoffmann wrote: > Hi, > > > > we only test against Sun/OpenJDK 1.5, 1.6, 1.7 and 1.8. Currently we > > cannot consider other JREs vendors. > > > > The problem is with the "runtime access", the strategy to connect > > instrumented classes with the JaCoCo runtime. We have several > > implementations, all with different pros and cons. Unfortunatelly one of > > them (which works best with the JRE above) is hardcoded on the JaCoCo > > agent. Future versions of JaCoCo might have a option to switch between > > different runtimes. > > > > Alternatively you can use "offline instrumentation" which dies not need > > "runtime access" as the instrumented classes get a direct dependency on > > JaCoCo: http://www.eclemma.org/jacoco/trunk/doc/offline.html > > > > Best regards, > > -marc > > > > > > > > > > On 2014-07-01 13:47, [email protected] wrote: > > > Environment: > > > OS: CentOS 6.5 64-bit > > > WebSphere: 8.5.5.2 with JDK 1.7.0.4 32 bit > > > add parameter > > > "-javaagent:/opt/jcc/jacocoagent.jar=includes=com.yyy.*,output=tcpserver,address=xxx.xxx.xxx.xx,port=16666" > > > in JVM. > > > I tried to start application server, but threw below exception. I > > > tested with IBM JDK 1.6, everything is fine. > > > ---------------------------------------------------------------------- > > > Fatal error: processing of -javaagent failed > > > Exception in thread "main" java.lang.reflect.InvocationTargetException > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > at > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88) > > > at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) > > > at java.lang.reflect.Method.invoke(Method.java:613) > > > at > > > sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:404) > > > at > > > sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:419) > > > Caused by: java.lang.RuntimeException: Class java/util/UUID could not > > > be instrumented. > > > at > > > org.jacoco.agent.rt.internal_932a715.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:139) > > > at > > > org.jacoco.agent.rt.internal_932a715.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:100) > > > at > > > org.jacoco.agent.rt.internal_932a715.PreMain.createRuntime(PreMain.java:55) > > > at > > > org.jacoco.agent.rt.internal_932a715.PreMain.premain(PreMain.java:47) > > > ... 6 more > > > Caused by: java.lang.NoSuchFieldException: $jacocoAccess > > > at java.lang.Class.getFieldImpl(Native Method) > > > at java.lang.Class.getField(Class.java:854) > > > at > > > org.jacoco.agent.rt.internal_932a715.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:137) > > > ... 9 more > > > ---------------------------------------------------------------------- Hi Marc, I forget a important step that i should execute task instrument by Ant before deployment. -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
