Christian, So in this case, a new file is being written into the target folder with the Content "Camel Rocks".
But am looking to move a file from the source folder to the destination... how can i do that? using quartz schedule ! Thank you, Remya On Fri, Mar 22, 2013 at 5:56 PM, Christian Mueller [via Camel] < ml-node+s465427n5729705...@n5.nabble.com> wrote: > <route id="simple"> > <from uri="quartz://src/data?cron=0+16+*+*+*+?"/> > <log message="Writing message to Folder"/> > <setBody><constant>Camel rocks</constant></setBody> > <to uri="file:C:\Data\FuseJars\messages"/> > </route> > > Best, > Christian > > On Fri, Mar 22, 2013 at 10:15 PM, bru1900 <[hidden > email]<http://user/SendEmail.jtp?type=node&node=5729705&i=0>> > wrote: > > > Am sorry about my lack of understanding. > > > > But by adding <setBody><constant>Camel rocks</constant></setBody> to the > > file endpoint you mean? which file? > > > > This is my context file(that am executing) and the other is my msg file > ( > > present in src/data) > > > > > > On Fri, Mar 22, 2013 at 5:07 PM, Christian Mueller [via Camel] < > > [hidden email] <http://user/SendEmail.jtp?type=node&node=5729705&i=1>> > wrote: > > > > > By using "quartz://src/data" it looks like you want route messages > from > > > the > > > src/data folder. But in this case "src" is the timer group name and > > "data" > > > is the timer name. > > > And the quartz component sends an empty message (with a null body). > > That's > > > what the file component complians. If you add something like: > > > <setBody><constant>Camel rocks</constant></setBody> > > > > > > before your file endpoint, it should work... > > > > > > Best, > > > Christian > > > > > > On Fri, Mar 22, 2013 at 9:50 PM, bru1900 <[hidden email]< > > http://user/SendEmail.jtp?type=node&node=5729701&i=0>> > > > wrote: > > > > > > > I did look at these documents, in one of the examples, the suggested > > was > > > > > > > > from("quartz://myGroup/myTimerName?cron=0+0/5+12-18+?+*+MON-FRI"). > > > > > > > > i am trying to do a similar thing in xml configuration. Where am i > > going > > > > wrong? > > > > > > > > > > > > > > > > On Fri, Mar 22, 2013 at 4:47 PM, Christian Mueller [via Camel] < > > > > [hidden email] <http://user/SendEmail.jtp?type=node&node=5729701&i=1>> > > > > wrote: > > > > > > > > > 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 <[hidden email]< > > > > http://user/SendEmail.jtp?type=node&node=5729698&i=0>> > > > > > 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. > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > If you reply to this email, your message will be added to the > > > discussion > > > > > below: > > > > > > > > > > > > > > > > > > > > http://camel.465427.n5.nabble.com/Cannot-write-null-body-to-file-error-tp5729696p5729698.html > > > > > To unsubscribe from Cannot write null body to file error !, click > > > here< > > > > > > > > > > > > > . > > > > > NAML< > > > > > > > > > > http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > View this message in context: > > > > > > > > > > http://camel.465427.n5.nabble.com/Cannot-write-null-body-to-file-error-tp5729696p5729699.html > > > > > > > Sent from the Camel - Users mailing list archive at Nabble.com. > > > > > > > > > > > > > ------------------------------ > > > If you reply to this email, your message will be added to the > discussion > > > below: > > > > > > > > > http://camel.465427.n5.nabble.com/Cannot-write-null-body-to-file-error-tp5729696p5729701.html > > > > To unsubscribe from Cannot write null body to file error !, click > here< > > > > > > > . > > > NAML< > > > http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml > > > > > > > > > > > > camelContext.xml (1K) < > > http://camel.465427.n5.nabble.com/attachment/5729702/0/camelContext.xml> > > > message2.xml (286 bytes) < > > http://camel.465427.n5.nabble.com/attachment/5729702/1/message2.xml> > > > > > > > > > > -- > > View this message in context: > > > http://camel.465427.n5.nabble.com/Cannot-write-null-body-to-file-error-tp5729696p5729702.html > > > Sent from the Camel - Users mailing list archive at Nabble.com. > > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://camel.465427.n5.nabble.com/Cannot-write-null-body-to-file-error-tp5729696p5729705.html > To unsubscribe from Cannot write null body to file error !, click > here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5729696&code=cmFyZXJlbXlAZ21haWwuY29tfDU3Mjk2OTZ8LTE5Mzg3NTA5NjY=> > . > NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://camel.465427.n5.nabble.com/Cannot-write-null-body-to-file-error-tp5729696p5729760.html Sent from the Camel - Users mailing list archive at Nabble.com.