Open jpwsutton opened 6 years ago
Is JME MIDP or Java ME still a requirement?? Or maybe you could create a "legacy" branch ?
+1, just migrated to Java 11 and I get the warnings
+1 Same warning here, Java 11 on MacOS
+1 same here Java 11 on ubuntu 18.04
+1 same here as well Java 11 on ubuntu 18.04
@fruwolt @panilov7 I will look into this after next service release 1.2.3 (target release date 4/10/2020).
@rdasgupt is this targeted for 1.2.5?
@avierr We plan to add this in 1.2.5. The target release date is not worked out yet. We are planning to have a release with MQTTv5 support (which is pending for more than a year) before start planning for 1.2.5 (MQTTv3 service release).
I'm afraid this hasn't been fixed in 1.2.5.
Just tried with bumped up version of Maven dependency and the issue persists:
WARNING: Illegal reflective access by org.eclipse.paho.client.mqttv3.internal.FileLock (.../1.2.5/1546cfc794449c39ad569853843a930104fdc297/org.eclipse.paho.client.mqttv3-1.2.5.jar) to method sun.nio.ch.FileLockImpl.release()
I had the same problem and thus finally investigated the matter. The problem arises from the module system in Java 9 and higher where such access is discouraged (however still permitted). Until this problem is fixed in paho.mqtt.java you can explicitely allow such accesses by using a cmd line argument when running the java program. You just have to add the following option:
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
This does not only cause the message go away but it also allows explitly the desired access. (See also https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-7BB28E4D-99B3-4078-BDC4-FC24180CE82B)
same here, on MQTT V5 Jdk 13.01 on win10 pro x64
Still happening with org.eclipse.paho.client.mqttv3 v 1.2.5 and JDK 9: java version "9.0.1" Java(TM) SE Runtime Environment (build 9.0.1+11) Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
Still same problem. Is there any update on this issue ?
Please fill out the form below before submitting, thank you!
When compiling and testing against a Java 9 JVM, the following warning is logged:
This is refering to the fact that FileLock.java uses reflection to check if the
java.nio.channels.FileLock
API is available, before then calling it.The reason that this was written this way was to maintain support with JME MIDP which did not have the FileLock API available at the time. It would be worth doing some investigation to see whether this API is available in the latest versions of Java ME 8. If it is, then we can clean this class up considerably!