Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Paho » MQTT Paho Service Java Sample wont compile in Eclipse Helios(MQTT Paho Service Sample - compile problem)
MQTT Paho Service Java Sample wont compile in Eclipse Helios [message #1706686] Fri, 28 August 2015 16:27 Go to next message
Scot Larsen is currently offline Scot LarsenFriend
Messages: 2
Registered: August 2015
Junior Member
I have copied the org.eclipse.paho.mqtt.java source code from GIT. I have downloaded the org.eclipse.paho.client.mqttv3-1.0.2.jar and org.eclipse.paho.android.service-1.0.3-20150826.040819-156.jar files and installed into the imported services.sample project. Everything is clean except I get the error

"The type org.eclipse.paho.client.mqttv3.IMqttMessageListener cannot be resolved. It is indirectly referenced from required .class files"

within the Listener.java class file at the line:

Connections.getInstance(context).getConnection(clientHandle).getClient().subscribe(topic, qos, null, new ActionListener(context, Action.SUBSCRIBE, clientHandle, topics));

within the subscribe() method. This is the only compile error I get.

I have tried everything I can think of (changing JRE/JDK levels, importing JRE Sys Library, clean project, delete and re-import project, and so on) to fix the irresolution.

Has anyone else run into this problem? I would really like to get this going so I can start getting up to speed on MQTT for Android.

Thanks for any help!

Scot
Re: MQTT Paho Service Java Sample wont compile in Eclipse Helios [message #1706921 is a reply to message #1706686] Mon, 31 August 2015 21:08 Go to previous message
Scot Larsen is currently offline Scot LarsenFriend
Messages: 2
Registered: August 2015
Junior Member
Ok... after trying multiple re-downloads of the source, re-compiles, java build path reconstruction, several maven build attempts and direct downloads of compiled jar libraries, I have managed to answer my own question.

The problem is I was originally using downloaded versions of the MQTT client and service jars. I was doing this as the maven build ("mvn clean install") was failing due to https connection issues during the automated tests within maven. downloading and copying the 1.0.2 version of mqttv3.jar and 1.0.3 version of service.jar was resulting in the original .class reference error noted above.

So, I went back to trying to fix the maven compile... except I am not familiar with maven or understand the dependence of the automated tests for the compilation for all the packages. I finally found another thread in this forum that had an alternate maven command for skipping the tests (https://www.eclipse.org/forums/index.php/t/587443/) writeen up by Andy Piper (thanks Andy!).

The command is "mvn package -Dmaven.test.skip=true"

This built all the necessary packages and jar files in the master branch needed for the service.sample code to compile and run.

Hopefully this saves someone else a couple of wasted days!

regards, Scot

[Updated on: Mon, 31 August 2015 21:09]

Report message to a moderator

Previous Topic:MQTTWS31.js reconnect bug
Next Topic:Android MQTT Service - QoS 1 & Clean Session false strange behavior & reconnect behavior
Goto Forum:
  


Current Time: Fri Apr 26 05:24:45 GMT 2024

Powered by FUDForum. Page generated in 0.03103 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top