camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dead_devil_66 <deathdevi...@hotmail.com>
Subject trying several parameters of FileComponent...
Date Sat, 19 Mar 2011 22:01:25 GMT
Greetings. 

I'm using one of the examples of the book "Camel in action". So far, no
problem with it. The problems start when i try to had more parameters to the
URI. For example, initialDelay or fileExist. Everytime i try to run the
program, i get an error like this: 

19/Mar/2011 20:38:41 org.apache.camel.impl.DefaultCamelContext 
INFO: JMX enabled. Using InstrumentationLifecycleStrategy. 
Exception in thread "main" org.apache.camel.ResolveEndpointFailedException:
Failed to resolve endpoint:
file:/home/echo66/data/inbox/?delete=true&initialDelay=1000 due to:
org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint:
file:/home/echo66/data/inbox/?delete=true&initialDelay=1000 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=[{initialDelay=1000}] 
        at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:294) 
        at
org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:52)

        at
org.apache.camel.model.RouteType.resolveEndpoint(RouteType.java:100) 
        at
org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:102) 
        at
org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:108) 
        at org.apache.camel.model.FromType.resolveEndpoint(FromType.java:73) 
        at
org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:77) 
        at org.apache.camel.model.RouteType.addRoutes(RouteType.java:214) 
        at org.apache.camel.model.RouteType.addRoutes(RouteType.java:90) 
        at
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:537)

        at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:529) 
        at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47) 
        at
myexample.camel.FileRouter.MyRouteBuilder.main(MyRouteBuilder.java:50) 
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
resolve endpoint:
file:/home/echo66/data/inbox/?delete=true&initialDelay=1000 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=[{initialDelay=1000}] 
        at
org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:94) 
        at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:270) 
        ... 12 more 




My code: 

public class RouteExample{ 

    /** 
     * A main() so we can easily run these routing rules in our IDE 
     * @throws Exception 
     */ 
    public static void main(String... args) throws Exception { 
    CamelContext context = new DefaultCamelContext(); 
                context.addRoutes(new RouteBuilder() { 
                        public void configure() { 
                                RouteType aux =
from("file:/home/echo66/data/inbox/?delete=true&initialDelay=1000"); 
                                aux.to("file:/home/echo66/data/outbox/"); 
//	 aux.to("file:/home/echo66/data/outbox2/"); 
                        } 
                }); 
                context.start(); 
    } 
} 

what is wrong????

--
View this message in context: http://camel.465427.n5.nabble.com/trying-several-parameters-of-FileComponent-tp4089201p4089201.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message