乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      解決Spring中使用quartz發(fā)生NotSerializableException methodInvoker的問題

       風(fēng)_宇星 2015-05-24

      Spring2.5 + quartz1.6.5 發(fā)生如下異常

       

      Caused by: org.quartz.JobPersistenceException: Couldn't store job: Unable to serialize JobDataMap for insertion into database because the value of property 'methodInvoker' is not serializable: org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean [See nested exception: java.io.NotSerializableException: Unable to serialize JobDataMap for insertion into database because the value of property 'methodInvoker' is not serializable: org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean]
              at org.quartz.impl.jdbcjobstore.JobStoreSupport.storeJob(JobStoreSupport.java:1105)

       

      這是Spring的Bug, 解決方法 http://jira./browse/SPR-3797
      下載BeanInvokingJobDetailFactoryBean.java 和 MethodInvokingJobDetailFactoryBean.java
      在Spring配置文件中使用如下方式

       

      Xml代碼  收藏代碼
      1. <bean id="exampleBean" class="example.ExampleImpl">   
      2. </bean>  
      3.   
      4. <bean id="exampleTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">   
      5.     <!-- Execute exampleBean.fooBar() at 2am every day -->  
      6.     <property name="cronExpression" value="0 0 2 * * ?" />  
      7.     <property name="jobDetail">   
      8.         <bean class="frameworkx.springframework.scheduling.quartz.BeanInvokingJobDetailFactoryBean">   
      9.             <property name="concurrent" value="false"/>  
      10.             <property name="targetBean" value="exampleBean" />  
      11.             <property name="targetMethod" value="fooBar" />  
      12.             <property name="arguments">   
      13.                 <list>   
      14.                     <value>arg1Value</value>  
      15.                     <value>arg2Value</value>   
      16.                 <list>   
      17.             </property>   
      18.         </bean>   
      19.     </property>   
      20. </bean>   
      21.   
      22. <bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">   
      23.     <property name="triggers">   
      24.         <list>   
      25.             <ref bean="exampleTrigger" />   
      26.         </list>   
      27.     </property>   
      28. </bean>  
       

      附件是BeanInvokingJobDetailFactoryBean.java 和 MethodInvokingJobDetailFactoryBean.java

       

      參考 http://soulshard./blog/337886

        本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊一鍵舉報(bào)。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評(píng)論

        發(fā)表

        請遵守用戶 評(píng)論公約

        類似文章 更多