New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jobs fire while app is booting do not have a hibernate session #62

Closed
erichelgeson opened this Issue Feb 25, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@erichelgeson

erichelgeson commented Feb 25, 2016

Grails 3.1.1 Quartz Plugin 2.0.1-2.0.7

When a job is scheduled instantly (eg resuming from a persistent store) It will fail without a Hibernate Session. Subsequent runs do have a Hibernate session -

ERROR grails.plugins.quartz.listeners.ExceptionPrinterJobListener - Exception occurred in job: Grails Job org.quartz.JobExecutionException: org.hibernate.HibernateException: No Session found for current thread

We tried to set the loadAfter, but it did not resolve the issue. 0e2a909

DEBUG quartz.QuartzGrailsPlugin - Registering hibernate SessionBinderJobListener
INFO org.grails.plugins.datasource.TomcatJDBCPoolMBeanExporter - Registering beans for JMX exposure on startup
ERROR grails.plugins.quartz.listeners.ExceptionPrinterJobListener - Exception occurred in job: Grails Job

^ exception before the app starts

Grails application running at http://localhost:8080 in environment: development
DEBUG grails.plugins.quartz.listeners.SessionBinderJobListener - Persistence session is flushed.
DEBUG grails.plugins.quartz.listeners.SessionBinderJobListener - Persistence session is opened.

^ SessionBinderJobListener working as expected after app is running

I don't see this behavior in Grails 2.5.3 with Quartz Plugin 1.0.2

@davydotcom

This comment has been minimized.

Contributor

davydotcom commented Mar 28, 2017

resolved in 2.0.10

@davydotcom davydotcom closed this Mar 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment