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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Persisted properties are loaded from time to time

bmitioglov
1-Newbie

Persisted properties are loaded from time to time

Sometimes after tomcat startup I can see that some of my persisted properties were not loaded to thing. After tomcat reboot another things can be with loaded values and those which were with values before start having their properties cleared. I don't understand the logic, maybe I have some problem with persistence provider...

13 REPLIES 13

It's an Infotable baseType property?

No it's just a simple string property marked as persistent.

Then I don't know, sorry.

Those problem properties load their values only after import from source control. Maybe this tell you something.

ytella
17-Peridot
(To:bmitioglov)

Hi Boris Mitioglov,

Could you please provide ThingWorx version, Database type and its version? Also, please share the application.log from ThingworxStorage folder to track the issue.

Hi, Yamini Tella

Thingworx: Thingworx-Platform-H2-8.0.0-b11

App log is in the attachment.

Thanks,

ytella
17-Peridot
(To:bmitioglov)

Thanks for the information. To further troubleshoot this issue, could you please enable the Stack Tracing on the loggingSubsytem:

  • From the composer, select System -> Subsystems -> LoggingSubsystem.
  • Select the configuration page
  • Check (enable) the Enable Stack Tracing option checkbox
  • Click the save button.

Please share the ErrorLog.log file from ThingWorxStorage folder.

Hi Yamini Tella,

Error log is in the attachment.

ytella
17-Peridot
(To:bmitioglov)

From the logs , I have noticed the below error:


Execution error in service script [CarThing1 Event.ThingStart] : Unable to Invoke Service Event.ThingStart on CarThing1 : Execution error in service script [CarThing1 getNHTSACarInformation] : TypeError: Cannot read property "0" from undefined (getNHTSACarInformation#19)

Do you see the issue for just carThing1 or does it happen with other things as well? Is there any service that changes the property values of CarThing1?

All carthings don't load their properties. I think there is a problem with H2 Database. I can see it in the errorLog.

[O: E.c.t.p.h.H2PropertyExceptionTranslator] [I: ] [U: SuperUser] [S: ] [T: TWEventProcessor-2] [message: [1,013] Data store invalid session error: [Error occurred while accessing the property provider.]] org.h2.jdbc.JdbcSQLException: Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL) [90121-192]


getNHTSACarInformation this service use the persisted property value, so I think that's why it produces the error Unable to Invoke Service Event.ThingStart, cause persisted property can not be loaded from DB.

Hi Yamini Tella​,

Do you have some suggestions why can I get the error from previous post?

Thanks,

ytella
17-Peridot
(To:bmitioglov)

Hi Boris Mitioglov,

I am not sure of the root cause of the problem. But I have seen the following error in the log:


Error: Unable to process purgeBetweenNow Request for CarInsuranceCostValueStream : Another request for this thing is active

PurgeBetween is the only method that is called synchronously(only if the immediate parameter is set to true).

Could you please try the following workaround and see if the above error gets resolved?

Workaround: Set immediate to false and poll until there is no history

Sorry I don't understand where to set this parameter?

Top Tags