Repository navigation
Description
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:
- CronTriggerBean.java (5.52 kB)
- SimpleTriggerBean.java (6.36 kB)
Activity
spring-projects-issues commentedon May 15, 2012
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.
spring-projects-issues commentedon May 15, 2012
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.
spring-projects-issues commentedon May 15, 2012
Alexander Radzin commented
My fast fix.
spring-projects-issues commentedon May 15, 2012
Artem Bilan commented
@AlexanderI 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 ;-)
spring-projects-issues commentedon May 16, 2012
Alexander Radzin commented
@ArtemYou 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.
spring-projects-issues commentedon Jun 11, 2012
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.
spring-projects-issues commentedon Sep 7, 2012
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.
spring-projects-issues commentedon Sep 8, 2012
Chris Beams commented
Good point, Thad West. Thanks for taking the time to mention it.
spring-projects-issues commentedon Jan 22, 2013
Roman Konoval commented
I think at least documentation should be updated. 3.2 still references SimpleTriggerBean
spring-projects-issues commentedon Jan 22, 2013
Chris Beams commented
Thanks, Roman. Please add a new issue to this effect. This is likely to get lost without it.