Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illegal Reflective access operation (JDK 9+) #100

Open
carimura opened this issue Jul 17, 2019 · 2 comments
Open

Illegal Reflective access operation (JDK 9+) #100

carimura opened this issue Jul 17, 2019 · 2 comments
Labels
backlog A good idea, but not one we're planning on implementing in the near future bug Something isn't working enhancement New feature or request

Comments

@carimura
Copy link

Hi, thanks for the easy-to-use client!

The following warnings show up in JDK 9+:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.hubspot.horizon.shaded.org.jboss.netty.util.internal.ByteBufferUtil (file:/usr/share/jimage/jimage.jar) to method java.nio.DirectByteBuffer.cleaner()
WARNING: Please consider reporting this to the maintainers of com.hubspot.horizon.shaded.org.jboss.netty.util.internal.ByteBufferUtil
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

Running with --illegal-access=debug results in:

WARNING: Illegal reflective access by com.hubspot.horizon.shaded.org.jboss.netty.util.internal.ByteBufferUtil (file:/usr/share/jimage/jimage.jar) to method java.nio.DirectByteBuffer.cleaner()
	at com.hubspot.horizon.shaded.org.jboss.netty.util.internal.ByteBufferUtil.<clinit>(ByteBufferUtil.java:35)
	at com.hubspot.horizon.shaded.org.jboss.netty.channel.socket.nio.SocketReceiveBufferAllocator.newBuffer(SocketReceiveBufferAllocator.java:62)
	at com.hubspot.horizon.shaded.org.jboss.netty.channel.socket.nio.SocketReceiveBufferAllocator.get(SocketReceiveBufferAllocator.java:44)
	at com.hubspot.horizon.shaded.org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:62)
	at com.hubspot.horizon.shaded.org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
	at com.hubspot.horizon.shaded.org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
	at com.hubspot.horizon.shaded.org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
	at com.hubspot.horizon.shaded.org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
	at com.hubspot.horizon.shaded.org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
	at com.hubspot.horizon.shaded.org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:835)

JDK 11 and 12 should still work with warnings, but future releases will change the default runtime mode to deny.

More info here: http://openjdk.java.net/jeps/261#Relaxed-strong-encapsulation

@carimura carimura changed the title Illegal Reflective access operation in JDK 9+ Illegal Reflective access operation (JDK 9+) Jul 17, 2019
@jxbadam
Copy link

jxbadam commented Jul 26, 2019

This problem appears to be due to the jboss netty dependency.

This can be resolved by either removing that dependency, or updating to a later version of said dependency where the dependency maintainers have fixed this issue.

@szabowexler szabowexler added the bug Something isn't working label Jan 8, 2020
@szabowexler
Copy link
Collaborator

Thanks for letting us know. It'll take a bit, but we'll look into upgrading netty to avoid having an incompatibility with future JDKs.

@szabowexler szabowexler added backlog A good idea, but not one we're planning on implementing in the near future enhancement New feature or request labels Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog A good idea, but not one we're planning on implementing in the near future bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants