You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by nbhc <yu...@hotmail.com> on 2018/02/14 19:10:34 UTC

ActiveMQ and Java 9

Does ActiveMQ work with Java 9? I tried v5.15.2 and JDK9.0.4, activemq fails
to start with exception like below:

java.io.IOException: java.lang.IllegalAccessException: class
org.iq80.leveldb.util.ByteBufferSupport cannot access class
jdk.internal.ref.Cleaner (in module java.base) because module java.base does
not export jdk.internal.ref to unnamed module 

I checked Java 9 doc, and found that most internal APIs (from Java 8 &
earlier) will be encapsulated in Java 9 and inaccessible by default (based
on JEP 260), so these internal APIs, which are mostly sun.* APIs, will NOT
be supported any more, and should not be used. 

But activemq.jar uses one of the internal APIs, sun.misc.Cleaner, which is
not supported in Java 9. 

Anyone knows if ActiveMQ supports Java 9 or any workaround for above issue?



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: ActiveMQ and Java 9

Posted by Timothy Bish <ta...@gmail.com>.
On 02/14/2018 02:10 PM, nbhc wrote:
> Does ActiveMQ work with Java 9? I tried v5.15.2 and JDK9.0.4, activemq fails
> to start with exception like below:
>
> java.io.IOException: java.lang.IllegalAccessException: class
> org.iq80.leveldb.util.ByteBufferSupport cannot access class
> jdk.internal.ref.Cleaner (in module java.base) because module java.base does
> not export jdk.internal.ref to unnamed module
>
> I checked Java 9 doc, and found that most internal APIs (from Java 8 &
> earlier) will be encapsulated in Java 9 and inaccessible by default (based
> on JEP 260), so these internal APIs, which are mostly sun.* APIs, will NOT
> be supported any more, and should not be used.
>
> But activemq.jar uses one of the internal APIs, sun.misc.Cleaner, which is
> not supported in Java 9.
>
> Anyone knows if ActiveMQ supports Java 9 or any workaround for above issue?
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>
LevelDB is deprecated and you should switch to the default KahaDB store 
and see if that works instead.

-- 
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/


Re: ActiveMQ and Java 9

Posted by Tim Bain <tb...@alumni.duke.edu>.
I submitted https://issues.apache.org/jira/browse/AMQ-6864 in November to
propose that we add default compiler flags to enable ActiveMQ 5.x to work
out of the box with Java 9. To date there's been no activity on it.
However, my understanding is that enabling access to those internal APIs is
simply a matter of setting the right flags on the JVM when it starts, so
you'd probably just need to tweak the start scripts as you found additional
internal classes we're using, so it's something you could do yourself if
you were interested. If you do, it would be great if you add a comment to
that issue noting which flags were necessary.

But as Tim said, LevelDB is deprecated due to lack of developer interest in
supporting it, so you should only continue using it if you're prepared to
do your own troubleshooting and fixes, without any support from this
mailing list. So using KahaDB instead may kill two birds with one stone.

Also, I hope you mean that your company wants you running on Java 9, not
Java 10, within the next months, since the Java 10 beta just came out. And
ActiveMQ 5.x is not EOL and there's no plan for it to be (that I'm aware
of), though that's not to discourage you from using Artemis instead.

Tim

On Wed, Feb 14, 2018 at 1:58 PM, Oliver B. Fischer <o.b.fischer@swe-blog.net
> wrote:

> There are some companies as my one who don't want to run software which is
> EOL. Therefore we must run Artemis within the next months with Java 10.
>
>
> Am 14.02.18 um 21:05 schrieb Justin Bertram:
>
> Out of curiosity, is there a particular reason you want to use Java 9?
>>
>>
>> Justin
>>
>> On Wed, Feb 14, 2018 at 1:10 PM, nbhc <yu...@hotmail.com> wrote:
>>
>> Does ActiveMQ work with Java 9? I tried v5.15.2 and JDK9.0.4, activemq
>>> fails
>>> to start with exception like below:
>>>
>>> java.io.IOException: java.lang.IllegalAccessException: class
>>> org.iq80.leveldb.util.ByteBufferSupport cannot access class
>>> jdk.internal.ref.Cleaner (in module java.base) because module java.base
>>> does
>>> not export jdk.internal.ref to unnamed module
>>>
>>> I checked Java 9 doc, and found that most internal APIs (from Java 8 &
>>> earlier) will be encapsulated in Java 9 and inaccessible by default
>>> (based
>>> on JEP 260), so these internal APIs, which are mostly sun.* APIs, will
>>> NOT
>>> be supported any more, and should not be used.
>>>
>>> But activemq.jar uses one of the internal APIs, sun.misc.Cleaner, which
>>> is
>>> not supported in Java 9.
>>>
>>> Anyone knows if ActiveMQ supports Java 9 or any workaround for above
>>> issue?
>>>
>>>
>>>
>>> --
>>> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-
>>> f2341805.html
>>>
>>>
> --
> N Oliver B. Fischer
> A Schönhauser Allee 64, 10437 Berlin, Deutschland/Germany
> P +49 30 44793251
> M +49 178 7903538
> E o.b.fischer@swe-blog.net
> S oliver.b.fischer
> J oliver.b.fischer@jabber.org
> X http://xing.to/obf
>
>

Re: ActiveMQ and Java 9

Posted by "Oliver B. Fischer" <o....@swe-blog.net>.
There are some companies as my one who don't want to run software which 
is EOL. Therefore we must run Artemis within the next months with Java 10.


Am 14.02.18 um 21:05 schrieb Justin Bertram:
> Out of curiosity, is there a particular reason you want to use Java 9?
>
>
> Justin
>
> On Wed, Feb 14, 2018 at 1:10 PM, nbhc <yu...@hotmail.com> wrote:
>
>> Does ActiveMQ work with Java 9? I tried v5.15.2 and JDK9.0.4, activemq
>> fails
>> to start with exception like below:
>>
>> java.io.IOException: java.lang.IllegalAccessException: class
>> org.iq80.leveldb.util.ByteBufferSupport cannot access class
>> jdk.internal.ref.Cleaner (in module java.base) because module java.base
>> does
>> not export jdk.internal.ref to unnamed module
>>
>> I checked Java 9 doc, and found that most internal APIs (from Java 8 &
>> earlier) will be encapsulated in Java 9 and inaccessible by default (based
>> on JEP 260), so these internal APIs, which are mostly sun.* APIs, will NOT
>> be supported any more, and should not be used.
>>
>> But activemq.jar uses one of the internal APIs, sun.misc.Cleaner, which is
>> not supported in Java 9.
>>
>> Anyone knows if ActiveMQ supports Java 9 or any workaround for above issue?
>>
>>
>>
>> --
>> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-
>> f2341805.html
>>

-- 
N Oliver B. Fischer
A Schönhauser Allee 64, 10437 Berlin, Deutschland/Germany
P +49 30 44793251
M +49 178 7903538
E o.b.fischer@swe-blog.net
S oliver.b.fischer
J oliver.b.fischer@jabber.org
X http://xing.to/obf


Re: ActiveMQ and Java 9

Posted by Justin Bertram <jb...@apache.org>.
Out of curiosity, is there a particular reason you want to use Java 9?


Justin

On Wed, Feb 14, 2018 at 1:10 PM, nbhc <yu...@hotmail.com> wrote:

> Does ActiveMQ work with Java 9? I tried v5.15.2 and JDK9.0.4, activemq
> fails
> to start with exception like below:
>
> java.io.IOException: java.lang.IllegalAccessException: class
> org.iq80.leveldb.util.ByteBufferSupport cannot access class
> jdk.internal.ref.Cleaner (in module java.base) because module java.base
> does
> not export jdk.internal.ref to unnamed module
>
> I checked Java 9 doc, and found that most internal APIs (from Java 8 &
> earlier) will be encapsulated in Java 9 and inaccessible by default (based
> on JEP 260), so these internal APIs, which are mostly sun.* APIs, will NOT
> be supported any more, and should not be used.
>
> But activemq.jar uses one of the internal APIs, sun.misc.Cleaner, which is
> not supported in Java 9.
>
> Anyone knows if ActiveMQ supports Java 9 or any workaround for above issue?
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-
> f2341805.html
>