Skip to content

SimpleTriggerBean is not compatible with Quartz 2.1+ [SPR-9776] #14410

Closed

Description

@spring-projects-issues

Alexander Radzin opened SPR-9776 and commented

Quartz made some changes in their API that are not backwards compatible.
For example former class org.springframework.scheduling.quartz.SimpleTriggerBean became interface. This causes application that used org.springframework.scheduling.quartz.SimpleTriggerBean to fail because this class extends SimpleTriggerBean that became interface, so the declaration (and implementation of SimpleTriggerBean) must be changed.

The new version of quartz was released at May, 2, 2012, so other people have not complained yet.

Here is the relevant stack trace fragment:

Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.springframework.scheduling.quartz.SimpleTriggerBean] for bean with name 'circuitCacheInitialLoadingTrigger' defined in URL [file:/C:/proj/trunk/main/measurments/collector/target/test-classes/com/panpwr/measurements/collector/persistence/test-collector.appcontext.xml]: problem with class file or dependent class; nested exception is java.lang.IncompatibleClassChangeError: class org.springframework.scheduling.quartz.SimpleTriggerBean has interface org.quartz.SimpleTrigger as super class
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1265)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:433)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)


Attachments:

Activity

  1. spring-projects-issues commented on May 15, 2012

    @spring-projects-issues
    CollaboratorAuthor

    Oleg Zhurakousky commented

    I've reclassified it to a simple 'Task' - since this is definitely not a Bug.
    And since its a Task it can not be of Critical priority. I hope you understand.

  2. spring-projects-issues commented on May 15, 2012

    @spring-projects-issues
    CollaboratorAuthor

    Alexander Radzin commented

    I just hope that this issue will be fixed in nearest Spring minor release. I am afraid many people will be blocked until this is resolved.

    In the meantime I would like to suggest my solution attached here. The only limitation of my fast fix is that I have not implemented support of listeners.

  3. spring-projects-issues commented on May 15, 2012

    @spring-projects-issues
    CollaboratorAuthor

    Alexander Radzin commented

    My fast fix.

  4. spring-projects-issues commented on May 15, 2012

    @spring-projects-issues
    CollaboratorAuthor

    Artem Bilan commented

    @Alexander
    I classify this issue as improvement in the Spring Core, it has no relation to the http://www.springsource.org/spring-integration.
    If you agree we're going to move this issue to the appropriate JIRA-project.
    If you don't, you have to convince us, that this problem has any reason here ;-)

  5. spring-projects-issues commented on May 16, 2012

    @spring-projects-issues
    CollaboratorAuthor

    Alexander Radzin commented

    @Artem
    You are welcome to move this issue where you want. I am not familiar enough with spring projects so I categorized this issue as "integration" because I thought that it is about spring-to-quartz integration. I'd be happy to know when this is resolved. Good luck with this.

  6. spring-projects-issues commented on Jun 11, 2012

    @spring-projects-issues
    CollaboratorAuthor

    Oleg Zhurakousky commented

    Chris

    I am only assigning this to you so you can probably provide some correlation with possibly already opened JIRA in SPR for this and resolve it as Not Valid once done.
    Let me know what you think.

  7. spring-projects-issues commented on Sep 7, 2012

    @spring-projects-issues
    CollaboratorAuthor

    Thad West commented

    Shouldn't this issue be "Closed - Won't Fix"? The Spring API docs clearly state to not use SimpleTriggerBean, rather: org.springframework.scheduling.quartz.SimpleTriggerFactoryBean

    From the SimpleTriggerBean doc:
    NOTE: This convenience subclass does not work against Quartz 2.0. Use Quartz 2.0's native JobDetailImpl class or the new Quartz 2.0 builder API instead. Alternatively, switch to Spring's SimpleTriggerFactoryBean which largely is a drop-in replacement for this class and its properties and consistently works against Quartz 1.x as well as Quartz 2.0/2.1.

  8. spring-projects-issues commented on Sep 8, 2012

    @spring-projects-issues
    CollaboratorAuthor

    Chris Beams commented

    Good point, Thad West. Thanks for taking the time to mention it.

  9. spring-projects-issues commented on Jan 22, 2013

    @spring-projects-issues
    CollaboratorAuthor

    Roman Konoval commented

    I think at least documentation should be updated. 3.2 still references SimpleTriggerBean

  10. spring-projects-issues commented on Jan 22, 2013

    @spring-projects-issues
    CollaboratorAuthor

    Chris Beams commented

    Thanks, Roman. Please add a new issue to this effect. This is likely to get lost without it.

  11. added
    status: declined
    type: task
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: declinedtype: task

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions