exception while launching my application with JRE9 when it tries to establish a secure socket connection with activemq

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

exception while launching my application with JRE9 when it tries to establish a secure socket connection with activemq

mprakash
Hi,
Getting the below exception when using JRE 9.
Is support for JRE9 available in activemq?

ERROR | Could not set property host on 46cd1b26[SSL_NULL_WITH_NULL_NULL:
Socket[unconnected]]
java.lang.IllegalAccessException: class
org.apache.activemq.util.IntrospectionSupport cannot access class
sun.security.ssl.SSLSocketImpl (in module java.base) because module
java.base does not export sun.security.ssl to unnamed module @5e028a15
        at
java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Unknown
Source)
        at java.base/java.lang.reflect.AccessibleObject.checkAccess(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at
org.apache.activemq.util.IntrospectionSupport.setProperty(IntrospectionSupport.java:175)
        at
org.apache.activemq.util.IntrospectionSupport.setProperties(IntrospectionSupport.java:151)
        at
org.apache.activemq.transport.tcp.SslTransport.<init>(SslTransport.java:72)
        at
org.apache.activemq.transport.tcp.SslTransportFactory.createTransport(SslTransportFactory.java:122)
        at
org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:120)
        at
org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:65)
        at
org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:331)
        at
org.apache.activemq.ActiveMQSslConnectionFactory.createTransport(ActiveMQSslConnectionFactory.java:120)
        at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:346)
        at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:304)
        at
org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:244)

Regards,
Monica



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: exception while launching my application with JRE9 when it tries to establish a secure socket connection with activemq

Tim Bain
Try launching the JRE with a --add-exports option for that class. We need
to get away from the sun.* classes (would you be willing to write a JIRA
bug to request that?), but in the mean time I believe that flag will get
you past the problem.

Tim

On Nov 14, 2017 2:40 AM, "mprakash" <[hidden email]> wrote:

Hi,
Getting the below exception when using JRE 9.
Is support for JRE9 available in activemq?

ERROR | Could not set property host on 46cd1b26[SSL_NULL_WITH_NULL_NULL:
Socket[unconnected]]
java.lang.IllegalAccessException: class
org.apache.activemq.util.IntrospectionSupport cannot access class
sun.security.ssl.SSLSocketImpl (in module java.base) because module
java.base does not export sun.security.ssl to unnamed module @5e028a15
        at
java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Unknown
Source)
        at java.base/java.lang.reflect.AccessibleObject.checkAccess(Unknown
Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at
org.apache.activemq.util.IntrospectionSupport.setProperty(
IntrospectionSupport.java:175)
        at
org.apache.activemq.util.IntrospectionSupport.setProperties(
IntrospectionSupport.java:151)
        at
org.apache.activemq.transport.tcp.SslTransport.<init>(SslTransport.java:72)
        at
org.apache.activemq.transport.tcp.SslTransportFactory.createTransport(
SslTransportFactory.java:122)
        at
org.apache.activemq.transport.TransportFactory.doConnect(
TransportFactory.java:120)
        at
org.apache.activemq.transport.TransportFactory.connect(
TransportFactory.java:65)
        at
org.apache.activemq.ActiveMQConnectionFactory.createTransport(
ActiveMQConnectionFactory.java:331)
        at
org.apache.activemq.ActiveMQSslConnectionFactory.createTransport(
ActiveMQSslConnectionFactory.java:120)
        at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(
ActiveMQConnectionFactory.java:346)
        at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(
ActiveMQConnectionFactory.java:304)
        at
org.apache.activemq.ActiveMQConnectionFactory.createConnection(
ActiveMQConnectionFactory.java:244)

Regards,
Monica



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: exception while launching my application with JRE9 when it tries to establish a secure socket connection with activemq

mprakash
Hi Tim,

Thank you for your respone.
Can you please raise a Jira as I dont have access to it.
And also please let me know when will the support be available, as we have a
release of our software planned with JRE 9 support and using --add-exports
option may not be permissible.
Please let me know the exact date of when will the JAVA 9 supported activemq
jar will be available.

Regards,
Monica



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: exception while launching my application with JRE9 when it tries to establish a secure socket connection with activemq

Tim Bain
I've submitted https://issues.apache.org/jira/browse/AMQ-6864 to capture
this.

However, the fix on our end that I advocated in that JIRA issue will be to
specify a JVM argument such as --add-exports in our start scripts, so if
your security team is going to have a problem with that approach, they're
going to have a problem with our fix too unless some other implementation
is found. If that's a risk, I'd suggest you get familiar with the options
if you're not already, and then start educating the security people now so
that they understand how Java 9 works by the time you need their approval.
The further out in front of this question (or any security-related
question, for that matter), the better your odds of an outcome you're happy
with.

Also, what version of ActiveMQ are you using, so I can mark that in the
JIRA issue?

Tim

On Wed, Nov 15, 2017 at 9:34 PM, mprakash <[hidden email]> wrote:

> Hi Tim,
>
> Thank you for your respone.
> Can you please raise a Jira as I dont have access to it.
> And also please let me know when will the support be available, as we have
> a
> release of our software planned with JRE 9 support and using --add-exports
> option may not be permissible.
> Please let me know the exact date of when will the JAVA 9 supported
> activemq
> jar will be available.
>
> Regards,
> Monica
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-
> f2341805.html
>