camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atte <atte.he...@gmail.com>
Subject Quartz component with Cron expression fails to start
Date Wed, 15 Dec 2010 09:00:25 GMT

Hi,
I have developed a route with Java DSL and am using Camel 2.4.0-fuse-02-00.
I use Spring to wire up the works and write my routes with Java DSL.

I have the following route:

from("quartz:Import?cron=0+0/5+9+?+*+MON-FRI+*")
.to("bean:exportRequestGenerator?method=getExportRequest")
.log("Generated Export Request");

And when I try to run it, I get the following exception:


Exception in thread "main" org.apache.camel.RuntimeCamelException:
org.apache.camel.FailedToCreateRouteException: Failed to create route
route1: Route[[From[quartz:Import?cron=0+0/5+9+?+*+MON-FRI+*]]... because of
Failed to resolve endpoint: quartz://Import?%2B*%2BMON-FRI%2B* due to:
Failed to resolve endpoint: quartz://Import?%2B*%2BMON-FRI%2B* due to: There
are 1 parameters that couldn't be set on the endpoint. Check the uri if the
parameters are spelt correctly and that they are properties of the endpoint.
Unknown parameters=[{%2B*%2BMON-FRI%2B*=null}]
	at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1133)
	at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)
	at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:231)
	at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
	at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)
	at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)
	at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
	at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
	at
org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:219)
	at org.apache.camel.spring.Main.doStart(Main.java:173)
	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:56)
	at org.apache.camel.impl.MainSupport.run(MainSupport.java:114)
	at org.apache.camel.impl.MainSupport.run(MainSupport.java:291)
	at org.apache.camel.spring.Main.main(Main.java:97)
	at com.xxx.integration.yyy.yyyRoute.main(yyyRoute.java:41)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:115)
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create
route route1: Route[[From[quartz:Import?cron=0+0/5+9+?+*+MON-FRI+*]]...
because of Failed to resolve endpoint: quartz://Import?%2B*%2BMON-FRI%2B*
due to: Failed to resolve endpoint: quartz://Import?%2B*%2BMON-FRI%2B* due
to: There are 1 parameters that couldn't be set on the endpoint. Check the
uri if the parameters are spelt correctly and that they are properties of
the endpoint. Unknown parameters=[{%2B*%2BMON-FRI%2B*=null}]
	at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:143)
	at
org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:559)
	at
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1207)
	at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1076)
	at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:986)
	at
org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:164)
	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:56)
	at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:946)
	at
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:203)
	at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101)
	... 19 more
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
resolve endpoint: quartz://Import?%2B*%2BMON-FRI%2B* due to: Failed to
resolve endpoint: quartz://Import?%2B*%2BMON-FRI%2B* due to: There are 1
parameters that couldn't be set on the endpoint. Check the uri if the
parameters are spelt correctly and that they are properties of the endpoint.
Unknown parameters=[{%2B*%2BMON-FRI%2B*=null}]
	at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:391)
	at
org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:47)
	at
org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:153)
	at
org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:110)
	at
org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:116)
	at
org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:73)
	at
org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:88)
	at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:698)
	at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:138)
	... 28 more
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
resolve endpoint: quartz://Import?%2B*%2BMON-FRI%2B* due to: There are 1
parameters that couldn't be set on the endpoint. Check the uri if the
parameters are spelt correctly and that they are properties of the endpoint.
Unknown parameters=[{%2B*%2BMON-FRI%2B*=null}]
	at
org.apache.camel.impl.DefaultComponent.validateParameters(DefaultComponent.java:126)
	at
org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:89)
	at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:370)
	... 36 more
[                      Thread-1] Main$HangupInterceptor         INFO 
Received hang up - stopping the main instance.


I tried removing the ?-character, what seems to be the cause here. Once I do
so, I get forward and get a CronExpression exception, because the expression
is no longer valid. 

How can I get past this?
-- 
View this message in context: http://camel.465427.n5.nabble.com/Quartz-component-with-Cron-expression-fails-to-start-tp3305928p3305928.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message