camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (CAMEL-1940) pollEnrich does not work with queue and quartz or timer endpoints
Date Mon, 31 Aug 2009 09:33:21 GMT

     [ https://issues.apache.org/activemq/browse/CAMEL-1940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen reassigned CAMEL-1940:
----------------------------------

    Assignee: Claus Ibsen

> pollEnrich does not work with queue and quartz or timer endpoints
> -----------------------------------------------------------------
>
>                 Key: CAMEL-1940
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1940
>             Project: Apache Camel
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Charles Moulliard
>            Assignee: Claus Ibsen
>             Fix For: 2.1.0
>
>
> Hi,
> In the following route example, the pollenrich processor is never called
> {code}
>             <camel:from uri="quartz://x3sReporting/clientError?cron=0+0/5+9-18+?+*+MON-FRI"/>
>             <camel:pollEnrich uri="queuingservice:x3s:reporting" strategyRef="queueAggregator"/>
>             <camel:transacted ref="PROPAGATION_REQUIRED_NEW" />
>             <camel:choice>
>                 <camel:when>
>                     <camel:simple>${body} != null</camel:simple>
>                     <camel:doTry>
>                         <camel:marshal ref="csvAuditBindyDataFormat" />
> {code}
> Definiton of the AggregationStrategy class used
> {code}
> public class QueueAggregator implements AggregationStrategy {
>    
>     private static final transient Log LOG = LogFactory.getLog(QueueAggregator.class);
>     public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
>         if (newExchange == null) {
>             LOG.info("Old object received (null exchange) : " + oldExchange.getIn().getBody().toString());
>             return oldExchange;
>         }
>         Object oldBody = oldExchange.getIn().getBody();
>         LOG.info("Old object received : " + oldBody.toString());
>         Object newBody = newExchange.getIn().getBody();
>         LOG.info("New object received : " + newBody.toString());
>         oldExchange.getIn().setBody(newBody);
>         return oldExchange;
>     }
> }
> {code}
> Unfortunately, the aggregator is not called (no info trace in the LOG) and the body object
send to the endpoint (marshall) is of type org.quartz.JobDetail
> {code}
> 11:10:02,703 | INFO  | heduler_Worker-1 | TraceInterceptor                 | rg.apache.camel.processor.Logger
  88 | ID-dell-charles-3372-1251127950838-0-10 >>> from(quartz://x3sReporting/clientError?cron=0+0%2F5+9-18+%3F+*+MON-FRI)
--> ref:PROPAGATION_REQUIRED_NEW, Pattern:InOnly, Headers:{triggerGroup=x3sReporting, jobInstance=org.apache.camel.component.quartz.CamelJob@1264f27,
nextFireTime=Tue Aug 25 11:15:00 CEST 2009, previousFireTime=null, 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, triggerName=clientError, trigger=Trigger 'x3sReporting.clientError':
 triggerClass: 'org.quartz.CronTrigger isVolatile: false calendar: 'null' misfireInstruction:
0 nextFireTime: Tue Aug 25 11:15:00 CEST 2009, scheduler=org.quartz.impl.StdScheduler@16975d,
jobRunTime=-1, scheduledFireTime=Tue Aug 25 11:10:00 CEST 2009, result=null, calendar=null,
mergedJobDataMap=org.quartz.JobDataMap@ccc462dc, refireCount=0, fireTime=Tue Aug 25 11:10:00
CEST 2009}, 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
> 11:10:02,718 | INFO  | heduler_Worker-1 | TraceInterceptor                 | rg.apache.camel.processor.Logger
  88 | ID-dell-charles-3372-1251127950838-0-10 >>> ref:PROPAGATION_REQUIRED_NEW -->
Choice, Pattern:InOnly, Headers:{triggerGroup=x3sReporting, jobInstance=org.apache.camel.component.quartz.CamelJob@1264f27,
nextFireTime=Tue Aug 25 11:15:00 CEST 2009, previousFireTime=null, 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, triggerName=clientError, trigger=Trigger 'x3sReporting.clientError':
 triggerClass: 'org.quartz.CronTrigger isVolatile: false calendar: 'null' misfireInstruction:
0 nextFireTime: Tue Aug 25 11:15:00 CEST 2009, scheduler=org.quartz.impl.StdScheduler@16975d,
jobRunTime=-1, scheduledFireTime=Tue Aug 25 11:10:00 CEST 2009, result=null, calendar=null,
mergedJobDataMap=org.quartz.JobDataMap@ccc462dc, refireCount=0, fireTime=Tue Aug 25 11:10:00
CEST 2009}, 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
> 11:10:02,734 | INFO  | heduler_Worker-1 | TraceInterceptor                 | rg.apache.camel.processor.Logger
  88 | ID-dell-charles-3372-1251127950838-0-10 >>> Choice --> Try, Pattern:InOnly,
Headers:{triggerGroup=x3sReporting, jobInstance=org.apache.camel.component.quartz.CamelJob@1264f27,
nextFireTime=Tue Aug 25 11:15:00 CEST 2009, previousFireTime=null, 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, triggerName=clientError, trigger=Trigger 'x3sReporting.clientError':
 triggerClass: 'org.quartz.CronTrigger isVolatile: false calendar: 'null' misfireInstruction:
0 nextFireTime: Tue Aug 25 11:15:00 CEST 2009, scheduler=org.quartz.impl.StdScheduler@16975d,
jobRunTime=-1, scheduledFireTime=Tue Aug 25 11:10:00 CEST 2009, result=null, calendar=null,
mergedJobDataMap=org.quartz.JobDataMap@ccc462dc, refireCount=0, fireTime=Tue Aug 25 11:10:00
CEST 2009}, 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
> 11:10:02,734 | INFO  | heduler_Worker-1 | TraceInterceptor                 | rg.apache.camel.processor.Logger
  88 | ID-dell-charles-3372-1251127950838-0-10 >>> Try -->, Pattern:InOnly, Headers:{triggerGroup=x3sReporting,
jobInstance=org.apache.camel.component.quartz.CamelJob@1264f27, nextFireTime=Tue Aug 25 11:15:00
CEST 2009, previousFireTime=null, 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, triggerName=clientError, trigger=Trigger 'x3sReporting.clientError':
 triggerClass: 'org.quartz.CronTrigger isVolatile: false calendar: 'null' misfireInstruction:
0 nextFireTime: Tue Aug 25 11:15:00 CEST 2009, scheduler=org.quartz.impl.StdScheduler@16975d,
jobRunTime=-1, scheduledFireTime=Tue Aug 25 11:10:00 CEST 2009, result=null, calendar=null,
mergedJobDataMap=org.quartz.JobDataMap@ccc462dc, refireCount=0, fireTime=Tue Aug 25 11:10:00
CEST 2009}, 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
> 11:10:03,171 | INFO  | heduler_Worker-1 | TraceInterceptor                 | rg.apache.camel.processor.Logger
 166 | ID-dell-charles-3372-1251127950838-0-10 >>> Try -->, Pattern:InOnly, Headers:{triggerGroup=x3sReporting,
jobInstance=org.apache.camel.component.quartz.CamelJob@1264f27, nextFireTime=Tue Aug 25 11:15:00
CEST 2009, previousFireTime=null, 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, triggerName=clientError, trigger=Trigger 'x3sReporting.clientError':
 triggerClass: 'org.quartz.CronTrigger isVolatile: false calendar: 'null' misfireInstruction:
0 nextFireTime: Tue Aug 25 11:15:00 CEST 2009, scheduler=org.quartz.impl.StdScheduler@16975d,
jobRunTime=-1, scheduledFireTime=Tue Aug 25 11:10:00 CEST 2009, result=null, calendar=null,
mergedJobDataMap=org.quartz.JobDataMap@ccc462dc, refireCount=0, fireTime=Tue Aug 25 11:10:00
CEST 2009}, 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
> 11:10:03,171 | INFO  | heduler_Worker-1 | TraceInterceptor                 | rg.apache.camel.processor.Logger
  88 | ID-dell-charles-3372-1251127950838-0-11 >>>  --> log://com.xpectis.x3s?level=INFO&multiline=true&showCaughtException=true&showException=true&showStackTrace=true,
Pattern:InOnly, Headers:{calendar=null, scheduledFireTime=Tue Aug 25 11:10:00 CEST 2009, trigger=Trigger
'x3sReporting.clientError':  triggerClass: 'org.quartz.CronTrigger isVolatile: false calendar:
'null' misfireInstruction: 0 nextFireTime: Tue Aug 25 11:15:00 CEST 2009, triggerGroup=x3sReporting,
previousFireTime=null, jobRunTime=-1, 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, result=null, triggerName=clientError, fireTime=Tue
Aug 25 11:10:00 CEST 2009, mergedJobDataMap=org.quartz.JobDataMap@ccc462dc, jobInstance=org.apache.camel.component.quartz.CamelJob@1264f27,
scheduler=org.quartz.impl.StdScheduler@16975d, refireCount=0, nextFireTime=Tue Aug 25 11:15:00
CEST 2009}, 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
> 11:10:03,187 | 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)
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message