日期:2014-05-18  浏览次数:20633 次

求助:quarz+spring启动报错的问题
<bean id="jobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
        <!--shouldRecover属性为true,则当Quartz服务被中止后,再次启动任务时会尝试恢复执行之前未完成的所有任务-->
        <property name="jobClass">
         <value>com.richway.quartz.test.HelloWorld</value>
        </property>
        <property name="jobDataAsMap">
<map>
<entry key="simpleService">
<ref bean="simpleService" />
</entry>
</map>
</property>
        
    </bean>   

这里面的simpleService明明已经实现了serializable接口,可是后台为啥还报错:
Couldn't store job: Unable to serialize JobDataMap for insertion into database because the value of property 'simpleService' is not serializable: org.springframework.beans.factory.support.DefaultListableBeanFactory [See nested exception: java.io.NotSerializableException: Unable to serialize JobDataMap for insertion into database because the value of property 'simpleService' is not serializable: org.springframework.beans.factory.support.DefaultListableBeanFactory]
spring quartz

------解决方案--------------------
quartz
------解决方案--------------------
quartz 跟spring整合的时候 好像不能用1.8.x版本的

你用quartz 1.7.3版本的试试。