Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Hello,
I have a simple service to clone an existing thing. I use Resources["EntityServices"].CloneThing and I got the following error:
JavaException: java.lang.Exception: Unable To Convert From org.json.JSONObject to INFOTABLE
When I duplicate the Thing manually in the Composer there is not problem I can duplicate the thing.
Could you please give some advice?
Thanks,
Freddy
Hi,
Can you please check the schema of params?
It should be like the following:
var params = {
name: "clone_target_thing" /* STRING */,
description: "Description of clone" /* STRING */,
sourceThingName: "clone_source_thing" /* THINGNAME */,
tags: [{
"vocabulary" : "Test",
"vocabularyTerm" : "CloneThingSnippet"
}] /* TAGS */
};
Resources["EntityServices"].CloneThing(params);
Hi Charles,
My schema for params is correct, in my case description and Tags are undefined.
Thanks,
Freddy
Hi, Freddy
Could you please send me the full code of your service, both the ApplicationLog.log and ScriptLog.log when you can reproduce the error message?
* The logs are located in <Thingworx Path>\ThingworxStorage\logs
Thanks,
Charles