Skip to content

Support Quartz 2.0.x [SPR-8275] #12923

Closed
Closed

Description

@spring-projects-issues

Chris Beams opened SPR-8275 and commented


Issue Links:

Referenced from: commits f265347, 16933a5, 69c9abf

4 votes, 7 watchers

Activity

  1. spring-projects-issues commented on Apr 26, 2011

    @spring-projects-issues
    CollaboratorAuthor

    Chris Beams commented

    See comments and patch in #12642

  2. spring-projects-issues commented on Jul 19, 2011

    @spring-projects-issues
    CollaboratorAuthor

    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

  3. spring-projects-issues commented on Oct 5, 2011

    @spring-projects-issues
    CollaboratorAuthor

    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.

  4. spring-projects-issues commented on Nov 11, 2011

    @spring-projects-issues
    CollaboratorAuthor

    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

  5. spring-projects-issues commented on Nov 27, 2011

    @spring-projects-issues
    CollaboratorAuthor

    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

  6. spring-projects-issues commented on Dec 15, 2011

    @spring-projects-issues
    CollaboratorAuthor

    Dennis Kieselhorst commented

    Works except for repeatCount. This attribute is missing on SimpleTriggerFactoryBean.

  7. spring-projects-issues commented on Jan 31, 2012

    @spring-projects-issues
    CollaboratorAuthor

    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

  8. spring-projects-issues commented on Feb 1, 2012

    @spring-projects-issues
    CollaboratorAuthor

    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

  9. spring-projects-issues commented on Feb 1, 2013

    @spring-projects-issues
    CollaboratorAuthor

    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 )

  10. spring-projects-issues commented on Feb 2, 2013

    @spring-projects-issues
    CollaboratorAuthor

    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

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

Metadata

Metadata

Assignees

Labels

type: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions