Your Quartz URI is not valid. You can read more about it at [1]. I think you are looking for the cron scheduled route policy [2].
[1] http://camel.apache.org/quartz.html [2] http://camel.apache.org/cronscheduledroutepolicy.html Best, Christian On Fri, Mar 22, 2013 at 8:45 PM, bru1900 <rarer...@gmail.com> wrote: > I am newly learning how to set up routes in camel, and Quartz schedule > them. > > I wrote a simple xml config, > <?xml version="1.0" encoding="UTF-8"?> > <beans xmlns="http://www.springframework.org/schema/beans" > xmlns:camel="http://camel.apache.org/schema/spring" > 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-3.0.xsd > http://camel.apache.org/schema/spring > http://camel.apache.org/schema/spring/camel-spring.xsd"> > > <camelContext trace="false" xmlns="http://camel.apache.org/schema/spring > "> > <route id="simple"> > > <from uri="quartz://src/data?cron=0+16+*+*+*+?"/> > <log message="Moving message to Folder"/> > <to uri="file:C:\Data\FuseJars\messages"/> > </route> > </camelContext> > > </beans> > > The simple file transfer works, but when i added the scheduling part am > getting the following error. > Any help will be highly appreciated. > > [artzScheduler-camel-1_Worker-5] QuartzEndpoint ERROR Error > processing exchange. Exchange[Message: [Body is null]]. Caused by: > [org.quartz.JobExecutionException - > org.apache.camel.component.file.GenericFileOperationFailedException: Cannot > write null body to file: > C:\Data\FuseJars\messages\ID-CGL-R8Y2AEZ-64638-1363878882438-0-29] > [artzScheduler-camel-1_Worker-5] JobRunShell INFO Job > DEFAULT.quartz-endpoint1 threw a JobExecutionException: > org.quartz.JobExecutionException: > org.apache.camel.component.file.GenericFileOperationFailedException: Cannot > write null body to file: > C:\Data\FuseJars\messages\ID-CGL-R8Y2AEZ-64638-1363878882438-0-29 [See > nested exception: > org.apache.camel.component.file.GenericFileOperationFailedException: Cannot > write null body to file: > C:\Data\FuseJars\messages\ID-CGL-R8Y2AEZ-64638-1363878882438-0-29] > at > > org.apache.camel.component.quartz.QuartzEndpoint.onJobExecute(QuartzEndpoint.java:117)[camel-quartz-2.10.0.fuse-71-047.jar:2.10.0.fuse-71-047] > at > > org.apache.camel.component.quartz.CamelJob.execute(CamelJob.java:54)[camel-quartz-2.10.0.fuse-71-047.jar:2.10.0.fuse-71-047] > at > org.quartz.core.JobRunShell.run(JobRunShell.java:216)[quartz-1.8.5.jar:] > at > > org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)[quartz-1.8.5.jar:] > [artzScheduler-camel-1_Worker-6] simple INFO > Moving > message to Folder > [ > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Cannot-write-null-body-to-file-error-tp5729696.html > Sent from the Camel - Users mailing list archive at Nabble.com. >