关于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" ...
随机推荐
- linux命令 common 文件比较
比较已经排序的文件 comm [options] file1 file2 comm将逐行比较已经排序的两个文件.显示结果包括3列: 第1列为只在file1中找到的行;第2列为只在file2中找到的行; ...
- zabbix数据存储
一.zabbix数据库 zabbix-server将采集到的数据存储在数据库中,最常用的Mysql,数据存储的大小和每秒处理的数据量有关,数据存储取决于每秒处理的数据量和Housekeeper的删除数 ...
- Oracle学习第一天---安装和基础入门
国庆七天假,决定静下心来入门Oracle数据库. 环境:Ocacle 11g 软件安装包和安装图解,大家可以在我的百度网盘上下载:链接:http://pan.baidu.com/s/1ntjDEnZ ...
- SVN服务器从Windows迁移到Linux
gerui 2013.9.14 ge-rui@sohu.com 一.备份VisualSVN项目 1. 现在要使用Linux作为svn服务器,之前是在windows Server 2008上的,用的是V ...
- javascript 第27节 jQuery选择器
下面的html需要以下2个文件: 1.style.css div,span,p { width:140px; height:140px; margin:5px; background:#aaa; bo ...
- [leetcode] 399. Evaluate Division
我是链接 看到这道题,2个点和一个权值,然后想到图,但是leetcode就是这样,没给数据范围,感觉写起来很费劲,然后就开始用图来做,添加边的时候,注意正向边和反向变,然后查询的时候,先判断2个点是否 ...
- crontab环境变量问题
今天设置linux定时任务时,python内调用的shell指令总执行失败,单独调用python脚本则无问题,考虑到是环境变量未生效引起. 故在执行crontab -e编辑配置文件时,将shell内执 ...
- yiic创建YII应用 "php.exe"不是内部或外部命令 解决办法
第一步:运行CMD命令. 第二步:进入Yiic文件的目录 (例如在D盘里面 D:/yii/framework) 第三步:D:\yii\framework>yiic webapp D: ...
- slabs.c
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Slabs memory allo ...
- 当在Win8下安装msi类型的文件出现errorcode 2503的解决方法
Win8安装程序出现2502.2503错误解决方法 在Win8中,在安装msi安装包的时候常常会出现代码为2502.2503的错误.其实这种错误是由于安装权限不足造成的,可以这种msi的安装包不像其他 ...