paho.mqtt.java
paho.mqtt.java copied to clipboard
llegal reflective access by org.eclipse.paho.client.mqttv3.internal.FileLock
Thanks for the great project.
- [ ] Bug exists Release Version 1.2.4 ( Master Branch)
When I connect to my mqtt broker using Java 11 I get this warning:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.eclipse.paho.client.mqttv3.internal.FileLock (file:/C:/Users/sblantipodi/.m2/repository/org/eclipse/paho/org.eclipse.paho.client.mqttv3/1.2.4/org.eclipse.paho.client.mqttv3-1.2.4.jar) to method sun.nio.ch.FileLockImpl.release()
WARNING: Please consider reporting this to the maintainers of org.eclipse.paho.client.mqttv3.internal.FileLock
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
Thank you
Can confirm this happens on Java 11 on release version 1.2.5.
Yes, now it's gone. I've temporary switched to Zulu JVM 11 on my Windows system because the the HiveMQ CE MQTT broker. But then, it installed it on a Debian 9 VirtualBox VM and changed my Windows default VM (Command %PATH%, %JAVA_HOME%) back to version 8 from Oracle. Now the messages are gone on my Windows system (where i've wrote the Client that uses paho for connecting to the HivqME CE Debian 9 Server)
Maybe the paho developers know ho to suppress that message on JVM 11 usage and can fix it. (?)
@martijintro if you mean that the warnings are gone on Java 8, that is to be expected--that version of java does not print these warnings, even without supressing the messages.
thank you very much!!
If you need more informations, so please don't hesitate to ask for. Thanks.
With best regards, Jan
Same with openjdk version "13" 2019-09-17
@Paho Developers: So still unfixed? Then fix it please...
That's all i have to say.
Same for me on Java 11.0.9.1 (Corretto) and Java 11.0.9 (Adopt OpenJ9) using version 1.2.5 of this package.
Same for me also using JDK 11.0.9.1 and paho client 1.2.5
Same problem here (GraalVM)
java -version
openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment GraalVM CE 21.0.0.2 (build 11.0.10+8-jvmci-21.0-b06)
OpenJDK 64-Bit Server VM GraalVM CE 21.0.0.2 (build 11.0.10+8-jvmci-21.0-b06, mixed mode, sharing)
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.eclipse.paho.client.mqttv3.internal.FileLock (file:/home/cam/.gradle/caches/modules-2/files-2.1/org.eclipse.paho/org.eclipse.paho.client.mqttv3/1.2.5/1546cfc794449c39ad569853843a930104fdc297/org.eclipse.paho.client.mqttv3-1.2.5.jar) to method sun.nio.ch.FileLockImpl.release()
WARNING: Please consider reporting this to the maintainers of org.eclipse.paho.client.mqttv3.internal.FileLock
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
This seems to be a duplicate von issue #507. See my comment on this topic at #507 to circumvent this problem.
OK thx
I use MemoryPersistence and this WARNING is gone
String uri = "tcp://"+ConfigSubscriberMQTT.getSubscriberMqttAddress()+":"+ConfigSubscriberMQTT.getSubscriberMqttPort();
String clientID = UUID.randomUUID().toString();
MemoryPersistence persistence = new MemoryPersistence();
this.subscriber = new MqttClient(uri, clientID, persistence);