Skip to main content
1-Visitor
August 8, 2017
Solved

Unable to read thing / invisible things

  • August 8, 2017
  • 2 replies
  • 2299 views

Hey,

I made a service which will create new instances of a template with all you have to do (create via EntityServices, enable, restart). My script had an error (instead use Things[Name].RestartThing() I wrote Things[Name].Restart() which doesn't work).

I testet this scribt (before I saw the error) and it show me the error. I replace Restart() with RestartThing() and the script works fine.

Now I will export my project but I get an error "Unable to read thing : heiss : null" (heiss is the name of the thing I just create with by testing before i saw the error). The thing is not visible in the list of things but it's exists somewhere.

I tried to delete the thing via EntityServices -> DeleteThing but its will not work.

Logs in Application Log by trying to delete the thing:

ErrorCode(36d55fde-4526-4101-8492-5bed98d5a095), Cause(null), Reason(Access was attempted on a null reference variable.), Possible Resolutions(Remove the reference to the null variable within your extension code.)

[context: com.thingworx.webservices.context.HttpExecutionContext@16e28516][message: Unable to Invoke Service DeleteThing on EntityServices : null]

I think that the thing is somewhere registered but where? And how can I delete it?

Best answer by drichter

Hi Sushant,

a colleague helps me, so that I can not test your way. But thanks


The colleague made a new service which call the EntityServices --> DeleteThing and this works (strange O.o).

2 replies

5-Regular Member
August 8, 2017

Hi David, i am not sure but this sort of sound like you now have a GhostEntity. To confirm this you could use the Ghost Entity extension from the ThingWorx IoT Marketplace

It'll add a resource and from that you can use the GetGhostEntities service. Note while executing this service if you are not enabling the deleteGhosts then this should list all the GhostEntities from the system

drichter1-VisitorAuthorAnswer
1-Visitor
August 8, 2017

Hi Sushant,

a colleague helps me, so that I can not test your way. But thanks


The colleague made a new service which call the EntityServices --> DeleteThing and this works (strange O.o).