Message "Data Calc Job FAILED TO COMPLETE. ... org.hibernate.LazyInitializationException: could not initialize proxy - no Session " logged hourly in the server.log file

Solution Unverified - Updated

Environment

  • Red Hat JBoss Operations Network (ON) 3.3.4
  • JBoss ON Server set into DEBUG mode;

Issue

  • Message "Data Calc Job FAILED TO COMPLETE. ... org.hibernate.LazyInitializationException: could not initialize proxy - no Session " logged hourly in the server.log file
  • Every hour, the following is logged in the server.log file:
18:00:08,613 ERROR [org.jboss.as.ejb3.invocation] (RHQScheduler_Worker-1) JBAS014134: EJB Invocation failed on component MeasurementOOBManagerBean for method public abstract void org.rhq.enterprise.server.measurement.MeasurementOOBManagerLocal.computeOOBsForLastHour(org.rhq.core.domain.auth.Subject,java.lang.Iterable): javax.ejb.EJBException: java.lang.RuntimeException: javax.ejb.EJBException: org.hibernate.LazyInitializationException: could not initialize proxy - no Session
...
	at org.rhq.enterprise.server.measurement.MeasurementOOBManagerLocal$$$view160.computeOOBsForLastHour(Unknown Source) [rhq-server.jar:4.12.0.JON330GA-redhat-4]
	at org.rhq.enterprise.server.scheduler.jobs.DataCalcJob.calculateOOBs(DataCalcJob.java:150) [rhq-server.jar:4.12.0.JON330GA-redhat-4]
	at org.rhq.enterprise.server.scheduler.jobs.DataCalcJob.executeJobCode(DataCalcJob.java:85) [rhq-server.jar:4.12.0.JON330GA-redhat-4]
	at org.rhq.enterprise.server.scheduler.jobs.AbstractStatefulJob.execute(AbstractStatefulJob.java:48) [rhq-server.jar:4.12.0.JON330GA-redhat-4]
	at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-1.6.5.jar:1.6.5]
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525) [quartz-1.6.5.jar:1.6.5]
Caused by: java.lang.RuntimeException: javax.ejb.EJBException: org.hibernate.LazyInitializationException: could not initialize proxy - no Session
	at org.rhq.enterprise.server.measurement.MeasurementOOBManagerBean.computeOOBsForLastHour(MeasurementOOBManagerBean.java:253) [rhq-server.jar:4.12.0.JON330GA-redhat-4]
...
	... 29 more
Caused by: javax.ejb.EJBException: org.hibernate.LazyInitializationException: could not initialize proxy - no Session
...
18:00:08,621 ERROR [org.rhq.enterprise.server.scheduler.jobs.DataCalcJob] (RHQScheduler_Worker-1) Data Calc Job FAILED TO COMPLETE. Cause: javax.ejb.EJBException: java.lang.RuntimeException: javax.ejb.EJBException: org.hibernate.LazyInitializationException: could not initialize proxy - no Session
18:00:08,621 INFO  [org.rhq.enterprise.server.scheduler.jobs.DataCalcJob] (RHQScheduler_Worker-1) Data Calc Job FINISHED [8591]ms
  • What is causing DataCalcJob to fail and what are implications?

Resolution

It's a failure of the DataCalcJob which is a scheduled job that runs to generate baselines and OOBs and exception is due to a bug that happens when JBoss ON Server is in DEBUG mode. This has been reported in the This content is not included.Red Hat Bugzilla 1293350 and fix will be available in the following releases of JBoss ON.

SBR
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.