jaotc fails to find classes from java.base - java

How to setup/run jaotc so it can find standard JDK classes ?
Using JDK 9 expiremental AOT compiler to pre-build some of the libraries, many fail for similar reasons. e.g.
jaotc --compile-for-tiered --info --output ../aoclib/postgresql-9.4.1208.so --jar ./postgresql-9.4.1208.jar
resuts in
Compiling ../aoclib/postgresql-9.4.1208...
(85 ms)
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jna/win32/StdCallLibrary
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1007)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:545)
at java.base/java.net.URLClassLoader.access$100(URLClassLoader.java:83)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:453)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:447)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:446)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)
at java.base/java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:890)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
at jdk.aot/jdk.tools.jaotc.collect.ClassSearch.loadClass(ClassSearch.java:55)
at jdk.aot/jdk.tools.jaotc.collect.ClassSearch.lambda$search$0(ClassSearch.java:47)
at jdk.aot/jdk.tools.jaotc.collect.jar.JarFileSource.eachClass(JarFileSource.java:47)
at jdk.aot/jdk.tools.jaotc.collect.ClassSearch.search(ClassSearch.java:47)
at jdk.aot/jdk.tools.jaotc.Main.run(Main.java:369)
at jdk.aot/jdk.tools.jaotc.Main.run(Main.java:306)
at jdk.aot/jdk.tools.jaotc.Main.main(Main.java:284)
Caused by: java.lang.ClassNotFoundException: com.sun.jna.win32.StdCallLibrary
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)
at java.base/java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:890)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
... 19 more

Related

JackRabbit Server Caused by: java.lang.ClassNotFoundException: java.security.acl.Group on Java 17

I'm using JackRabbit 2.20.6 for storing multimedia files ( pictures ), and I'm getting the following error during execution:
java.lang.NoClassDefFoundError: java/security/acl/Group
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
at org.apache.jackrabbit.core.security.simple.SimpleSecurityManager$SimplePrincipalProvider.<init>(SimpleSecurityManager.java:321)
at org.apache.jackrabbit.core.security.simple.SimpleSecurityManager$SimplePrincipalProvider.<init>(SimpleSecurityManager.java:309)
at org.apache.jackrabbit.core.security.simple.SimpleSecurityManager.init(SimpleSecurityManager.java:169)
at org.apache.jackrabbit.core.RepositoryImpl.getSecurityManager(RepositoryImpl.java:483)
at org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1496)
at org.apache.jackrabbit.commons.AbstractRepository.login(AbstractRepository.java:123)
at org.gs4tr.foundation.modules.repository.jack.jcr.CustomJcrTemplate.execute(CustomJcrTemplate.java:38)
at org.gs4tr.foundation.modules.repository.jack.JackRabbitRepositoryManagerImpl.store(JackRabbitRepositoryManagerImpl.java:373)
Can someone help me for fixing this?
Note: I'm using Java 17.
2.20.* should not require acl.group; see https://issues.apache.org/jira/browse/JCR-4467.
The simplest possible explanation is that you have old JAR files in your classpath.

While running a spark-java program in eclipse, I am getting this error - java.lang.NoClassDefFoundError

I am using Spark 3.1.2 prebuilt with hadoop 3.2.0. I am using winutils instead of hadoop installation.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/spark/util/HadoopFSUtils$
at org.apache.spark.sql.execution.datasources.DataSource$.$anonfun$checkAndGlobPathIfNecessary$5(DataSource.scala:814)
at org.apache.spark.sql.execution.datasources.DataSource$.$anonfun$checkAndGlobPathIfNecessary$5$adapted(DataSource.scala:813)
at scala.collection.TraversableLike.$anonfun$partition$1(TraversableLike.scala:402)
at scala.collection.immutable.List.foreach(List.scala:392)
at scala.collection.TraversableLike.partition(TraversableLike.scala:402)
at scala.collection.TraversableLike.partition$(TraversableLike.scala:400)
at scala.collection.AbstractTraversable.partition(Traversable.scala:108)
at org.apache.spark.sql.execution.datasources.DataSource$.checkAndGlobPathIfNecessary(DataSource.scala:813)
at org.apache.spark.sql.execution.datasources.DataSource.checkAndGlobPathIfNecessary(DataSource.scala:590)
at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:415)
at org.apache.spark.sql.DataFrameReader.loadV1Source(DataFrameReader.scala:326)
at org.apache.spark.sql.DataFrameReader.$anonfun$load$3(DataFrameReader.scala:308)
at scala.Option.getOrElse(Option.scala:189)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:308)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:240)
at Main.main(Main.java:26)
Caused by: java.lang.ClassNotFoundException: org.apache.spark.util.HadoopFSUtils$
at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 16 more

Eclipse: Testing with Coverage throws java.lang.instrument.IllegalClassFormatException

I recently changed a couple of things in my Eclipse settings, mainly I upgraded the Java version from 8 to 15 and it took me a while to notice, but I cannot Test with Coverage anymore on any of my Projects as it throws a java.lang.instrument.IllegalClassFormatException with a gigantic StackTrace.
It also gives a PopUp Error, that says "No tests found with test runner 'Junit5'" Something, somewhere in the Java Librarys, Junit, or something must've broken, and I cannot figure out what it is. Normal Testing, Debug Testing and even Maven test all function normally with no indication of anything being wrong.
Here's the Junit Failure Trace:
java.util.ServiceConfigurationError: Locale provider adapter "CLDR"cannot be instantiated.
at java.base/sun.util.locale.provider.LocaleProviderAdapter.forType(LocaleProviderAdapter.java:199)
at java.base/sun.util.locale.provider.LocaleProviderAdapter.findAdapter(LocaleProviderAdapter.java:287)
at java.base/sun.util.locale.provider.LocaleProviderAdapter.getAdapter(LocaleProviderAdapter.java:258)
at java.base/java.text.DecimalFormatSymbols.getInstance(DecimalFormatSymbols.java:180)
at java.base/java.util.Formatter.getZero(Formatter.java:2437)
at java.base/java.util.Formatter.(Formatter.java:1956)
at java.base/java.util.Formatter.(Formatter.java:1978)
at java.base/java.lang.String.format(String.java:3292)
at org.junit.runner.Description.formatDisplayName(Description.java:114)
at org.junit.runner.Description.createTestDescription(Description.java:86)
at org.junit.runners.BlockJUnit4ClassRunner.describeChild(BlockJUnit4ClassRunner.java:121)
at org.junit.runners.BlockJUnit4ClassRunner.describeChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner.getDescription(ParentRunner.java:401)
at org.junit.runners.model.RunnerBuilder.configureRunner(RunnerBuilder.java:81)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:72)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:37)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
at org.junit.internal.requests.ClassRequest.createRunner(ClassRequest.java:28)
at org.junit.internal.requests.MemoizingRequest.getRunner(MemoizingRequest.java:19)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createUnfilteredTest(JUnit4TestLoader.java:90)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:76)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:49)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:526)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at java.base/sun.util.locale.provider.LocaleProviderAdapter.forType(LocaleProviderAdapter.java:188)
... 25 more
Caused by: java.util.ServiceConfigurationError: sun.util.locale.provider.LocaleDataMetaInfo: Unable to load sun.util.resources.cldr.provider.CLDRLocaleDataMetaInfo
at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:584)
at java.base/java.util.ServiceLoader.loadProvider(ServiceLoader.java:856)
at java.base/java.util.ServiceLoader$ModuleServicesLookupIterator.hasNext(ServiceLoader.java:1078)
at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1301)
at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1386)
at java.base/sun.util.cldr.CLDRLocaleProviderAdapter$1.run(CLDRLocaleProviderAdapter.java:89)
at java.base/sun.util.cldr.CLDRLocaleProviderAdapter$1.run(CLDRLocaleProviderAdapter.java:86)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:554)
at java.base/sun.util.cldr.CLDRLocaleProviderAdapter.(CLDRLocaleProviderAdapter.java:86)
... 31 more
Caused by: java.lang.LinkageError: loader 'platform' attempted duplicate class definition for sun.util.resources.cldr.provider.CLDRLocaleDataMetaInfo. (sun.util.resources.cldr.provider.CLDRLocaleDataMetaInfo is in module jdk.localedata of loader 'platform')
at java.base/java.lang.ClassLoader.defineClass2(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1108)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:183)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:784)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassInModuleOrNull(BuiltinClassLoader.java:705)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClass(BuiltinClassLoader.java:586)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:634)
at java.base/java.lang.Class.forName(Class.java:546)
at java.base/java.util.ServiceLoader.loadProvider(ServiceLoader.java:854)
... 38 more
And here the console StackTrace:
java.lang.instrument.IllegalClassFormatException: Error while instrumenting sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo.
at org.jacoco.agent.rt.internal_43f5073.CoverageTransformer.transform(CoverageTransformer.java:94)
at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:246)
at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188)
at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:563)
at java.base/java.lang.ClassLoader.defineClass2(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1108)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:183)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:784)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassInModuleOrNull(BuiltinClassLoader.java:705)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClass(BuiltinClassLoader.java:586)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:634)
at java.base/java.lang.Class.forName(Class.java:546)
at java.base/java.util.ServiceLoader.loadProvider(ServiceLoader.java:854)
at java.base/java.util.ServiceLoader$ModuleServicesLookupIterator.hasNext(ServiceLoader.java:1078)
at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1301)
at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1386)
at java.base/sun.util.cldr.CLDRLocaleProviderAdapter$1.run(CLDRLocaleProviderAdapter.java:89)
at java.base/sun.util.cldr.CLDRLocaleProviderAdapter$1.run(CLDRLocaleProviderAdapter.java:86)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:554)
at java.base/sun.util.cldr.CLDRLocaleProviderAdapter.(CLDRLocaleProviderAdapter.java:86)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at java.base/sun.util.locale.provider.LocaleProviderAdapter.forType(LocaleProviderAdapter.java:188)
at java.base/sun.util.locale.provider.LocaleProviderAdapter.findAdapter(LocaleProviderAdapter.java:287)
at java.base/sun.util.locale.provider.LocaleProviderAdapter.getAdapter(LocaleProviderAdapter.java:258)
at java.base/java.text.DecimalFormatSymbols.getInstance(DecimalFormatSymbols.java:180)
at java.base/java.util.Formatter.getZero(Formatter.java:2437)
at java.base/java.util.Formatter.(Formatter.java:1956)
at java.base/java.util.Formatter.(Formatter.java:1978)
at java.base/java.lang.String.format(String.java:3292)
at org.junit.runner.Description.formatDisplayName(Description.java:114)
at org.junit.runner.Description.createTestDescription(Description.java:86)
at org.junit.runners.BlockJUnit4ClassRunner.describeChild(BlockJUnit4ClassRunner.java:121)
at org.junit.runners.BlockJUnit4ClassRunner.describeChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner.getDescription(ParentRunner.java:401)
at org.junit.runners.model.RunnerBuilder.configureRunner(RunnerBuilder.java:81)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:72)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:37)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
at org.junit.internal.requests.ClassRequest.createRunner(ClassRequest.java:28)
at org.junit.internal.requests.MemoizingRequest.getRunner(MemoizingRequest.java:19)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createUnfilteredTest(JUnit4TestLoader.java:90)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:76)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:49)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:526)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
Caused by: java.io.IOException: Error while instrumenting sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo.
at org.jacoco.agent.rt.internal_43f5073.core.instr.Instrumenter.instrumentError(Instrumenter.java:159)
at org.jacoco.agent.rt.internal_43f5073.core.instr.Instrumenter.instrument(Instrumenter.java:109)
at org.jacoco.agent.rt.internal_43f5073.CoverageTransformer.transform(CoverageTransformer.java:92)
... 50 more
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 59
at org.jacoco.agent.rt.internal_43f5073.asm.ClassReader.(ClassReader.java:195)
at org.jacoco.agent.rt.internal_43f5073.asm.ClassReader.(ClassReader.java:176)
at org.jacoco.agent.rt.internal_43f5073.asm.ClassReader.(ClassReader.java:162)
at org.jacoco.agent.rt.internal_43f5073.core.internal.instr.InstrSupport.classReaderFor(InstrSupport.java:280)
at org.jacoco.agent.rt.internal_43f5073.core.instr.Instrumenter.instrument(Instrumenter.java:75)
at org.jacoco.agent.rt.internal_43f5073.core.instr.Instrumenter.instrument(Instrumenter.java:107)
... 51 more
What I find weird about the Stack Trace is that seems to try and use Junit4, despite the fact that I've always used 5 both before and after my changes in Eclipse, but that's about the only thing I can read out of it.
Does someone know which setting in my Eclipse broke or help me decode the StackTrace?
Try with Java 11 or java 1.8.281
JaCoCo version 0.8.5

can not running javafx project on netbeans8-2

i can not run a simple javaFx project on netbeans8-2
i am using ubuntu 18.04 LTS and openjdk
but openjfx can not install on my system (in fact it will install but files that are here [ https://packages.ubuntu.com/bionic/amd64/openjfx/filelist ] will not exist at their place)
for example file jfxrt.jar was not exist in the /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/ directory
so i copy this file with sudo cp command
but i can not find two files that their names are javafxpackager.1.gz and javapackager.1.gz on my system and internet
and so on the errors are this when i run my program
run:
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:498)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: com.sun.glass.ui.gtk.GtkApplication._isDisplayValid()Z
at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:267)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:211)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:337)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
... 5 more
Caused by: java.lang.UnsatisfiedLinkError: com.sun.glass.ui.gtk.GtkApplication._isDisplayValid()Z
at com.sun.glass.ui.gtk.GtkApplication._isDisplayValid(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.isDisplayValid(GtkApplication.java:83)
at com.sun.glass.ui.gtk.GtkApplication.<init>(GtkApplication.java:67)
at com.sun.glass.ui.gtk.GtkPlatformFactory.createApplication(GtkPlatformFactory.java:41)
at com.sun.glass.ui.Application.run(Application.java:146)
at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:257)
... 9 more
/home/*/.cache/netbeans/8.2/executor-snippets/run.xml:53: Java returned: 1
BUILD FAILED (total time: 3 seconds)
that link refers to
<java classpath="${classpath}" classname="${classname}" dir="${work.dir}" jvm="${platform.java}" fork="true" failonerror="${java.failonerror}">
is my problem related to openjfx?

Why Gradle build fail with java8?

We have Gradle script it is building multiple projects with different sourceCompatibility and targetCompatibility. If my environment variables JAVA_HOME set to jdk7 all the projects are building successfully. Then I changed the JAVA_HOME to jdk8. Now build fail with below errors:
FATAL ERROR in native method: processing of -javaagent failed
FATAL ERROR in native method: processing of -javaagent failed
ava.lang.VerifyError: Expecting a stackmap frame at branch target 51
Exception Details:
Location:
com/test/Tray.<clinit>()V #42: ifnull
Reason:
Expected stackmap frame at this location.
Bytecode:
0x0000000: 08bd 0063 5903 1264 5359 0412 6553 5905
0x0000010: 1266 5359 0612 6753 5907 1268 53b3 006a
0x0000020: 08bd 006c 5903 00b2 0080 c600 09b2 0080
0x0000030: a700 0c12 82b8 0084 59b3 0080 0053 5904
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_6l8m50.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:138)
at org.jacoco.agent.rt_6l8m50.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:99)
at org.jacoco.agent.rt_6l8m50.JacocoAgent.createRuntime(JacocoAgent.java:128)
at org.jacoco.agent.rt_6l8m50.JacocoAgent.init(JacocoAgent.java:74)
at org.jacoco.agent.rt_6l8m50.JacocoAgent.premain(JacocoAgent.java:165)
... 6 more
Caused by: java.lang.NoSuchFieldException: $jacocoAccess
at java.lang.Class.getField(Class.java:1703)
at org.jacoco.agent.rt_6l8m50.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:136)
... 10 more
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option UseSplitVerifier; support was removed in 8.0
Exception in thread "main" Could not write standard input into: Gradle Test Executor 2.
java.io.IOException: The pipe is being closed
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:326)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at org.gradle.process.internal.streams.ExecOutputHandleRunner.run(ExecOutputHandleRunner.java:50)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
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_6l8m50.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:138)
at org.jacoco.agent.rt_6l8m50.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:99)
at org.jacoco.agent.rt_6l8m50.JacocoAgent.createRuntime(JacocoAgent.java:128)
at org.jacoco.agent.rt_6l8m50.JacocoAgent.init(JacocoAgent.java:74)
at org.jacoco.agent.rt_6l8m50.JacocoAgent.premain(JacocoAgent.java:165)
... 6 more
Could you please tel me how to fix this issue with java8?
You may need to play around with your version of JaCoCo and/or ASM according to this. It's a known issue going back to about 2013. Go to the maven search site, find the latest versions and push your test dependencies to the latest available ones and see if that fixes it.

Categories