[ 
https://issues.apache.org/jira/browse/IGNITE-8146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16627342#comment-16627342
 ] 

Taras Ledkov edited comment on IGNITE-8146 at 9/25/18 1:13 PM:
---------------------------------------------------------------

The option {{--add-opens java.base/jdk.internal.loader=ALL-UNNAMED}} must be 
added.

Full options list:
{code}
--add-opens java.base/jdk.internal.loader=ALL-UNNAMED 
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED 
--add-exports java.base/sun.nio.ch=ALL-UNNAMED 
--add-exports java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED 
--add-exports jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED 
--add-exports java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED 
--add-modules java.xml.bind
{code}


was (Author: tledkov-gridgain):
The option {{--add-opens java.base/jdk.internal.loader=ALL-UNNAMED }} must be 
added.

Full options list:
{code}
--add-opens java.base/jdk.internal.loader=ALL-UNNAMED 
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED 
--add-exports java.base/sun.nio.ch=ALL-UNNAMED 
--add-exports java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED 
--add-exports jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED 
--add-exports java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED 
--add-modules java.xml.bind
{code}

> JDK9: IgniteUtils classLoaderUrls() JDK9 bug
> --------------------------------------------
>
>                 Key: IGNITE-8146
>                 URL: https://issues.apache.org/jira/browse/IGNITE-8146
>             Project: Ignite
>          Issue Type: Bug
>          Components: general
>    Affects Versions: 2.4
>            Reporter: Sujit Kumar Mahapatra
>            Assignee: Taras Ledkov
>            Priority: Trivial
>              Labels: jdk9
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Reporting a probable miss that breaks JDK9 compatibility.
> As part of [this 
> commit|https://github.com/apache/ignite/commit/ee2a6f7c3f2e3c9bd8dc61c8dbdf171e933d9481#diff-309ab4ef2fc61d6b2570d390acfb9bd6]
>   in 
> [ignite|https://github.com/apache/ignite/tree/f1a853ded8e835ce8c98c029cce7d5d17fbd3f52]/modules/core/src/main/java/org/apache/ignite/internal/util/*IgniteUtils.java,*
>  below lines will throw *ClassCastException* in JDK9 during runtime.
> _return ((URLClassLoader)urlClsLdrField.get(clsLdr)).getURLs();_
>  
> Here, _urlClsLdrField.get(clsLdr)_ return an object of type 
> "___java.base/jdk.internal.loader.URLClassPath_" which can't be cast to 
> "_URLClassLoader"._
>  
> The fix seems to be to introduce another reflection call to invoke _getURLs_  
> method of the internal _URLClassPath_ class.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to