edgent-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Susan Cline <home4...@pacbell.net>
Subject Re: Trying register an application via the registerJar command
Date Fri, 16 Sep 2016 21:44:49 GMT
Thanks Dale.  It did not work however, the results are the same after removing the 3 lines
before provider.start().
When I submit the SpeedJarApp I can see this in the pi terminal (this is the full output from
when I started the registerJarExample application to when I submitted the command):

pi@raspberrypi:~/devConf $ java -jar registerJarExample.jar speed_sensor_config1.txt
Sep 16, 2016 9:39:08 PM org.apache.edgent.runtime.appservice.AppService registerTopology
INFO: Register application name: edgentIotDevicePubSub
Sep 16, 2016 9:39:08 PM org.apache.edgent.runtime.appservice.AppService registerTopology
INFO: Register application name: edgentIotCommandsToControl
Sep 16, 2016 9:39:08 PM org.apache.edgent.runtime.appservice.AppService registerTopology
INFO: Register application name: edgentJobMonitorApp
false
Sep 16, 2016 9:39:09 PM pi.RegisterJarExample main
INFO: Here is some info
Sep 16, 2016 9:39:09 PM com.ibm.iotf.client.AbstractClient createClient
INFO: pool-1-thread-22-edgentIotDevicePubSub: Org ID    = ni6dcf
         Client ID    = d:ni6dcf:SpeedSensor:Pi3_SpeedSensor_1
Sep 16, 2016 9:39:09 PM com.ibm.iotf.client.AbstractClient connect
INFO: pool-1-thread-22-edgentIotDevicePubSub: Connecting client d:ni6dcf:SpeedSensor:Pi3_SpeedSensor_1
to ssl://ni6dcf.messaging.internetofthings.ibmcloud.com:8883 (attempt #1)...
Sep 16, 2016 9:39:10 PM com.ibm.iotf.client.AbstractClient connect
INFO: pool-1-thread-22-edgentIotDevicePubSub: Successfully connected to the IBM Watson IoT
Platform
Sep 16, 2016 9:39:49 PM org.apache.edgent.runtime.appservice.AppService registerJar
INFO: Register jar: file:///home/pi/devConf/pi.sensors.jar
Sep 16, 2016 9:39:49 PM org.apache.edgent.runtime.appservice.AppService registerJar
INFO: about to call registerTopology
Sep 16, 2016 9:39:49 PM org.apache.edgent.runtime.appservice.AppService registerTopology
INFO: Register application name: SpeedJarApp
SpeedJarApp
Sep 16, 2016 9:40:11 PM org.apache.edgent.runtime.etiao.Executable$1 accept
INFO: No more active user tasks

Thanks,

Susan



> On Sep 16, 2016, at 10:32 AM, Dale LaBossiere <dml.apache@gmail.com> wrote:
> 
> I haven’t digested the complete email message yet, but try removing those three lines
before provider.start() and try again.
> IotProvider already create/registers those services (described in its javadoc).  I guess
I wouldn’t be surprised if these extra additions might much things up.
> 
> — Dale
> 
>> On Sep 16, 2016, at 1:17 PM, Susan Cline <home4slc@pacbell.net> wrote:
>> 
>> I’ve gotten a step further, but I am still having problems.
>> ...
>> 
>> public class RegisterJarExample {
>> 		IotProvider provider = new IotProvider(topology -> new IotpDevice(topology,
configFile));
>> 		/*
>> 		 * Not sure if I need the next few lines or not ...
>> 		 */
>> 		JsonControlService control = new JsonControlService();
>> 		provider.getServices().addService(ControlService.class, control); 
>> 		ApplicationService appService = AppService.createAndRegister(provider, provider);
>> 		provider.start();
>> 		
>> 		logger.info("Here is some info");
>> 	}
>> 	
>> }
> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message