4 Replies Latest reply on Jun 11, 2013 10:32 AM by Ramzy JELASSI

    Trouble getting a CronScheduledRoutePolicy based job to work on  Fuse 7.1

    Ramzy JELASSI Newbie

      Hi all,

       

      i am experiencing serious troubles getting my first CronScheduledRoutePolicy based job to work under Fuse esb enterprise 7.1.

      The blueprint based project is so simple and has he following route

       

          <route id="testJob" routePolicyRef="startPolicy">

      <from uri="file:work/source1" />

      <to uri="file:work/source2" />

      <log message="Copying file $" />            

      </route>

       

      in an other hand the following bean is declared:

       

      <bean id="startPolicy" class="org.apache.camel.routepolicy.quartz.CronScheduledRoutePolicy">

      *<property name="routeStartTime" value="0 0/30 * * * ?"/>*

      </bean>

       

      i am using 2 dependencies in my pom.xml  file:

       

      <dependency>

      <groupId>org.apache.camel</groupId>

      <artifactId>camel-blueprint</artifactId>

      <version>2.10.0.fuse-71-047</version>

      <scope>provided</scope>

      </dependency>

       

      and 

      <dependency>

      <groupId>org.apache.camel</groupId>

      <artifactId>camel-quartz</artifactId>

      <version>2.10.0.fuse-71-047</version>

      </dependency>

       

      The goal as you can see is to copy all the files from source1 to source2  evry 30 minutes ...the result is really weired because after deploying the project as an osgi using FAB  ( no errors durring the deployment) , the job seems not to work :when i put new files into source1 they are immediately copied and the cron expression seems to be ignored!

       

      i have this stack trace in the log file:

       

      Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.

      NOT STARTED.

      Currently in standby mode.

      Number of jobs executed: 0

      Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.

      Using job-store 'org.quartz.simpl.testJobStore' - which does not support persistence. and is not clustered.

       

      I tried other cron expressions too, but i have exactly the same result !

       

       

      Can anyone help? i don't really see what is the problem here