Java 8 & DocLint

79 views
Skip to first unread message

Niclas Hedhman

unread,
Aug 26, 2014, 12:36:40 AM8/26/14
to qi4j...@googlegroups.com

So, I have just made a massive commit, which I think only contains the Javadoc changes needed for Qi4j SDK to javadoc compile under JDK8.


I thought that "turn off" isn't the best way forward, so I spent the time to fix it up.


HOWEVER, I get weird exceptions about jacoco (what is that?)


objc[21769]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_11.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_11.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.

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:483)

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_5d10cad.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:138)

at org.jacoco.agent.rt.internal_5d10cad.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:99)

at org.jacoco.agent.rt.internal_5d10cad.PreMain.createRuntime(PreMain.java:51)

at org.jacoco.agent.rt.internal_5d10cad.PreMain.premain(PreMain.java:43)

... 6 more

Caused by: java.lang.NoSuchFieldException: $jacocoAccess

at java.lang.Class.getField(Class.java:1690)

at org.jacoco.agent.rt.internal_5d10cad.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:136)

... 9 more

FATAL ERROR in native method: processing of -javaagent failed



Cheers
--
Niclas Hedhman, Software Developer
河南南路555弄15号1901室。
http://www.qi4j.org - New Energy for Java

I live here; http://tinyurl.com/3xugrbk
I work here; http://tinyurl.com/6a2pl4j
I relax here; http://tinyurl.com/2cgsug

Paul Merlin

unread,
Aug 27, 2014, 3:54:32 AM8/27/14
to qi4j...@googlegroups.com
Niclas,

Niclas Hedhman a écrit :

So, I have just made a massive commit, which I think only contains the Javadoc changes needed for Qi4j SDK to javadoc compile under JDK8.


I thought that "turn off" isn't the best way forward, so I spent the time to fix it up.
Thanks for taking that time!


HOWEVER, I get weird exceptions about jacoco (what is that?)


objc[21769]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_11.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_11.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.

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:483)

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_5d10cad.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:138)

at org.jacoco.agent.rt.internal_5d10cad.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:99)

at org.jacoco.agent.rt.internal_5d10cad.PreMain.createRuntime(PreMain.java:51)

at org.jacoco.agent.rt.internal_5d10cad.PreMain.premain(PreMain.java:43)

... 6 more

Caused by: java.lang.NoSuchFieldException: $jacocoAccess

at java.lang.Class.getField(Class.java:1690)

at org.jacoco.agent.rt.internal_5d10cad.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:136)

... 9 more

FATAL ERROR in native method: processing of -javaagent failed

Yup, the Jacoco build setup must use the latest Jacoco version available to work with Java 8. From what I remember, the build use the Gradle Jacoco plugin in each module but use the ant task to produce the aggregated coverage report (should be in ~/build.gradle). I'll take a look when I get some time if you don't figure it out.

Cheers

/Paul





Reply all
Reply to author
Forward
0 new messages