cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Add Service to FileTransferVirtualThing

psandfort
4-Participant

Add Service to FileTransferVirtualThing

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 1
psandfort
4-Participant
(To:psandfort)

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.

Top Tags