Skip to main content
1-Visitor
April 19, 2018
Question

Add Service to FileTransferVirtualThing

  • April 19, 2018
  • 1 reply
  • 1377 views

I have a VIrtualThing with a remote service defined and working perfectly. I would now like to add support for file transfer to this VirtualThing and so changed it to extend FileTransferVirtualThing instead of VirtualThing. I am able to compile and run but the initializeFromAnnotations() fails with an exception: 

ERROR c.t.c.client.things.VirtualThing - Service already defined: <remote service name>

I had to add exception handling around thing creating when I changed base classes. Is it possible you can't add remote services to a FileTransferVirtualThing?

 

Thanks for any insights or ideas on how to debug this!

Pat

 

 

 

 

    1 reply

    psandfort1-VisitorAuthor
    1-Visitor
    April 19, 2018

    I determined from empirical testing that the FileTransferVirtualThing class is internally calling initializeFromAnnotations() while the VirtualThing class does not. My code was also calling initializeFromAnnotations() so that is where the duplication occurs.