AAI jammer fails for a scheduler with the errors below:
WARN [RunCycle] Jammer failed for scheduler: <schedulerName>
com.termalabs.server.cache.RunCacheNotInitializedException: Could not initialize run cache.
Caused by: com.termalabs.common.datastore.DataAccessException: Error while executing query: "from JobRun jr left join fetch jr.predecessors where jr.scheduler.id = :schedulerId and jr.startTimeValue >= :fromTime"; schedulerId=UUID[xxxxx], fromTime=2025/04/24 07:58:46.000 CDT
at com.termalabs.common.connection.hibernate.RichQueryCommon.executeAndTime(RichQueryCommon.java:1052) ~[jaws-common-connection-24.0.0-1.jar:?]
at com.termalabs.common.connection.hibernate.RichQueryCommon.list(RichQueryCommon.java:974) ~[jaws-common-connection-24.0.0-1.jar:?]
at com.termalabs.server.hibernate.RichQuery$CollectionQuery.asSetUnfiltered(RichQuery.java:176) ~[jaws-server-base-24.0.0-1.jar:?]
at com.termalabs.server.hibernate.RichQuery$CollectionQuery.asSet(RichQuery.java:156) ~[jaws-server-base-24.0.0-1.jar:?]
at com.termalabs.server.hibernate.jaws.HibernateJobRunData.getMostRecentRunsIncludingFutureRuns(HibernateJobRunData.java:736) ~[jaws-server-base-24.0.0-1.jar:?]
at com.termalabs.server.ca7.CA7RunCache$CacheData.initializeFromDB(CA7RunCache.java:874) ~[jaws-server-base-24.0.0-1.jar:?]
at com.termalabs.server.ca7.CA7RunCache$CacheData.access$1800(CA7RunCache.java:739) ~[jaws-server-base-24.0.0-1.jar:?]
at com.termalabs.server.ca7.CA7RunCache.initializeActualsCache(CA7RunCache.java:702) ~[jaws-server-base-24.0.0-1.jar:?]
... 17 more
Caused by: org.hibernate.FetchNotFoundException: Entity `com.termalabs.common.hibernate.jaws.JobRun` with identifier value `UUID[xxxxxx=]` does not exist
AAI
CA7 Scheduler
This can be caused by an abrupt shutdown of AAI while Database Maintenance is pruning data, and the delete queries not fully completed by the time he AAI process is fully stopped.
Please run the AAI Database Remediation Script
If you want to run the individual query to address this specific error, you can login to the AAI database and run the following:
delete from JobRun_PredJobRun
where predJobRunId not in (select jobRunId from JobRun);
commit;