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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Thing Not Running - Thing is unable to start

DigitalFactory
4-Participant

Thing Not Running - Thing is unable to start

We generated a thing based on a thing template inside the PTC Thingworx Composer.
The Thing Template we used was important from another thingworx instance whitch was running version 8.4. 
The Thingworx instance which giving us the error message is version 8.5.


However if want to connect the Thing to Thingworx Flow or want to change the things attributes with via a subscription, we can the following error message:

Thing [DF_Compressor_01] is not running

or

Attempt To Write Property [temperature] Failed - Thing Not Running

 

Application log: 
2020-06-08 14:39:49.062+0200 [L: ERROR] [O: E.c.q.l.c.Logger] [I: ] [U: Administrator] [S: ] [P: ] [T: http-nio-8080-exec-2] Unable to start thing DF_Compressor_01, java.lang.Long cannot be cast to java.lang.Double
2020-06-08 14:57:35.867+0200 [L: ERROR] [O: E.c.q.l.c.Logger] [I: ] [U: Administrator] [S: ] [P: ] [T: http-nio-8080-exec-2] Unable to start thing DF_Compressor_01, java.lang.Long cannot be cast to java.lang.Double
2020-06-08 14:57:35.902+0200 [L: ERROR] [O: E.c.q.l.c.Logger] [I: DF_Compressor_01] [U: Administrator] [S: ] [P: ] [T: TWEventProcessor-4] Attempt To Write Property [temperature] Failed - Thing Not Running
2020-06-08 14:57:35.902+0200 [L: ERROR] [O: E.c.q.l.c.Logger] [I: DF_Compressor_01] [U: Administrator] [S: ] [P: ] [T: TWEventProcessor-4] Attempt To Write Property [pressure] Failed - Thing Not Running
2020-06-08 14:57:35.902+0200 [L: ERROR] [O: E.c.q.l.c.Logger] [I: DF_Compressor_01] [U: Administrator] [S: ] [P: ] [T: TWEventProcessor-4] Attempt To Write Property [error] Failed - Thing Not Running

Error Log: 
2020-06-08 14:58:48.613+0200 [L: ERROR] [O: c.t.t.Thing] [I: ] [U: Administrator] [S: ] [P: ] [T: http-nio-8080-exec-5] Unable to start thing DF_Compressor_01, java.lang.Long cannot be cast to java.lang.Double
2020-06-08 14:58:48.662+0200 [L: ERROR] [O: c.t.t.Thing] [I: DF_Compressor_01] [U: Administrator] [S: ] [P: ] [T: TWEventProcessor-4] Attempt To Write Property [temperature] Failed - Thing Not Running
2020-06-08 14:58:48.662+0200 [L: ERROR] [O: c.t.t.Thing] [I: DF_Compressor_01] [U: Administrator] [S: ] [P: ] [T: TWEventProcessor-4] Attempt To Write Property [pressure] Failed - Thing Not Running
2020-06-08 14:58:48.662+0200 [L: ERROR] [O: c.t.t.Thing] [I: DF_Compressor_01] [U: Administrator] [S: ] [P: ] [T: TWEventProcessor-4] Attempt To Write Property [error] Failed - Thing Not Running
2020-06-08 14:58:53.673+0200 [L: ERROR] [O: c.t.t.Thing] [I: DF_Compressor_01] [U: Administrator] [S: ] [P: ] [T: TWEventProcessor-5] Attempt To Write Property [temperature] Failed - Thing Not Running
2020-06-08 14:58:53.673+0200 [L: ERROR] [O: c.t.t.Thing] [I: DF_Compressor_01] [U: Administrator] [S: ] [P: ] [T: TWEventProcessor-5] Attempt To Write Property [pressure] Failed - Thing Not Running
2020-06-08 14:58:53.673+0200 [L: ERROR] [O: c.t.t.Thing] [I: DF_Compressor_01] [U: Administrator] [S: ] [P: ] [T: TWEventProcessor-5] Attempt To Write Property [error] Failed - Thing Not Running
2020-06-08 14:58:58.285+0200 [L: ERROR] [O: c.t.w.Things] [I: ] [U: Administrator] [S: ] [P: ] [T: http-nio-8080-exec-1] Thing [DF_Compressor_01] is not running
2020-06-08 14:58:58.662+0200 [L: ERROR] [O: c.t.t.Thing] [I: DF_Compressor_01] [U: Administrator] [S: ] [P: ] [T: TWEventProcessor-15] Attempt To Write Property [temperature] Failed - Thing Not Running

I would appreciate your support a lot! 

Kind regards

3 REPLIES 3

Looks like somehow the definition of this Thing/ThingTemplate is 'corrupted'

It looks like maybe it is receiving or evaluating a piece of information that produces an  error and interrupts the start up of the Thing.

If you have any thingstart or other subscription code running, I would put try catches around those to make sure they finish and troubleshoot them properly.

 

Potentially a restart might work if the definition wasn't loaded properly.

Hello @DigitalFactory,

 

I believe that you should investigate this error first, all others are most probably its consequences:

2020-06-08 14:58:48.613+0200 [L: ERROR] [O: c.t.t.Thing] [I: ] [U: Administrator] [S: ] [P: ] [T: http-nio-8080-exec-5] Unable to start thing DF_Compressor_01, java.lang.Long cannot be cast to java.lang.Double

 

Few first questions to ask yourself -- What is the inheritance structure for this thing? Do you have any templates or shapes implemented in extensions in the hierarchy? This may impact the thing lifecycle.

 

Does it have any remote properties, configuration tables, INFOTABLE properties, subscriptions to the lifecycle events (as Pai suggested earlier)?.. Try to looks for NUMBER fields in any of those and see if the error disappears if you replace them with LONG. Then again, we don't have enough information to see where this LONG comes from in the first place, but answering those questions may help you to identify the root cause.

 

I'm seeing such type cast error most frequently in extensions, and/or when trying to initialize INFOTABLE fields with wrong / incompatible value types. Indeed, in Java you can't safely cast Long to Double, so maybe another alternative troubleshooting approach would be to search where you operate with Long / LONG values in your code and start from there...

 

Finally, how do you generate those things? Do you set some properties before starting / enabling them? You probably want to check those too.

 

I hope it gives at least some ideas.

 

Regards,
Constantine

Hi @DigitalFactory.

 

If one of the previous responses help you to find a solution, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.

 

Thank you for participating in our community!

 

Regards.

 

--Sharon

Top Tags