Description
We started getting:
2011-06-11 00:59:30,420 ERROR [QuartzScheduler_Worker-8] [JobRunShell] Job elastic agent monitor job group.elastic agent monitor job threw an unhandled Exception: net.sf.hibernate.LazyInitializationException: Exception initializing proxy: [com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl#262570023] at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:64) at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:164) at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:108) at com.atlassian.bamboo.resultsummary.BuildResultsSummaryImpl$$EnhancerByCGLIB$$cdcad96f.getBuildCompletedDate(<generated>) at com.atlassian.bamboo.agent.elastic.schedule.ElasticRunningInstancesOptimizer$3.isIdleLongerThan(ElasticRunningInstancesOptimizer.java:349) at com.atlassian.bamboo.agent.elastic.schedule.ElasticRunningInstancesOptimizer$3.apply(ElasticRunningInstancesOptimizer.java:340) at com.atlassian.bamboo.agent.elastic.schedule.ElasticRunningInstancesOptimizer$3.apply(ElasticRunningInstancesOptimizer.java:327) at com.google.common.collect.Iterators$7.computeNext(Iterators.java:616) at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:140) at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:135) at com.atlassian.bamboo.agent.elastic.schedule.ElasticInstancesMonitorJob.execute(ElasticInstancesMonitorJob.java:47) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at com.atlassian.bamboo.quartz.SystemAuthorizedThreadPool$1.run(SystemAuthorizedThreadPool.java:38) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
This will be fixed properly of course, but in any case, since this exception interferes only with the "is idle longer than" condition, it should not prevent the optimiser from shutting down the instance if all other conditions are met.