2011-07-27 10 views
0

Imクォーツ1.5.2をスプリング3.0.5バージョンで使用しています。私がjdbcストア型スケルトン・コンテキストを取得しようとすると、QuartzがNotSerializableExceptionに直面します。私はそれを完了するために私の研究を行ったが、私はそれを乗り越えることができなかった。イムアイデアから。クォーツNotSerializableException例外

スケジューラの設定は次のとおりです。

<beans xmlns="http://www.springframework.org/schema/beans" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> 

<bean id="taskExecutor" 
     class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor"> 
    <property name="corePoolSize"> 
     <value>${middleware.taskExecutor.corePoolSize}</value> 
    </property> 
    <property name="maxPoolSize"> 
     <value>${middleware.taskExecutor.maxPoolSize}</value> 
    </property> 
    <property name="queueCapacity"> 
     <value>${middleware.taskExecutor.queueCapacity}</value> 
    </property> 
</bean> 

<bean id="emailService" class="EmailServiceImpl"> 
</bean>  

<bean id="emailSenderTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean"> 
    <property name="jobDetail" ref="emailSenderJob"/> 
    <property name="startDelay"> 
     <value>${middleware.portingTrigger.startDelay}</value> 
    </property> 
    <property name="repeatInterval"> 
     <value>${middleware.portingTrigger.repeatInterval}</value> 
    </property> 
</bean> 

<bean id="emailSenderJob" class="org.springframework.scheduling.quartz.JobDetailBean"> 
    <property name="jobClass" value="com.alcatel.lucent.tr.yoda.middleware.job.EmailSenderJob"/> 
    <property name="jobDataAsMap"> 
     <map> 
      <entry key="taskExecuter" value-ref="taskExecutor"/> 
      <entry key="emailService"> 
       <ref bean="emailService"/> 
      </entry> 
     </map> 
    </property> 
</bean> 

<bean id="scheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> 
    <property name="schedulerContextAsMap"> 
     <map> 
      <entry key="emailService"> 
       <ref bean="emailService"/> 
      </entry> 
     </map> 
    </property> 
    <property name="autoStartup" value="true"/> 
    <property name="triggers"> 
     <list> 
      <ref bean="emailSenderTrigger"/> 
     </list> 
    </property> 
    <property name="quartzProperties"> 
     <props> 
      <prop key="org.quartz.scheduler.instanceName">DefaultQuartzScheduler</prop> 
      <prop key="org.quartz.scheduler.rmi.export">false</prop> 
      <prop key="org.quartz.scheduler.rmi.proxy">false</prop> 
      <prop key="org.quartz.scheduler.xaTransacted">false</prop> 
      <prop key="org.quartz.threadPool.class">org.quartz.simpl.SimpleThreadPool</prop> 
      <prop key="org.quartz.threadPool.threadCount">5</prop> 
      <prop key="org.quartz.threadPool.threadPriority">4</prop> 
      <prop key="org.quartz.jobStore.class">org.quartz.impl.jdbcjobstore.JobStoreCMT</prop> 
      <!--<prop key="org.quartz.jobStore.class">org.quartz.simpl.RAMJobStore</prop>--> 
      <prop key="org.quartz.jobStore.driverDelegateClass">org.quartz.impl.jdbcjobstore.StdJDBCDelegate</prop> 
      <prop key="org.quartz.jobStore.dataSource">QUARTZ</prop> 
      <prop key="org.quartz.jobStore.tablePrefix">QRTZ_</prop> 
      <prop key="org.quartz.jobStore.nonManagedTXDataSource">QUARTZ_NO_TX</prop> 
      <prop key="org.quartz.dataSource.QUARTZ.jndiURL">java:QuartzDS</prop> 
      <prop key="org.quartz.dataSource.QUARTZ_NO_TX.jndiURL">java:QuartzNoTxDS</prop> 
     </props> 
    </property> 
</bean> 

私は何をすべき?前もって感謝します。

答えて

0

EmailSenderJobとそのすべてのメンバーがSerializableを実装する必要があります。

+0

私は、JobDataAsMapエントリとして渡されるため、Serializableインターフェイスを実装するEmailServiceImplクラスを推測します。 – Waqas

+0

私はそれらの両方をシリアル化しようとしましたが、成功しませんでした。私はまだ同じエラーを取得しています。 – MartK

+0

@MartKあなたは受け取っている例外を投稿できますか? – Waqas

関連する問題