ERROR [JammerManager] Interrupted: com.termalabs.server.cache.UncorrectedCurrentStateTableException: Unable to read CurrentState table after correcting data.
search cancel

ERROR [JammerManager] Interrupted: com.termalabs.server.cache.UncorrectedCurrentStateTableException: Unable to read CurrentState table after correcting data.

book

Article ID: 239701

calendar_today

Updated On:

Products

Automation Analytics & Intelligence

Issue/Introduction

Error seen in jaws.log after restarting AAI.

2022-04-17 05:19:36,187 INFO  [JammerManager] Started to run JammerManager sequence
2022-04-17 05:19:36,188 INFO  [JammerManager] Jammer for APPLICATION_LANDSCAPE not implemented
2022-04-17 05:19:36,193 INFO  [CurrentStateVendorImpl] Initializing Current State cache.
2022-04-17 05:19:39,540 WARN  [CurrentStateVendorImpl] Invalid data found in CurrentState table.  Will attempt fixup.
2022-04-17 05:20:15,056 INFO  [JawsDbIntegrityUtil] Successfully committed RecentStateType table fixes
2022-04-17 05:20:18,378 ERROR [JammerManager] Interrupted: com.termalabs.server.cache.UncorrectedCurrentStateTableException: Unable to read CurrentState table after correcting data.
 at com.termalabs.server.cache.CurrentStateVendorImpl.repairCurrentStates(CurrentStateVendorImpl.java:364)
 at com.termalabs.server.cache.CurrentStateVendorImpl.initializeAllCurrentStates(CurrentStateVendorImpl.java:334)
 at com.termalabs.server.system.JammerManager.doFirstTimeProcessing(JammerManager.java:401)
 at com.termalabs.server.system.JammerManager.run2(JammerManager.java:308)
 at com.termalabs.server.system.JammerManager.run(JammerManager.java:238)
 at com.termalabs.server.system.ApplicationControllerService$2.run(ApplicationControllerService.java:268)
 at java.util.TimerThread.mainLoop(Timer.java:555)
 at java.util.TimerThread.run(Timer.java:505)
Caused by: com.termalabs.common.datastore.DataAccessException: Error while executing query: "from CurrentState cs left join fetch cs.mostRecentRun left join fetch cs.mostRecentRun.parent"
 at com.termalabs.common.connection.hibernate.RichQueryCommon.executeAndTime(RichQueryCommon.java:1047)
 at com.termalabs.common.connection.hibernate.RichQueryCommon.list(RichQueryCommon.java:969)
 at com.termalabs.server.hibernate.RichQuery$CollectionQuery.asSetUnfiltered(RichQuery.java:175)
 at com.termalabs.server.hibernate.RichQuery$CollectionQuery.asSet(RichQuery.java:155)
 at com.termalabs.server.hibernate.jaws.HibernateCurrentStateData.getAllCurrentStates(HibernateCurrentStateData.java:81)
 at com.termalabs.server.cache.CurrentStateVendorImpl.getAllCurrentStates(CurrentStateVendorImpl.java:372)
 ... 7 in common
Caused by: org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.termalabs.common.hibernate.jaws.JobRun#UUID[AXT9mdImB3o=]]

Environment

Release : 6.4.2-1

Component : AUTOMIC AUTOMATION INTELLIGENCE ENGINE

Cause

This can be caused by any abrupt interruption in the database connection while AAI is processing data.

Resolution

1. Stop the AAI service.

 

2. Run the select query below:

--References to missing parent job runs

select s.schedulerName, count(*) from JobRun jr, JobScheduler s where jr.parentJobRunId not in (select jobRunId from JobRun) and jr.jobSchedulerId = s.jobSchedulerId group by s.schedulerName

 

3. If the query above returns any value other then 0, please run the update statement below:

 

-- Resolution

update JobRun

set parentJobRunId = null

where parentJobRunId not in (select jobRunId from JobRun);

 

4. With an Oracle database, please make sure to commit the changes by running:

COMMIT; 

 

5. Start up the AAI service. 

Additional Information

There are also some other queries that can be run to check for AAI database inconsistencies that may be  needed depending on the error, see  AAI Database Inconsistency Queries.