Migrating from Spring 3 to Spring 4 - org.springframework.scheduling.quartz.CronTriggerBean
2024-09-17 07:53:43
I'm trying to migrate from spring 3.0.5 to spring 4.1.X .
Spring 3 has Class named as "org.springframework.scheduling.quartz.CronTriggerBean"
But Spring 4 doesn't include this class name.
[// ::: EDT] ClassPathXmlA W org.springframework.context.support.AbstractApplicationContext __refresh Exception encountered during context initialization - cancelling refresh attempt org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.scheduling.quartz.CronTriggerBean] for bean with name 'beanIdName' defined in class path resource [config/spring/WxsCacheContext.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.scheduling.quartz.CronTriggerBean at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:)
I have tried alternative like "spring-support" which has the same class. But no luck.
After getting that jar, it is giving errors about the quartz
// ::: EDT] 0000006e SystemOut O ERROR (?:?) - java.lang.Exception: Bean from SpringUtils.getSpringBean(hostnameVerifierSetter) error message: Unable to initialize group definition. Group resource name [classpath*:beanRefFactory.xml], factory key [beanContext]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'beanContext' defined in URL [file:/C:/Program%20Files%(x86)/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/cellName/Project.ear/configurations/beanRefFactory.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org.quartz.impl.JobDetailImpl
2 Answers
From Spring 3.1+, Change the Class names for the CronTriggerFactoryBean & JobDetailFactoryBean as like below
org.springframework.scheduling.quartz.CronTriggerBean
org.springframework.scheduling.quartz.CronTriggerFactoryBean
org.springframework.scheduling.quartz.JobDetailBean
org.springframework.scheduling.quartz.JobDetailFactoryBean
最新文章
- 代码审计之SQL注入
- javascript中怎样区分元素和节点?
- Texture Atlas
- action 方法的访问
- DOM基本概念和操作
- LDA-math-MCMC 和 Gibbs Sampling
- 节点的创建--对比jQuery与JavaScript 方法
- APUE《UNIX 环境高级编程》读后感
- python学习第一课要点记录
- LED限流电阻的大小计算
- [React Testing] Element types with Shallow Rendering
- WCF从零学习之WCF概述(一)
- Vue中transition和animation的使用
- 推荐一个免费的在线IDE和终端
- Mac git 上传到 github
- 手把手教你从零实现Linux misc设备驱动一(基于友善之臂4412开发板)
- 【Unity】7.1 Input类的方法和变量
- 系统有专门画图的api
- python函数 变量 递归
- PAT 1067 试密码