关于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" ...
随机推荐
- 利用FSO取得BMP,JPG,PNG,GIF文件信息(大小,宽、高等)
利用FSO取得BMP,JPG,PNG,GIF文件信息(大小,宽.高等) 程序代码 <% ':::BMP, GIF, JPG and PNG ':::This function gets a sp ...
- awk与cut在以空格为分割域时的区别
awk默认以空格为分割域,比如我想获得某进程pid:[root@SHCTC-GAME12-44 ~]# ps -ef|grep "sshd -f"|grep -v greproot ...
- 关于数据导出到Excel科学计数法的处理
SELECT '=T("'+字段+'")' from table 在这里在显示的字段内容前加了 '=T("',在后面也加了'")'.在这这里T()是Exc ...
- android开发中R文件丢失
R文件在android开发中,占据着中会在重要的地位,里面的内容有系统自动生成,不可随意修改,然而在开发过程中,总是不可知的丢失,这里总结一下修补方法 #.在Eclipse里可以 ...
- Java Thread interrupt
现有线程对象threadA,调用threadA.interrupt(),则threadA中interrupted状态会被置成false,很多线程中都是通过isInterrupted()方法来检测线程是 ...
- Mysql 冷备份批处理
@Rem Generate today date @echo wscript.echo dateadd("d",0,date)>GetOldDate.vbs @for /f ...
- ###学习《C++ Primer》- 5
点击查看Evernote原文. // @author: gr // @date: 2014-10-20 // @email: forgerui@gmail.com Part 5: 动态内存(第12章) ...
- 关于修改tabbar的颜色的问题
首先,项目是在故事板中搭建的,所以遇到这个问题的时候,首先是想到在故事板中找到相关的属性,确实是有一个Selected Image,但是设置了这个图片以后,运行的效果是,点击选择后,本身的image就 ...
- CSU-ACM2016暑假集训训练2-DFS(C - Network Saboteur)
C - Network Saboteur Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu ...
- Head First 设计模式系列之一----模板模式(java版)
开篇序言:四人帮的设计模式对于我这个菜鸟看着打瞌睡,后面果断买了一本head first的,感觉还可以像看报纸似的,花了一个寒假的晚上看了大半,确实内容也挺吸引人的,讲的很风趣.否则我也不可能,大过年 ...