camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Moulliard <cmoulli...@gmail.com>
Subject Camel & Quartz
Date Fri, 21 Aug 2009 07:36:21 GMT
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 ?

        <camel:route errorHandlerRef="txErrorHandler">
            <camel:from
uri="quartz://x3sReporting/clientError?cron=0+0/5+9-18+?+*+MON-FRI"/>
            <camel:to ref="queueReportingEndpoint" />
            <camel:transacted ref="PROPAGATION_REQUIRED" />
            <camel:doTry>
                <camel:filter>
                    <camel:simple>body is java.util.List</camel:simple>
                </camel:filter>
                <camel:marshal ref="csvAuditBindyDataFormat" />
                <camel:to ref="fileReportingEndpoint" />
                <camel:doCatch>
                    <camel:exception>java.lang.Exception</camel:exception>
                    <camel:to
uri="log:com.xpectis.x3s?level=INFO&amp;multiline=true&amp;showException=true&amp;showCaughtException=true&amp;showStackTrace=true"
/>
                    <camel:rollback />
                </camel:doCatch>
            </camel:doTry>
        </camel:route>

Regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message