2020-07-05 18:28:33,506 ERROR [SystemCheckDataBuilder] could not get license information.: com.termalabs.common.datastore.DataAccessException: Error while executing query: "from JawsJob job left join fetch job.conditions"
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.asListUnfiltered(RichQuery.java:202)
at com.termalabs.server.hibernate.RichQuery$CollectionQuery.asList(RichQuery.java:135)
at com.termalabs.server.hibernate.jaws.HibernateJawsJobData.primeJobsAndConditions(HibernateJawsJobData.java:263)
at com.termalabs.server.cache.SchedulerDependentMapsCache.primeHibernateCache(SchedulerDependentMapsCache.java:256)
at com.termalabs.server.cache.SchedulerDependentMapsCache.initializeSchedulerMapAndDependentMaps(SchedulerDependentMapsCache.java:141)
at com.termalabs.server.cache.SchedulerDependentMapsCache.initializeSchedulerMapIfNecessary(SchedulerDependentMapsCache.java:127)
at com.termalabs.server.cache.SchedulerDependentMapsCache.getSchedulers(SchedulerDependentMapsCache.java:120)
at com.termalabs.server.cache.SchedulerVendorImpl.getSchedulers(SchedulerVendorImpl.java:337)
at com.termalabs.server.cache.LicenseVendorImpl.getInstanceCounts(LicenseVendorImpl.java:313)
at com.termalabs.server.cache.LicenseVendorImpl.getCurrentLicenseInfo(LicenseVendorImpl.java:282)
at com.termalabs.server.cache.LicenseVendorImpl.getCurrentLicenseInfo(LicenseVendorImpl.java:266)
at com.termalabs.server.scheduler.common.SystemCheckDataBuilder.build(SystemCheckDataBuilder.java:82)
at com.termalabs.server.scheduler.common.SystemCheckDataBuilder.build(SystemCheckDataBuilder.java:69)
at com.termalabs.server.system.ApplicationAlertCreator.loop(ApplicationAlertCreator.java:183)
at com.termalabs.server.system.ApplicationAlertCreator$1.run(ApplicationAlertCreator.java:158)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
2020-07-05 21:04:20,442 ERROR [JammerManager] Interrupted: com.termalabs.common.datastore.DataAccessException: Error while executing query: "from JawsJob job left join fetch job.conditions"
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.asListUnfiltered(RichQuery.java:202)
at com.termalabs.server.hibernate.RichQuery$CollectionQuery.asList(RichQuery.java:135)
at com.termalabs.server.hibernate.jaws.HibernateJawsJobData.primeJobsAndConditions(HibernateJawsJobData.java:263)
at com.termalabs.server.cache.SchedulerDependentMapsCache.primeHibernateCache(SchedulerDependentMapsCache.java:256)
at com.termalabs.server.cache.SchedulerDependentMapsCache.initializeSchedulerMapAndDependentMaps(SchedulerDependentMapsCache.java:141)
at com.termalabs.server.cache.SchedulerDependentMapsCache.initializeSchedulerMapIfNecessary(SchedulerDependentMapsCache.java:127)
at com.termalabs.server.cache.SchedulerDependentMapsCache.getSchedulers(SchedulerDependentMapsCache.java:120)
at com.termalabs.server.cache.SchedulerVendorImpl.getSchedulers(SchedulerVendorImpl.java:337)
at com.termalabs.server.system.JammerManager.run2(JammerManager.java:297)
at com.termalabs.server.system.JammerManager.run(JammerManager.java:239)
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: org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.termalabs.common.hibernate.jaws.JawsJob#UUID[AW7I5Yw_TX4=]]
at org.hibernate.impl.SessionFactoryImpl$2.handleEntityNotFound(SessionFactoryImpl.java:419)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:171)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:207)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:126)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:906)
at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:874)
at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:590)
at org.hibernate.type.EntityType.resolve(EntityType.java:412)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:139)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:877)
at org.hibernate.loader.Loader.doQuery(Loader.java:752)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
at org.hibernate.loader.Loader.doList(Loader.java:2232)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129)
at org.hibernate.loader.Loader.list(Loader.java:2124)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1149)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at com.termalabs.common.connection.hibernate.RichQueryCommon$1.execute(RichQueryCommon.java:972)
at com.termalabs.common.connection.hibernate.RichQueryCommon$1.execute(RichQueryCommon.java:969)
... 14 in common
Release : 5.8.6
Component : AUTOMIC AUTOMATION INTELLIGENCE ENGINE
There was a jobCondition that were referencing jobId's that didn't exist.
To resolve:
1. Get the list of these JobConditionId's from the query below:
select js.schedulerName, jj.jobName, jj.jobId, js.jobSchedulerId, jc.jobConditionId, jc.customDependency, jc.condMode from JawsJob jj, JobScheduler js, JobCondition jc where jj.jobId = jc.jobId and jj.jobSchedulerId=js.jobSchedulerId and jc.dependantJobId not in (select jobId from JawsJob);
2. Got the list of the default "missing_job" ID for each scheduler by running:
select s.schedulerName, s.jobSchedulerId, jj.jobName, jj.jobId from JobScheduler s, JawsJob jj where jj.jobName IN ('missing_job', 'cross_instance_job')
and jj.jobSchedulerId = s.jobSchedulerId order by s.schedulerName, jj.jobName;
3. We ran the following query to update the jobCondition table with the default "missing_job" ID so that the conditions referenced something valid.
First stopped the AAI service, then ran the following and started up AAI again.
update JobCondition set dependantJobId = 'AW0_b1NYBVw=' where jobConditionId IN ('AW7OCfCTCl0=', 'AW7OCfDIOTA=', 'AW7OCfDNPb4=', 'AW7OCfCTClw=', 'AW7OCfDIOTM=', 'AW7OCfDNPcA=', 'AW7OCfCUCpI=', 'AW7OCfChFgo=');
We used the missing_job value from the query in step 2 and we used the jobConditionId's returned in the first query.