You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This has been promoted to a Spring 3.1 feature and is fully addressed for 3.1 RC1 now.
Note that JobDetailBean and Cron/SimpleTriggerBean do not work against Quartz 2.0, and never will. Use Quartz 2.0's native JobDetailImpl etc classes or the new Quartz 2.0 builder API instead (see the Quartz 2.0 migration guide for details).
What about MethodInvokingJobDetailFactoryBean? This does not work at all with Quartz 2.x / Spring 3.1 since it attempts to instantiate JobDetailBean which is incompatible with Quartz 2.x
Also, I do not agree that CronTriggerBean should not be supported for Quartz 2.x - we use declarative XML configuration and would have to overhaul everything to use job names/groups instead of bean references in order to wire everything together.
MethodInvokingJobDetailFactoryBean's Quartz 2.0 support had a bug in 3.1 RC1 which got fixed in trunk already, so it should work with 3.1 RC2 which is about to be released later this November.
As for CronTriggerBean and co, what we could do is to provide equivalent classes for Quartz 2.0 which mimic the functionality in the original CronTriggerBean class: e.g. a CronTriggerImplBean.
Good news: As of 3.1 RC2 which is scheduled for immediate release, we have JobDetailFactoryBean, CronTriggerFactoryBean and SimpleTriggerFactoryBean classes as alternatives for the non-factory variants that we had before. These new FactoryBeans are able to do their job against Quartz 1.x as well as Quartz 2.0/2.1, so can also be used for portable configuration across all Quartz versions. Switching to the FactoryBeans should be a simple class renaming exercise in your configuration, with all of the common properties supported with the exact same names (let me know if you find any desirable properties missing).
java.lang.IncompatibleClassChangeError: class org.springframework.scheduling.quartz.CronTriggerBean has interface org.quartz.CronTrigger as super class
when Tomcat starts.
I use Spring 3.1.0.RELEASE and use the new classes CronTriggerFactoryBean and JobDetailFactoryBean. But it seems that Tomcat tries to load this class on startup before Spring configuration
See this bug to understand the Tomcat classloading problem. It is fixed in 7.0.26; try upgrading and let us know (in a new issue, please) if you still have any problems.
I also experience the same error:
java.lang.IncompatibleClassChangeError: class org.springframework.scheduling.quartz.SimpleTriggerBean has interface org.quartz.SimpleTrigger as super class
Benjamin, as per the comments above and as also stated in the SimpleTriggerBean javadoc, this class does not work with Quartz 2.x, which is exactly why we added SimpleTriggerFactoryBean as its successor. So using SimpleTriggerFactoryBean is not a workaround; it's the recommended approach now, automatically adapting between Quartz 1.x and 2.x through reflection.
The IncompatibleClassChangeError has its roots in a breakage between Quartz 1.x and Quartz 2.x, where SimpleTrigger changed from a class to an interface. Since our SimpleTriggerBean extends the former SimpleTrigger class, its design is unfortunately inherently tied to Quartz 1.x. SimpleTriggerFactoryBean on the other hand uses a more flexible factory approach now.
Activity
spring-projects-issues commentedon Apr 26, 2011
Chris Beams commented
See comments and patch in #12642
spring-projects-issues commentedon Jul 19, 2011
Juergen Hoeller commented
This has been promoted to a Spring 3.1 feature and is fully addressed for 3.1 RC1 now.
Note that JobDetailBean and Cron/SimpleTriggerBean do not work against Quartz 2.0, and never will. Use Quartz 2.0's native JobDetailImpl etc classes or the new Quartz 2.0 builder API instead (see the Quartz 2.0 migration guide for details).
Juergen
spring-projects-issues commentedon Oct 5, 2011
Manuel Dominguez Sarmiento commented
What about MethodInvokingJobDetailFactoryBean? This does not work at all with Quartz 2.x / Spring 3.1 since it attempts to instantiate JobDetailBean which is incompatible with Quartz 2.x
Also, I do not agree that CronTriggerBean should not be supported for Quartz 2.x - we use declarative XML configuration and would have to overhaul everything to use job names/groups instead of bean references in order to wire everything together.
spring-projects-issues commentedon Nov 11, 2011
Juergen Hoeller commented
MethodInvokingJobDetailFactoryBean's Quartz 2.0 support had a bug in 3.1 RC1 which got fixed in trunk already, so it should work with 3.1 RC2 which is about to be released later this November.
As for CronTriggerBean and co, what we could do is to provide equivalent classes for Quartz 2.0 which mimic the functionality in the original CronTriggerBean class: e.g. a CronTriggerImplBean.
Juergen
spring-projects-issues commentedon Nov 27, 2011
Juergen Hoeller commented
Good news: As of 3.1 RC2 which is scheduled for immediate release, we have JobDetailFactoryBean, CronTriggerFactoryBean and SimpleTriggerFactoryBean classes as alternatives for the non-factory variants that we had before. These new FactoryBeans are able to do their job against Quartz 1.x as well as Quartz 2.0/2.1, so can also be used for portable configuration across all Quartz versions. Switching to the FactoryBeans should be a simple class renaming exercise in your configuration, with all of the common properties supported with the exact same names (let me know if you find any desirable properties missing).
Juergen
spring-projects-issues commentedon Dec 15, 2011
Dennis Kieselhorst commented
Works except for repeatCount. This attribute is missing on SimpleTriggerFactoryBean.
spring-projects-issues commentedon Jan 31, 2012
Markus Bäurle commented
Hmm, I get an
java.lang.IncompatibleClassChangeError: class org.springframework.scheduling.quartz.CronTriggerBean has interface org.quartz.CronTrigger as super class
when Tomcat starts.
I use Spring 3.1.0.RELEASE and use the new classes CronTriggerFactoryBean and JobDetailFactoryBean. But it seems that Tomcat tries to load this class on startup before Spring configuration
spring-projects-issues commentedon Feb 1, 2012
Chris Beams commented
Hi Markus,
See this bug to understand the Tomcat classloading problem. It is fixed in 7.0.26; try upgrading and let us know (in a new issue, please) if you still have any problems.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52444
spring-projects-issues commentedon Feb 1, 2013
Benjamin Jaton commented
I also experience the same error:
java.lang.IncompatibleClassChangeError: class org.springframework.scheduling.quartz.SimpleTriggerBean has interface org.quartz.SimpleTrigger as super class
spring 3.1.3.RELEASE
quartz 2.1.0
As a workaround I am using org.springframework.scheduling.quartz.SimpleTriggerFactoryBean to declare my bean.
( see http://devtrigger.blogspot.com/2012/02/spring-31-with-quartz-212.html )
spring-projects-issues commentedon Feb 2, 2013
Juergen Hoeller commented
Benjamin, as per the comments above and as also stated in the SimpleTriggerBean javadoc, this class does not work with Quartz 2.x, which is exactly why we added SimpleTriggerFactoryBean as its successor. So using SimpleTriggerFactoryBean is not a workaround; it's the recommended approach now, automatically adapting between Quartz 1.x and 2.x through reflection.
The IncompatibleClassChangeError has its roots in a breakage between Quartz 1.x and Quartz 2.x, where SimpleTrigger changed from a class to an interface. Since our SimpleTriggerBean extends the former SimpleTrigger class, its design is unfortunately inherently tied to Quartz 1.x. SimpleTriggerFactoryBean on the other hand uses a more flexible factory approach now.
Juergen