在一个业务类有下列属性

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的更多相关文章

  1. 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 ...

  2. 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] ...

  3. 出错: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 ...

  4. 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 ...

  5. 【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 ...

  6. Java 异常 Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date'

    查询时发送给服务器的日期的字符串格式:yyyy-MM-dd HH:mm:ss 服务器接收到日期的字符串之后,向 MySQL 数据库发起查询时,因为没有指定日期时间格式,导致字符串数据不能正确地转换为日 ...

  7. [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 ...

  8. 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 ...

  9. 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" ...

随机推荐

  1. spark1.1.0下使用SparkSQL

    spark1.1.0的安装参见http://blog.csdn.net/bluejoe2000/article/details/41391407 安装了spark之后,可以在 shell中执行Spar ...

  2. react native for Android (make you first android app)

    第一步:如果你的电脑安装了node,恭喜你,第一步完成:如果没有,那请先安装node. 第二步:安装react-native-cli,在windows下需要从github签下来的react-nativ ...

  3. sqlserver 理解数据集

    数据集分四类: 1.A∩B,既是所求数据集既在A中,又在B中 2.A∪B,既所求数据在数据集A中,或在数据集B中 3.A-B,既所求数据在数据集A中,不在数据集B中 4.B-A,既所求数据在数据集B中 ...

  4. asp:时间的显示

    DateTime dt = DateTime.Now;//    Label1.Text = dt.ToString();//2005-11-5 13:21:25//    Label2.Text = ...

  5. java_object的具体使用--上帝

    就我们所知道的,java中有子类和父类,子类由于继承父类而形成,那么父类还有没有父类呢?答案是有了,父类的父类就是object类,一切父类都继承了它,那么根据继承的属性,每一个子类都有一个object ...

  6. 转 Java中Filter、Servlet、Listener的学习

      1.Filter的功能filter功能,它使用户可以改变一个 request和修改一个response. Filter 不是一个servlet,它不能产生一个response,它能够在一个requ ...

  7. ZOJ 2392 The Counting Problem(模拟)

    题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1368 题目大意:计算从S到T中所有的数,其中0,1,2,3,4,5, ...

  8. CodeForces 538B

    Description A number is called quasibinary if its decimal representation contains only digits 0 or 1 ...

  9. sharepoint 2013 suitbar

    参考链接:http://academy.bindtuning.com/customize-sharepoint-2013-and-office-365-suite-bar/

  10. Android开发系列之调用WebService

    我在学习Android开发过程中遇到的第一个疑问就是Android客户端是怎么跟服务器数据库进行交互的呢?这个问题是我当初初次接触Android时所困扰我的一个很大的问题,直到几年前的一天,我突然想到 ...