Dale LaBossiere created EDGENT-400:
--------------------------------------

             Summary: IotProvider stopApp, startApp fails due to control beans 
already registered
                 Key: EDGENT-400
                 URL: https://issues.apache.org/jira/browse/EDGENT-400
             Project: Edgent
          Issue Type: Bug
          Components: Providers
            Reporter: Dale LaBossiere


Encountered the problem with a topology using poll() and a stream alias, hence 
a PeriodMXBean was registered.  A stop cmd (JobMXBean.stateChange(CLOSE)) 
leaves the control registered.  A subsequent start cmd 
(ApplicationServiceMXBean.submit()) fails because the control is already 
registered.

{code}
top.poll(...).alias("sensorPollStream").print();
{code}

A start cmd after stopping the app yields:
{code}
SEVERE: Control id: stream:sensorPollStream already exists
Mar 22, 2017 3:03:24 PM org.apache.edgent.runtime.etiao.Executable invokeAction
SEVERE: Exception caught while invoking action: {}
java.util.concurrent.ExecutionException: java.lang.IllegalStateException
  ...
Caused by: java.lang.IllegalStateException
  at 
org.apache.edgent.runtime.jsoncontrol.JsonControlService.registerControl(JsonControlService.java:123)
  at org.apache.edgent.oplet.core.PeriodicSource.start(PeriodicSource.java:57)
  at org.apache.edgent.runtime.etiao.Invocation.start(Invocation.java:189)
  ...
{code}

I'll attach a workaround that a topology builder can utilize that mostly seems 
to work.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to