jacoco-0.7.1:Jacoco does not support IBM JDK 1.7

388 kali dilihat
Langsung ke pesan pertama yang belum dibaca

ign...@gmail.com

belum dibaca,
1 Jul 2014, 07.47.4101/07/14
kepadajac...@googlegroups.com
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
----------------------------------------------------------------------

Marc Hoffmann

belum dibaca,
1 Jul 2014, 11.14.3401/07/14
kepadajac...@googlegroups.com
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

ign...@gmail.com

belum dibaca,
1 Jul 2014, 11.48.0901/07/14
kepadajac...@googlegroups.com

Hi Marc,

Thanks for your reply.
I have read the offline instrumentation carefully . As you said, i must find the right way to use offline mode, but i have below limits when i am using JaCoCo:
1. I could not intervene in development because i am a QA. The devlopment team will deliver the application EAR package to me, then i only need deploy it on WebSphere for testing.
2. the testing is a black-box test.

I think i only need copy jacoco-agent.properties and jacocoagent.jar into WebSphere library (the websphere will load the jar and the properties file), then stop application server after running test cases. Can I get the test coverage?
If my way is wrong, what can i do?

Best regards
Matthew


Marc Hoffmann

belum dibaca,
1 Jul 2014, 11.56.0701/07/14
kepadajac...@googlegroups.com
Hi,

unfortunatelly offline mode also needs the class files within your
webapp to be physically instrumented. This is the main drawback of
offline instrumentation.

Best regards,
-marc
Pesan telah dihapus

ign...@gmail.com

belum dibaca,
1 Jul 2014, 12.14.2401/07/14
kepadajac...@googlegroups.com
Hi,

You means that the physically instrumented must be done in developing, is it?
Can i execute the task "instrument" on ear package to do instrument before deployment?

Best regards
Matthew




在 2014年7月1日星期二UTC+8下午11时56分07秒,Marc R. Hoffmann写道:

Marc Hoffmann

belum dibaca,
1 Jul 2014, 12.19.3401/07/14
kepadajac...@googlegroups.com
> Can i execute the task "instrument" on ear package to do instrument
> before deployment?

That should work.

ddr...@gmail.com

belum dibaca,
3 Des 2014, 04.14.3203/12/14
kepadajac...@googlegroups.com
I have the same problem, then open the WebSphere debug mode, everything is okay!

anupku...@gmail.com

belum dibaca,
21 Mar 2016, 13.03.2421/03/16
kepadaJaCoCo and EclEmma Users

Hi,

I am using Jacoco 2.0.1 version but still i am getting the same exception.
Jacoco is not able to run any of the Junit test suit as well as it is not able to create report, It is throwing exception.

Could you please help me as soon as possible so that i can proceed further.

Thanks in Advance.

Balas ke semua
Balas ke penulis
Teruskan
Percakapan ini dikunci
Anda tidak dapat membalas dan melakukan tindakan pada percakapan yang terkunci.
0 pesan baru