关于Failed to convert property value of type [org.quartz.impl.StdScheduler] to required type [org.springframework.scheduling.quartz.SchedulerFactoryBean
在一个业务类有下列属性
private SchedulerFactoryBeanscheduler;
public SchedulerFactory BeangetScheduler() {
return scheduler;
}
public void setScheduler(SchedulerFactoryBean scheduler) {
this.scheduler = scheduler;
}
用spring 进行装配:
<property name="scheduler">
<ref bean="schedulerFactoryBean" />
</property> </bean>
<bean id="schedulerFactoryBean" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"/>
启动时候报:Failed to convert property value of type [org.quartz.impl.StdScheduler] to required type [org.springframework.scheduling.quartz.SchedulerFactoryBean异常
解决方案:
SchedulerFactoryBean 这个bean
<bean id="Scheduler" lazy-init="false" autowire="no"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean" >
</bean>
它是一个工厂bean,得到的不是它本身,而是它负责创建的org.quartz.impl.StdScheduler对象 ,
所以属性需要修改:
private StdScheduler scheduler;
public StdScheduler getScheduler() {
return scheduler;
}
public void setScheduler(StdScheduler scheduler) {
this.scheduler = scheduler;
}
关于Failed to convert property value of type [org.quartz.impl.StdScheduler] to required type [org.springframework.scheduling.quartz.SchedulerFactoryBean的更多相关文章
- Spring 整合 Flex (BlazeDS)无法从as对象 到 Java对象转换的异常:org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.util.Date' to required type 'java.sql.Timestamp' for property 'wfsj'; nested exception is java.lang.Ill
异常信息如下: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value ...
- spring mvc出现 Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date' for property 'endtime'
在使用spring mvc中,绑定页面传递时间字符串数据给Date类型是出错: Failed to convert property value of type [java.lang.String] ...
- 出错:Failed to convert property value of type 'org.apache.ibatis.session.defaults.DefaultSqlSessionFactory' to required type 'java.lang.String' for property 'sqlSessionFactoryBeanName';
出错的详细信息: 3 ERROR [http-nio-80-exec-3] org.springframework.web.servlet.DispatcherServlet - Context in ...
- org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'null' to required type 'double' for property 'band'; nested exception is org.springframework.core.convert.Con
本文为博主原创,未经允许不得转载: 先将异常粘贴出来: 20:37:26,909 ERROR [com.suning.fucdn.controller.ProductDataStaticsContro ...
- 【spring mvc】后台API查询接口,get请求,后台Date字段接收前台String类型的时间,报错default message [Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date' for property 'createDate';
后台API查询接口,get请求,后台Date字段接收前台String类型的时间筛选条件 后台接口接收 使用的实体 而createDate字段在后台实体中是Date类型 报错信息: org.spring ...
- Java 异常 Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date'
查询时发送给服务器的日期的字符串格式:yyyy-MM-dd HH:mm:ss 服务器接收到日期的字符串之后,向 MySQL 数据库发起查询时,因为没有指定日期时间格式,导致字符串数据不能正确地转换为日 ...
- [Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date' for property 'beginTime';
依照https://stackoverflow.com/questions/23702041/failed-to-convert-property-value-of-type-java-lang-st ...
- Failed to convert property value of type 'java.util.LinkedHashMap' to required type 'java.util.Map' for property 'filters'
在使用shiro的自定义filter出现的问题 <property name="filters"> <util:map> <entry key=&qu ...
- Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date'
我的情况是:在applicationContext.xml文件中配置 <bean id="member" class="com.entity.Member" ...
随机推荐
- Orchard 学习-安装Orchard
前段时间使用一个ABP的框架进行了一个简单CMS开发.但感觉自己开发CMS不够灵活和通用,所以还是学习一下Orchard.学习的第一步,阅读官方的文档.由于是英文,所以我对其进行了翻译和记录,方便自己 ...
- HTTP 错误 500.21 - Internal Server Error的解决方案
开始菜单>所有程序>附件>命令提示符(以管理员的身份运行) 然后运行下面的命令注册: 32位机器: C:\Windows\Microsoft.NET\Framework\v4.0.3 ...
- C#中调用存储过程
[csharp] view plain copy print? string strsql = "Data Source=192.168.24.53;Initial Catalog=JF_C ...
- java环境变量详解---找不到或无法加载主类
默认安装在C:\ProgramFiles\Java\jdk1.7.0目录下环境变量配置为PATH=.;%JAVA_HOME%\binCLASSPATH=.;%JAVA_HOME%\lib\dt.jar ...
- 2016/01/19 javascript学习笔记-name属性
1. name属性只在少数html元素中有效:包括表单.表单元素.<iframe>和<img>元素. 基于name属性的值选取html元素,可以使用document对象的get ...
- Java对象的序列化与反序列化:默认格式及JSON格式(使用jackson)
我的技术博客经常被流氓网站恶意爬取转载.请移步原文:http://www.cnblogs.com/hamhog/p/3558663.html,享受整齐的排版.有效的链接.正确的代码缩进.更好的阅读体验 ...
- C++ 中的类型转换机制详解
Tips: This article based on Scott Meyers's <<Effective C++>> article 27: Minimize Castin ...
- resid入门笔记(二)
本节介绍redis 消息订阅 密码 持久化 主从配置 首先我对消息订阅理解的不深,应该说仅知道概念吧 发送消息 cctv1 发送 hello cctv2 发送 ‘你好’ client ...
- .net面试题( 转)
描述线程与进程的区别? 什么是Windows服务,它的生命周期与标准的EXE程序有什么不同 Windows上的单个进程所能访问的最大内存量是多少?它与系统的最大虚拟内存一样吗?这对于系统设计有什么影响 ...
- Markdown语法备忘
标题 标题 标题是每篇文章都需要也是最常用的格式,在 Markdown 中,如果一段文字被定义为标题,只要在这段文字前加 # 号即可. # 一级标题 ## 二级标题 ### 三级标题 以此类推,总共六 ...