Closed kgiannakakisATC closed 9 years ago
Did you clean your project before running it ?
mvn clean install kev:run
instead of just
mvn kev:run
I am not sure I've cleaned it. I can't do that now, because I am away from my office. I will do so at the afternoon and let you know.
Cleaning didn't help. The code I am trying is available at:
Yes, you need to use Kevoree v5.2.5 not 5.1.4, I have made many fixes after Tutorial 1 and 2.
This changes the API of the send()
method.
You will have to call it with at least a null
callback:
@Start
public void start() {
Log.info("Sender starts");
timer.send("", null);
}
Thanks, that was the problem. However, for everything to work smoothly, I had to use this code:
timer.send("{\"message\" : \"timer_start\", \"delay\" : 5000}", null);
(Manually creating the json message ThingML components expect)
Yes, it is the component job, so that's the right way to do it. Well you could improve it by creating a POJO for your message and then use a JSON serializer to serialize it to string before send. But manually is alright in a tutorial I guess.
I am trying to send a message through a kevoree port and I am getting the following message. What could be wrong?