[
https://issues.apache.org/jira/browse/IGNITE-11216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16765023#comment-16765023
]
Dmitriy Pavlov commented on IGNITE-11216:
-----------------------------------------
[~ustas], yes, warning about reflective access in unavoidable.
See also https://docs.oracle.com/en/java/javase/11/tools/java.html
--illegal-access and it's value 'permit'
{quote}
This mode opens each package in each module in the run-time image to code in
all unnamed modules (such as code on the class path), if that package existed
in JDK 8. This enables both static access (for example, by compiled bytecode),
and deep reflective access through the platform's various reflection APIs. The
first reflective-access operation to any such package causes a warning to be
issued. However, no warnings are issued after the first occurrence. This single
warning describes how to enable further warnings. This mode is the default for
the current JDK but will change in a future release.
{quote}
> Ignite.sh fails on Mac OS and Linux - Java 11
> ---------------------------------------------
>
> Key: IGNITE-11216
> URL: https://issues.apache.org/jira/browse/IGNITE-11216
> Project: Ignite
> Issue Type: Task
> Affects Versions: 2.7
> Reporter: Denis Magda
> Assignee: Peter Ivanov
> Priority: Blocker
> Fix For: 2.8
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Ignite.sh fails on Mac OS Mojave with the following JDK version:
> java version "11.0.2" 2019-01-15 LTS
> Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
> Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)
> The same issue is reproduced on Linux and the workaround is discussed here:
> https://issues.apache.org/jira/browse/IGNITE-11113
> The exception is as follows:
> {noformat}
> /Users/dmagda/Downloads/apache-ignite-2.7.0-bin/bin/include/functions.sh:
> line 40: [: -eq: unary operator expected
> ./ignite.sh: line 152: [: -eq: unary operator expected
> ./ignite.sh: line 157: [: -gt: unary operator expected
> ./ignite.sh: line 170: [: -eq: unary operator expected
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by
> org.apache.ignite.internal.util.GridUnsafe$2
> (file:/Users/dmagda/Downloads/apache-ignite-2.7.0-bin/libs/ignite-core-2.7.0.jar)
> to field java.nio.Buffer.address
> WARNING: Please consider reporting this to the maintainers of
> org.apache.ignite.internal.util.GridUnsafe$2
> WARNING: Use --illegal-access=warn to enable warnings of further illegal
> reflective access operations
> WARNING: All illegal access operations will be denied in a future release
> Exception in thread "main" java.lang.ExceptionInInitializerError
> at
> org.apache.ignite.internal.util.IgniteUtils.<clinit>(IgniteUtils.java:795)
> at
> org.apache.ignite.lang.IgniteProductVersion.fromString(IgniteProductVersion.java:305)
> at
> org.apache.ignite.internal.IgniteVersionUtils.<clinit>(IgniteVersionUtils.java:71)
> at
> org.apache.ignite.startup.cmdline.CommandLineStartup.<clinit>(CommandLineStartup.java:99)
> Caused by: java.lang.RuntimeException: jdk.internal.misc.JavaNioAccess class
> is unavailable.
> at
> org.apache.ignite.internal.util.GridUnsafe.javaNioAccessObject(GridUnsafe.java:1453)
> at
> org.apache.ignite.internal.util.GridUnsafe.<clinit>(GridUnsafe.java:112)
> ... 4 more
> Caused by: java.lang.IllegalAccessException: class
> org.apache.ignite.internal.util.GridUnsafe cannot access class
> jdk.internal.misc.SharedSecrets (in module java.base) because module
> java.base does not export jdk.internal.misc to unnamed module @4f83df68
> at
> java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361)
> at
> java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:591)
> at java.base/java.lang.reflect.Method.invoke(Method.java:558)
> at
> org.apache.ignite.internal.util.GridUnsafe.javaNioAccessObject(GridUnsafe.java:1450)
> ... 5 more
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)