You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Jeff Gullett (JIRA)" <ji...@apache.org> on 2018/10/26 00:26:00 UTC

[jira] [Commented] (AMQ-6864) Add appropriate Java 9 JVM arguments to allow reflective access to sun.* classes

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

Jeff Gullett commented on AMQ-6864:
-----------------------------------

Java 9 and 10 are already EOL, so this issue should be closed to AMQ-7087.

> Add appropriate Java 9 JVM arguments to allow reflective access to sun.* classes
> --------------------------------------------------------------------------------
>
>                 Key: AMQ-6864
>                 URL: https://issues.apache.org/jira/browse/AMQ-6864
>             Project: ActiveMQ
>          Issue Type: Bug
>            Reporter: Tim Bain
>            Priority: Major
>
> As reported on the user mailing list (http://activemq.2283324.n4.nabble.com/exception-while-launching-my-application-with-JRE9-when-it-tries-to-establish-a-secure-socket-connecq-td4732904.html), when ActiveMQ runs on a Java 9 JRE, it encounters security exceptions.
> The Java 9 JRE intentionally prevents access to non-public classes (especially the sun.* ones), which apparently includes reflective access to classes that implement (and are referred to by) public interfaces in java.* and javax.*. There are several JVM arguments that appear to allow that access; --add-exports seems to be the one best-suited to our needs based on about 10 minutes of research, but a more thorough examination of the available options (including --add-opens) should be done before settling on the approach to use. Alternatively, there may be some Java 9-compliant way to do reflection without hitting this issue, or maybe in some cases we can eliminate the use of reflection in favor of compiled code.
> This will probably be a game of Whack-A-Mole as different users stumble across different places where we use reflection but haven't yet added a JVM flag, but hopefully we can knock off most of the instances on the first try and only have a few places where we need to take another swing.



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