JDK 9 Early Access with Project Jigsaw, build 135 on 09-14-2016 (#5500)
Alan Bateman
Alan.Bateman at oracle.com
Sun Oct 2 07:53:49 UTC 2016
On 02/10/2016 01:25, Malachi de Ælfweald wrote:
> :
>
> This appears to come from a setAccessible from inside getEnv
> https://github.com/adammurdoch/native-platform/blob/master/src/main/java/net/rubygrapefruit/platform/internal/WrapperProcess.java#L113
Indeed, as we've said in other mails, this change is going to expose a
lot hacks. In this specific case then System.getenv() is specified to
return an unmodifiable map but a library that Gradle uses seems to want
to hack into the underlying map so that it can modify it. Stack trace below.
Jochen may be able to find out more about this, maybe there is a
description somewhere on what the real issue is. It might be something
that can be tackled in other ways.
-Alan
* Exception is:
net.rubygrapefruit.platform.NativeException: Unable to get mutable
environment variable map.
at
net.rubygrapefruit.platform.internal.WrapperProcess.getEnv(WrapperProcess.java:113)
at
net.rubygrapefruit.platform.internal.WrapperProcess.removeEnvInternal(WrapperProcess.java:91)
at
net.rubygrapefruit.platform.internal.WrapperProcess.setEnvironmentVariable(WrapperProcess.java:82)
at
org.gradle.internal.nativeintegration.processenvironment.NativePlatformBackedProcessEnvironment.removeNativeEnvironmentVariable(NativePlatformBackedProcessEnvironment.java:31)
at
org.gradle.internal.nativeintegration.processenvironment.AbstractProcessEnvironment.removeEnvironmentVariable(AbstractProcessEnvironment.java:47)
at
org.gradle.internal.nativeintegration.processenvironment.AbstractProcessEnvironment.maybeSetEnvironment(AbstractProcessEnvironment.java:37)
at
org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:65)
at
org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at
org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at
org.gradle.launcher.daemon.server.exec.HintGCAfterBuild.execute(HintGCAfterBuild.java:44)
at
org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at
org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
at
org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:293)
at
org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at
org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1161)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:843)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make
field private final java.util.Map
java.util.Collections$UnmodifiableMap.m accessible: module java.base
does not "exports private java.util" to unnamed module @78123e82
at
java.base/jdk.internal.reflect.Reflection.throwInaccessibleObjectException(Reflection.java:414)
at
java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:198)
at
java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:171)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:165)
at
net.rubygrapefruit.platform.internal.WrapperProcess.getEnv(WrapperProcess.java:110)
... 17 more
More information about the jigsaw-dev
mailing list