Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 3718 invoked from network); 21 Aug 2009 11:17:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Aug 2009 11:17:14 -0000 Received: (qmail 26526 invoked by uid 500); 21 Aug 2009 11:17:36 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 26480 invoked by uid 500); 21 Aug 2009 11:17:36 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 26465 invoked by uid 99); 21 Aug 2009 11:17:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Aug 2009 11:17:35 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of cmoulliard@gmail.com designates 209.85.220.216 as permitted sender) Received: from [209.85.220.216] (HELO mail-fx0-f216.google.com) (209.85.220.216) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Aug 2009 11:17:25 +0000 Received: by fxm12 with SMTP id 12so400088fxm.20 for ; Fri, 21 Aug 2009 04:17:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=gixThe/Qku7Igctb150XCPRRXSOXCxYHqeZKmtcFw7M=; b=Jzs//66lFrqT8ahMzUE3ViNGYAVWtQV5hC1ai8t/Tg3OYiGYtm7XUUtaukagauyd2D nFIpUguTwLXoOqjGQ+Isioux/Lxza6M7MlmxTIxYHKeKRhVHilxsv7ICSJzwmblFRMur 9tfd9A4EsLG31QXpoMXwvrC4oITwURrVqPvss= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=DH3/iUY6o9zcaq/Y8wrt/Qfpl5HgkckcsnCiOLLvsqqxZxWsdntnwcTc+PJJsETFYy A8+6GerrvrulAvr5r98ynLOabZRCtVESq08G7GcsWI+aQyxe5k06Cj2PHusdu3iDd10N O2wGwSVXCBh0w1XcoP4XoWUgR9ET6VGIDJMjY= MIME-Version: 1.0 Received: by 10.103.84.6 with SMTP id m6mr424923mul.26.1250853423173; Fri, 21 Aug 2009 04:17:03 -0700 (PDT) In-Reply-To: References: <4A8E5FD6.5070505@gmail.com> <5380c69c0908210157m5f79af2csffe6e8907dbb533f@mail.gmail.com> Date: Fri, 21 Aug 2009 13:17:03 +0200 Message-ID: Subject: Re: Camel & Quartz From: Charles Moulliard To: users@camel.apache.org Content-Type: multipart/alternative; boundary=0016e65ae914f452450471a5016c X-Virus-Checked: Checked by ClamAV on apache.org --0016e65ae914f452450471a5016c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I have also created the following route + aggregator java.lang.Exception but error : 13:10:02,013 | INFO | heduler_Worker-1 | TraceInterceptor | rg.apache.camel.processor.Logger 88 | ID-dell-charles-1326-1250837959638-0-92 >>> from(quartz://x3sReporting/clientError?cron=0+0%2F5+9-18+%3F+*+MON-FRI) --> ref:PROPAGATION_REQUIRED, Pattern:InOnly, Headers:{previousFireTime=null, nextFireTime=Fri Aug 21 13:15:00 CEST 2009, scheduler=org.quartz.impl.StdScheduler@785ad7, triggerGroup=x3sReporting, trigger=Trigger 'x3sReporting.clientError': triggerClass: 'org.quartz.CronTrigger isVolatile: false calendar: 'null' misfireInstruction: 0 nextFireTime: Fri Aug 21 13:15:00 CEST 2009, mergedJobDataMap=org.quartz.JobDataMap@ccc462dc, scheduledFireTime=Fri Aug 21 13:10:00 CEST 2009, fireTime=Fri Aug 21 13:10:00 CEST 2009, jobDetail=JobDetail 'DEFAULT.quartz://x3sReporting/clientError?cron=0+0%2F5+9-18+%3F+*+MON-FRI': jobClass: 'org.apache.camel.component.quartz.CamelJob isStateful: false isVolatile: false isDurable: false requestsRecovers: false, calendar=null, jobInstance=org.apache.camel.component.quartz.CamelJob@1940ed6, result=null, jobRunTime=-1, triggerName=clientError, refireCount=0}, BodyType:org.quartz.JobDetail, Body:JobDetail 'DEFAULT.quartz://x3sReporting/clientError?cron=0+0%2F5+9-18+%3F+*+MON-FRI': jobClass: 'org.apache.camel.component.quartz.CamelJob isStateful: false isVolatile: false isDurable: false requestsRecovers: false 13:10:02,013 | INFO | heduler_Worker-1 | TraceInterceptor | rg.apache.camel.processor.Logger 88 | ID-dell-charles-1326-1250837959638-0-92 >>> ref:PROPAGATION_REQUIRED --> Try, Pattern:InOnly, Headers:{previousFireTime=null, nextFireTime=Fri Aug 21 13:15:00 CEST 2009, scheduler=org.quartz.impl.StdScheduler@785ad7, triggerGroup=x3sReporting, trigger=Trigger 'x3sReporting.clientError': triggerClass: 'org.quartz.CronTrigger isVolatile: false calendar: 'null' misfireInstruction: 0 nextFireTime: Fri Aug 21 13:15:00 CEST 2009, mergedJobDataMap=org.quartz.JobDataMap@ccc462dc, scheduledFireTime=Fri Aug 21 13:10:00 CEST 2009, fireTime=Fri Aug 21 13:10:00 CEST 2009, jobDetail=JobDetail 'DEFAULT.quartz://x3sReporting/clientError?cron=0+0%2F5+9-18+%3F+*+MON-FRI': jobClass: 'org.apache.camel.component.quartz.CamelJob isStateful: false isVolatile: false isDurable: false requestsRecovers: false, calendar=null, jobInstance=org.apache.camel.component.quartz.CamelJob@1940ed6, result=null, jobRunTime=-1, triggerName=clientError, refireCount=0}, BodyType:org.quartz.JobDetail, Body:JobDetail 'DEFAULT.quartz://x3sReporting/clientError?cron=0+0%2F5+9-18+%3F+*+MON-FRI': jobClass: 'org.apache.camel.component.quartz.CamelJob isStateful: false isVolatile: false isDurable: false requestsRecovers: false 13:10:02,029 | INFO | heduler_Worker-1 | TraceInterceptor | rg.apache.camel.processor.Logger 88 | ID-dell-charles-1326-1250837959638-0-92 >>> Try -->, Pattern:InOnly, Headers:{previousFireTime=null, nextFireTime=Fri Aug 21 13:15:00 CEST 2009, scheduler=org.quartz.impl.StdScheduler@785ad7, triggerGroup=x3sReporting, trigger=Trigger 'x3sReporting.clientError': triggerClass: 'org.quartz.CronTrigger isVolatile: false calendar: 'null' misfireInstruction: 0 nextFireTime: Fri Aug 21 13:15:00 CEST 2009, mergedJobDataMap=org.quartz.JobDataMap@ccc462dc, scheduledFireTime=Fri Aug 21 13:10:00 CEST 2009, fireTime=Fri Aug 21 13:10:00 CEST 2009, jobDetail=JobDetail 'DEFAULT.quartz://x3sReporting/clientError?cron=0+0%2F5+9-18+%3F+*+MON-FRI': jobClass: 'org.apache.camel.component.quartz.CamelJob isStateful: false isVolatile: false isDurable: false requestsRecovers: false, calendar=null, jobInstance=org.apache.camel.component.quartz.CamelJob@1940ed6, result=null, jobRunTime=-1, triggerName=clientError, refireCount=0}, BodyType:org.quartz.JobDetail, Body:JobDetail 'DEFAULT.quartz://x3sReporting/clientError?cron=0+0%2F5+9-18+%3F+*+MON-FRI': jobClass: 'org.apache.camel.component.quartz.CamelJob isStateful: false isVolatile: false isDurable: false requestsRecovers: false 13:10:02,435 | INFO | heduler_Worker-1 | TraceInterceptor | rg.apache.camel.processor.Logger 166 | ID-dell-charles-1326-1250837959638-0-92 >>> Try -->, Pattern:InOnly, Headers:{previousFireTime=null, nextFireTime=Fri Aug 21 13:15:00 CEST 2009, scheduler=org.quartz.impl.StdScheduler@785ad7, triggerGroup=x3sReporting, trigger=Trigger 'x3sReporting.clientError': triggerClass: 'org.quartz.CronTrigger isVolatile: false calendar: 'null' misfireInstruction: 0 nextFireTime: Fri Aug 21 13:15:00 CEST 2009, mergedJobDataMap=org.quartz.JobDataMap@ccc462dc, scheduledFireTime=Fri Aug 21 13:10:00 CEST 2009, fireTime=Fri Aug 21 13:10:00 CEST 2009, jobDetail=JobDetail 'DEFAULT.quartz://x3sReporting/clientError?cron=0+0%2F5+9-18+%3F+*+MON-FRI': jobClass: 'org.apache.camel.component.quartz.CamelJob isStateful: false isVolatile: false isDurable: false requestsRecovers: false, calendar=null, jobInstance=org.apache.camel.component.quartz.CamelJob@1940ed6, result=null, jobRunTime=-1, triggerName=clientError, refireCount=0}, BodyType:org.quartz.JobDetail, Body:JobDetail 'DEFAULT.quartz://x3sReporting/clientError?cron=0+0%2F5+9-18+%3F+*+MON-FRI': jobClass: 'org.apache.camel.component.quartz.CamelJob isStateful: false isVolatile: false isDurable: false requestsRecovers: false, Exception: java.lang.ClassCastException: org.quartz.JobDetail 13:10:02,435 | INFO | heduler_Worker-1 | TraceInterceptor | rg.apache.camel.processor.Logger 88 | ID-dell-charles-1326-1250837959638-0-93 >>> --> log://com.xpectis.x3s?level=INFO&multiline=true&showCaughtException=true&showException=true&showStackTrace=true, Pattern:InOnly, Headers:{nextFireTime=Fri Aug 21 13:15:00 CEST 2009, jobDetail=JobDetail 'DEFAULT.quartz://x3sReporting/clientError?cron=0+0%2F5+9-18+%3F+*+MON-FRI': jobClass: 'org.apache.camel.component.quartz.CamelJob isStateful: false isVolatile: false isDurable: false requestsRecovers: false, refireCount=0, result=null, triggerGroup=x3sReporting, scheduler=org.quartz.impl.StdScheduler@785ad7, jobRunTime=-1, triggerName=clientError, fireTime=Fri Aug 21 13:10:00 CEST 2009, trigger=Trigger 'x3sReporting.clientError': triggerClass: 'org.quartz.CronTrigger isVolatile: false calendar: 'null' misfireInstruction: 0 nextFireTime: Fri Aug 21 13:15:00 CEST 2009, previousFireTime=null, calendar=null, scheduledFireTime=Fri Aug 21 13:10:00 CEST 2009, mergedJobDataMap=org.quartz.JobDataMap@ccc462dc, jobInstance=org.apache.camel.component.quartz.CamelJob@1940ed6}, BodyType:org.quartz.JobDetail, Body:JobDetail 'DEFAULT.quartz://x3sReporting/clientError?cron=0+0%2F5+9-18+%3F+*+MON-FRI': jobClass: 'org.apache.camel.component.quartz.CamelJob isStateful: false isVolatile: false isDurable: false requestsRecovers: false 13:10:02,435 | INFO | heduler_Worker-1 | x3s | rg.apache.camel.processor.Logger 88 | Exchange[ , BodyType:org.quartz.JobDetail , Body:JobDetail 'DEFAULT.quartz://x3sReporting/clientError?cron=0+0%2F5+9-18+%3F+*+MON-FRI': jobClass: 'org.apache.camel.component.quartz.CamelJob isStateful: false isVolatile: false isDurable: false requestsRecovers: false , CaughtExceptionType:java.lang.ClassCastException, CaughtExceptionMessage:org.quartz.JobDetail, StackTrace:java.lang.ClassCastException: org.quartz.JobDetail Charles Moulliard Senior Enterprise Architect Apache Camel Committer ***************************** blog : http://cmoulliard.blogspot.com On Fri, Aug 21, 2009 at 12:39 PM, Charles Moulliard wrote: > I have tried this : > > > uri="quartz://x3sReporting/clientError?cron=0+0/5+9-18+?+*+MON-FRI"/> > > > > > > but the error is still there : > > 12:35:02,451 | INFO | heduler_Worker-1 | x3s > | rg.apache.camel.processor.Logger 88 | Exchange[ > , BodyType:org.quartz.JobDetail > , Body:JobDetail > 'DEFAULT.quartz://x3sReporting/clientError?cron=0+0%2F5+9-18+%3F+*+MON-FRI': > jobClass: 'org.apache.camel.component.quartz.CamelJob isStateful: false > isVolatile: false isDurable: false requestsRecovers: false > , CaughtExceptionType:java.lang.ClassCastException, > CaughtExceptionMessage:org.quartz.JobDetail, > StackTrace:java.lang.ClassCastException: org.quartz.JobDetail > at > org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat.marshal(BindyCsvDataFormat.java:60) > > Charles Moulliard > Senior Enterprise Architect > Apache Camel Committer > > ***************************** > blog : http://cmoulliard.blogspot.com > > > On Fri, Aug 21, 2009 at 12:25 PM, Charles Moulliard wrote: > >> Claus, >> >> You mean to create a route like this : >> >> A) Option 1 >> >> > uri="quartz://x3sReporting/clientError?cron=0+0/5+9-18+?+*+MON-FRI"/> >> >> >> >> >> >> Question : >> - In my case, no enrichement is planned so which information must be put >> to replace ???? >> - How can we define the delay in spring DSL ? >> >> OR >> >> B) Option 2 >> >> >> >> >> Remark : In spring DSL, pollEnrich only accepts an uri but not a ref !! >> >> Is this approach better than using delayer EIP ? >> >> >> Charles Moulliard >> Senior Enterprise Architect >> Apache Camel Committer >> >> ***************************** >> blog : http://cmoulliard.blogspot.com >> >> >> On Fri, Aug 21, 2009 at 10:57 AM, Claus Ibsen wrote: >> >>> On Fri, Aug 21, 2009 at 10:50 AM, Willem Jiang >>> wrote: >>> > Hi Charles, >>> > >>> > I don't think the route rule will work for you. >>> > Please remember if your rule has the >>> > >>> > will send the message body to your report queue, not receive the >>> message for >>> > the report queue. >>> > >>> > Maybe you need find other way to trigge the jms consumer. >>> > >>> >>> .pollEnrich can consume for a endpoint. >>> >>> >>> > Willem >>> > >>> > Charles Moulliard wrote: >>> >> >>> >> Hi, >>> >> >>> >> I have configured my route to use quartz as a job scheduler to read >>> the >>> >> content of my queue every 5 minutes but unfortunately, the body type >>> send >>> >> to >>> >> marshal endpoint is of type "JobDetail" and not "List" as expected. >>> >> >>> >> 09:30:02,545 | INFO | heduler_Worker-1 | x3s >>> >> | >>> >> rg.apache.camel.processor.Logger 88 | Exchange[ >>> >> , BodyType:org.quartz.JobDetail >>> >> , Body:JobDetail >>> >> >>> >> >>> 'DEFAULT.quartz://x3sReporting/clientError?cron=0+0%2F5+9-18+%3F+*+MON-FRI': >>> >> jobClass: 'org.apache.camel.component.quartz.CamelJob isStateful: >>> false >>> >> isVolatile: false isDurable: false requestsRecovers: false >>> >> , CaughtExceptionType:java.lang.ClassCastException, >>> >> CaughtExceptionMessage:org.quartz.JobDetail, >>> >> StackTrace:java.lang.ClassCastException: org.quartz.JobDetail >>> >> at >>> >> >>> >> >>> org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat.marshal(BindyCsvDataFormat.java:60) >>> >> at >>> >> >>> >> >>> org.apache.camel.processor.MarshalProcessor.process(MarshalProcessor.java:52) >>> >> >>> >> Is my configuration wrong ? >>> >> >>> >> >>> >> >> >> uri="quartz://x3sReporting/clientError?cron=0+0/5+9-18+?+*+MON-FRI"/> >>> >> >>> >> >>> >> >>> >> >>> >> body is java.util.List >>> >> >>> >> >>> >> >>> >> >>> >> >>> java.lang.Exception >>> >> >> >> >>> >> >>> uri="log:com.xpectis.x3s?level=INFO&multiline=true&showException=true&showCaughtException=true&showStackTrace=true" >>> >> /> >>> >> >>> >> >>> >> >>> >> >>> >> >>> >> Regards, >>> >> >>> >> Charles Moulliard >>> >> Senior Enterprise Architect >>> >> Apache Camel Committer >>> >> >>> >> ***************************** >>> >> blog : http://cmoulliard.blogspot.com >>> >> >>> > >>> > >>> >>> >>> >>> -- >>> Claus Ibsen >>> Apache Camel Committer >>> >>> Open Source Integration: http://fusesource.com >>> Blog: http://davsclaus.blogspot.com/ >>> Twitter: http://twitter.com/davsclaus >>> >> >> > --0016e65ae914f452450471a5016c--