eclipse-paho / eclipse-paho/paho.mqtt.java
jmeclient Build Issues
- Dominant language
- Java
- Stars
- 2.3k
- Forks
- 919
- PR merge metrics
- No merged PRs in 30d
Description
Please fill out the form below before submitting, thank you!
- [ X ] Bug exists Release Version 1.2.0 ( Master Branch)
- [ Is also 4 years old so probably has the same issues ] Bug exists in Snapshot Version 1.2.1-SNAPSHOT (Develop Branch)
If this is a bug regarding the Android Service, please raise the bug here instead: https://github.com/eclipse/paho.mqtt.android/issues/new
Using ant as per the readme.md file, the compile fails with the following error:
```
[javac] C:\Users\Nathan\Documents\GitHub\paho.mqtt.java\org.eclipse.paho.jmeclient\org.eclipse.paho.jmeclient.mqttv3\target\work\src\java\org\eclipse\paho\client\mqttv3\MqttAsyncClient.java:568: error: multi-catch statement is not supported in -source 1.4
[javac] } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) {
```
Adding that file to exclude and manually fixing it then compiling again then fails on the following:
```
[javac] C:\Users\Nathan\Documents\GitHub\paho.mqtt.java\org.eclipse.paho.jmeclient\org.eclipse.paho.jmeclient.mqttv3\target\work\src\java\org\eclipse\paho\client\mqttv3\MqttClient.java:26: error: cannot find symbol
[javac] import org.eclipse.paho.client.mqttv3.persist.MqttDefaultFilePersistence;
```
MqttDefaultFilePersistence is in the build exclude list, however the jmeclient src folder has a MqttDefaultMicroFilePersistence, so I've added MqttClient.java to the exclude list and changed the line.
Same issue with SSLNetworkModule in MqttAsyncClient, changed to SSLMicroNetworkModule.
Same issue with security.SSLSocketFactoryFactory in MqttAsyncClient, replaced with MqttMicroNetworkFactory, since the jmeclient folder doesn't have a security folder.
MqttDefaultFilePersistence in MqttAsyncClient changed to MqttDefaultMicroFilePersistence.
internal.websocket.WebSocketSecureNetworkModule, changed references to SSLNetworkModule to SSLMicroNetworkModule.
And this is where my ability to easily try to fix the problem ends, MqttMicroNetworkFactory is trying to extend IMqttNetworkFactory, which is a class that doesn't appera to exist in the build.
Long story short, I believe a while ago you decided to drop support for java 1.4, as Java ME SDK 3.2 uses this the jmeclient offered doesn't work. I'm about to look back though revision history to find the last working version because I need a MQTT client for a Java ME project but you should consider ether removing the folder or adding to the README.md file that the JavaME client isn't supported in the current build.
Edit: Additional, unless I'm missing something, IMqttNetworkFactory has never existed in repo, I tried rolling back to somewhere around when the JavaME build was added and it still gave me the same sort of errors including a missing IMqttNetworkFactory, so I'm not sure it's ever worked.
Contributor guide
Assessment
This issue has not been assessed yet.