Re: [feature request] Reporting startup failure
I got the exception just like this: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route(route1)[[From[direct:in?concurrentConsumers=2]] - [Be... because of Failed to resolve endpoint: direct://in?concurrentConsumers=2 due to: Failed to resolve endpoint: direct://in?concurrentConsumers=2 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=[{concurrentConsumers=2}] at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:188) at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:821) at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:2563) at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:2286) at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2146) at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2114) at org.apache.camel.ContextTestSupport.startCamelContext(ContextTestSupport.java:174) at org.apache.camel.ContextTestSupport.setUp(ContextTestSupport.java:117) at org.apache.camel.processor.BeanRouteTest.setUp(BeanRouteTest.java:61) at junit.framework.TestCase.runBare(TestCase.java:139) at org.apache.camel.TestSupport.runBare(TestSupport.java:58) at junit.framework.TestResult$1.protect(TestResult.java:122) at junit.framework.TestResult.runProtected(TestResult.java:142) at junit.framework.TestResult.run(TestResult.java:125) at junit.framework.TestCase.run(TestCase.java:129) at junit.framework.TestSuite.runTest(TestSuite.java:255) at junit.framework.TestSuite.run(TestSuite.java:250) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: direct://in?concurrentConsumers=2 due to: Failed to resolve endpoint: direct://in?concurrentConsumers=2 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=[{concurrentConsumers=2}] at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:563) at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:79) at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:198) at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:107) at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:113) at org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:67) at org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:89) at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:993) at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:183) ... 24 more Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: direct://in?concurrentConsumers=2 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=[{concurrentConsumers=2}] at org.apache.camel.impl.DefaultComponent.validateParameters(DefaultComponent.java:182) at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:127) at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:543) ... 32 more -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On January 10, 2015 at 3:27:34 PM, Claus Ibsen (claus.ib...@gmail.com) wrote: Hi Can you double check the logs as Camel should report invalid options. On Fri, Jan 9, 2015 at 3:14 PM, Chris Melikian wrote: Hi, I'm
Re: Check endpoints available without looking into the endpoints cache
You can use applicationContext.getBean(name) to look up the endpoint that you want to use. The applicationContext can be got from SpringCamelContext. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On January 9, 2015 at 8:03:54 PM, rsoleto (ruben.soleto.buenva...@tecsisa.com) wrote: Hi all, I'm using Camel 2.12.3. I've the same problem that Aida says with hasEndpoint() method in thread [1]. I have been looking for some solution using lookup methods of Camel context registry but without luck. The main problem is registry has endpoints that I declare in Spring context but my routes are in Java DSL. I tried method that getEndopint() using ref:nameEndpoint and nameEndpoint but it isn't work because first String produces an error because says: - org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: ref://seda:miOwnEndpoint due to: No bean could be found in the registry for: seda:miOwnEndpoint of type: org.apache.camel.Endpoint Second String retrieves the endpoint that I want but if it doesn't exist Camel creates new one and I miss exchange when producer template sends the message. Because of that I need one way to check all available endpoints regardless of endpoints cache. [1] http://camel.465427.n5.nabble.com/camelContext-hasEndpoint-returns-null-when-endpoint-apparently-exists-td5757907.html Thanks in advance. rsoleto. -- View this message in context: http://camel.465427.n5.nabble.com/Check-endpoints-available-without-looking-into-the-endpoints-cache-tp5761516.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: S3 route problem when access key and secret key are in URI
You can use raw()[1] to wrap the access key and secret key to avoid the encoding of URI. [1]https://camel.apache.org/configuring-camel.html#ConfiguringCamel-Configuringparametervaluesusingrawvalues,egsuchaspasswords -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On January 10, 2015 at 5:02:14 AM, Shing Hing Man (mat...@yahoo.com.invalid) wrote: I am using Camel 2.14.1 When I build a S3 route and specify the accessKey and secretKey in the URI, I got the following exception.(Note that I have URL encoded my secret key so that + is replaced by %2B. ) String awsURLTemplate=aws-s3://%s?accessKey=%ssecretKey=%s®ion=eu-west-1; final String awsURL = String.format(awsURLTemplate,bucketName, accessKey,secretKey); DefaultCamelContext context = new DefaultCamelContext(); context.addRoutes(new RouteBuilder() { public void configure() { from(direct:start).to(awsURL).to(stream:out); } }); Exception in thread main org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: To[aws-s3://myBucket?accessKey=***secretKey=***®ion=eu-west-1] in route: Route(route1)[[From[direct:start]] - [To[aws-s3://... because of Failed to resolve endpoint: aws-s3://myBucket?accessKey=***®ion=eu-west-1secretKey= due to: The request signature we calculated does not match the signature you provided. Check your key and signing method. (Service: Amazon S3; Status Code: 403; Error Code: SignatureDoesNotMatch; Request ID: C227F0C1D0D16660) at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:945) at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:187) at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:805) at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:2174) at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1906) at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1767) at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1735) at net.sf.camel.s3.S3Demo2.run(S3Demo2.java:58) But it works if the accessKey and secretKey are specified in a registry as described in http://camel.apache.org/aws-s3.html Thanks in advance for any assistance ! Shing
Re: http client - javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
You can setup the sslContext by implementing a HttpClientConfigurer[1]. [1]https://camel.apache.org/http4#HTTP4-ConfiguringApacheHTTPClientDirectly -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On January 10, 2015 at 2:53:00 PM, salemi (sal...@avaya.com) wrote: Hi, Thanks for your respond. My problem is that I am running in a container and there is api that return the sslcontext to me and I have to use the provided sslcontext. See the code below. SSLContext sslContext = SSLUtilityFactory.createSSLContext(); How can I tell https4 to use the sslcontext provided? Thanks, Ali - Alireza Salemi -- View this message in context: http://camel.465427.n5.nabble.com/http-client-javax-net-ssl-SSLHandshakeException-Received-fatal-alert-handshake-failure-tp5761469p5761538.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: http client - javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
Hi, Thanks for your respond. My problem is that I am running in a container and there is api that return the sslcontext to me and I have to use the provided sslcontext. See the code below. SSLContext sslContext = SSLUtilityFactory.createSSLContext(); How can I tell https4 to use the sslcontext provided? Thanks, Ali - Alireza Salemi -- View this message in context: http://camel.465427.n5.nabble.com/http-client-javax-net-ssl-SSLHandshakeException-Received-fatal-alert-handshake-failure-tp5761469p5761538.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Irrecoverable faults
Current Camel ErrorHandler just provides a way to let you handle the error. Even it provides retry mechanism, you still can do some work for the Irrecoverable error. With the ControlBus[1], you can stop the route which has the irrecoverable faults. If you want to stop the message, you can setup the exchange stop header to be true just like this: exchange.setProperty(Exchange.ROUTE_STOP, Boolean.TRUE); [1]https://camel.apache.org/controlbus.html -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On January 9, 2015 at 5:53:32 PM, James Green (james.mk.gr...@gmail.com) wrote: Should we avoid issuing these? We are implementing some checks that ask, for example, Is the customer allowed to do this? And if the answer is no we're treating this as irrecoverable. Map this to irrecoverable according to Camel in Action Ch 5, Error Handling. Yet this chapter barely touches irrecoverable errors, focusing almost entirely on recoverable errors which are Throwables from the route. The web site also seems to have the same focus. Am I modelling this in my mind? When Camel thinks of irrecoverable, does it consider this as a stop the runtime type of error or stop the message type of error? And am I barking up the wrong tree entirely - should all business logic checks that fail actually be considered recoverable according to Camel? N.B. I noticed Google has reference to a years-old discussion suggesting to remove Fault, which has raised alarm bells in my thinking too. Thanks, James
Re: [feature request] Reporting startup failure
Hi Can you double check the logs as Camel should report invalid options. On Fri, Jan 9, 2015 at 3:14 PM, Chris Melikian ch...@melikian.net wrote: Hi, I'm running 2.14.0 and I had a route which I'd changed from the seda to direct endpoint. I left a ?concurrentConsumers=2 on the URI using the Java DSL. When I started camel the application would start but would shut down again immediately. It took me a while to realise that there was a parameter on the URI which was not valid for the direct component. Camel didn't report an error in the logs at all but just failed silently. Would be good to throw an exception or add some sort of message to highlight the issue. To recreate, use:- @Override public void configure() throws Exception { from(direct:willFail?concurrentConsumers=2) .to(mock:wontReachHere); } Cheers, Chris. -- View this message in context: http://camel.465427.n5.nabble.com/feature-request-Reporting-startup-failure-tp5761531.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
Re: onException is ignored
If the Exception is thrown from the source() endpoint, the onException error handler won’t work as you expected. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On January 10, 2015 at 1:38:52 AM, James Green (james.mk.gr...@gmail.com) wrote: Project is Spring based with Camel 2.14 and the following configuration: onException(AccountNotFoundException.class) .log(Account Not Found. Message discarded.).to(jms:queue:RouterAccountNotFound).stop(); errorHandler(transactionErrorHandler().maximumRedeliveries(3)); from(source()) .transacted() .unmarshal(jacksonUnmarshall) .process(router) .recipientList(simple(${body.media})); We have a JMS connection and a JPA connection wrapped in a Atomikos transaction manager (a XA transaction manager I understand to be required). The above errorHandler triggers if the router throws an Exception, but the onException statement does not fire despite the logs recording the AccountNotFoundException being caught by Camel. Consequently the log()ing and the RouterAccountNotFound queue do not fire at all. The documentation suggests onException should be usable at this point. Can anyone suggest why the above only partly works? Thanks, James
Re: onException is ignored
Since you use transactions then sending a message to a JMS queue is also rolled back, and hence the onException appears to not send the message to the account not found queue. But its because the tx is rolled back. You can define a 2nd jms component, eg using a different name than jms, that does not become part of the same tx, and use that in the onException. On Fri, Jan 9, 2015 at 6:38 PM, James Green james.mk.gr...@gmail.com wrote: Project is Spring based with Camel 2.14 and the following configuration: onException(AccountNotFoundException.class) .log(Account Not Found. Message discarded.).to(jms:queue:RouterAccountNotFound).stop(); errorHandler(transactionErrorHandler().maximumRedeliveries(3)); from(source()) .transacted() .unmarshal(jacksonUnmarshall) .process(router) .recipientList(simple(${body.media})); We have a JMS connection and a JPA connection wrapped in a Atomikos transaction manager (a XA transaction manager I understand to be required). The above errorHandler triggers if the router throws an Exception, but the onException statement does not fire despite the logs recording the AccountNotFoundException being caught by Camel. Consequently the log()ing and the RouterAccountNotFound queue do not fire at all. The documentation suggests onException should be usable at this point. Can anyone suggest why the above only partly works? Thanks, James -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
Re: Help: FTP/SFTP File Delete Problem and FTP/SFTP Polling Problem
Try with newer release, there may have been a bug fix On Fri, Jan 9, 2015 at 6:47 PM, yeandone willcours...@gmail.com wrote: HI, Claus. Thanks for the prompt reply! I am using Camel 2.12. I also tried adding aync=true in controlbus to uri=controlbus:route?routeId=A_Routeamp;aync=trueamp;action=stop / It does help delete the file, but it has some issues with polling. Until the file get deleted and control bus stops, the route still keeps polling for a while. What I want to do is deleting original file after it's processed by direct: a and direct: b and then stop the route which will stop the file polling from the sftp location. If nothing is picked, then I want to do some processing in direct:b and then stop the route and polling immediately. Any ideas to resolve the issue? Thanks -- View this message in context: http://camel.465427.n5.nabble.com/Help-FTP-SFTP-File-Delete-Problem-and-FTP-SFTP-Polling-Problem-tp5761486p5761535.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
Re: [SQL COMPONENTE] CamelSqlGeneratedKeyRows has a bug?
Hi Fabrizio here's what is wrong with your example: - to uri=jdbc://mysql / means you're using JDBC component, not SQL component - so you should use setHeader headerName=CamelRetrieveGeneratedKeys, not setHeader headerName=CamelSqlRetrieveGeneratedKeys - you should also use simple${in.headers.CamelGeneratedKeysRows}/simple, not simple${out.header.CamelSqlGeneratedKeyRows}/simple because generated keys stored in out are available in in of the next processor - add to uri=log:generated keys?showAll=trueamp;multiline=true / after setBody to see: [ qtp1540453036-19] generated keys INFO Exchange[ ... *, Body: [{GENERATED_KEY=12}]* ... ] regards Grzegorz 2015-01-08 16:16 GMT+01:00 Claus Ibsen claus.ib...@gmail.com: Hi See this FAQ http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html Rule of thumb, dont use out. On Thu, Jan 8, 2015 at 3:37 PM, fabrizio.spataro fabrizio.spat...@bizmate.it wrote: Hello, So.. is it a bug? I haven't any information about generated keys (OUT Message is null) this is my code: spring DSL camel:camelContext xmlns=http://camel.apache.org/schema/spring; camel:restConfiguration bindingMode=auto component=jetty host=0.0.0.0 port=8080/ camel:rest path=/api camel:get uri=/doIt produces=application/json camel:route setHeader headerName=CamelSqlRetrieveGeneratedKeys constanttrue/constant /setHeader setBody constant insert into company (id, name, description, email) values (0, 'myName', '', 'he...@camel.com') /constant /setBody to uri=log:executing query?showAll=trueamp;multiline=true/ to uri=jdbc://mysql / setBody simple${out.header.CamelSqlGeneratedKeyRows}/simple /setBody /camel:route /camel:get /camel:rest /camel:camelContext I had attach full example code package RetrieveGeneratedKey.zip http://camel.465427.n5.nabble.com/file/n5761460/RetrieveGeneratedKey.zip -- View this message in context: http://camel.465427.n5.nabble.com/SQL-COMPONENT-CamelSqlGeneratedKeyRows-has-a-bug-tp5761113p5761460.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
Re: [SQL COMPONENTE] CamelSqlGeneratedKeyRows has a bug?
Of course! I never want to use out message but reading example code (posted by Grzegorz Grzybek) i suppose that *CamelSqlGeneratedKeyRows * variable set into it. code: // assertions of the response assertNotNull(out); assertNotNull(out.getOut()); assertNotNull(out.getOut().getHeader(SqlConstants.SQL_GENERATED_KEYS_DATA)); (source: https://github.com/apache/camel/blob/camel-2.14.1/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlGeneratedKeysTest.java#L70-L97) This variable is not present even into in message headers. My attach code test what I'm saying. Can you run it? Thnkx everyone! -- View this message in context: http://camel.465427.n5.nabble.com/SQL-COMPONENT-CamelSqlGeneratedKeyRows-has-a-bug-tp5761113p5761506.html Sent from the Camel - Users mailing list archive at Nabble.com.
error in reading FaceBook Endpoints
Hi , I have the following ruoute to integrate with Facebook APIs, *route id=READINBOX from uri=facebook://getAccounts?oAuthAppId=**amp;oAuthAppSecret=***2d0bae49d37afec5 / log logName=INPUT loggingLevel=INFO message=PAYLOAD RECIEVED AT THE STUB ${body}/ to uri=mock:end/ /route* The route fails to read from the getAccounts endpoint resulting in following error *[ad #0 - facebook://getAccounts] FacebookConsumer WARN Consumer Consumer[facebook://getAccounts?oAuthAppId=395905433905233oAuthAppSecret=417d6b48afe10f402d0bae49d37afec5] failed polling endpoint: Endpoint[facebook://getAccounts?oAuthAppId=395905433905233oAuthAppSecret=417d6b48afe10f402d0bae49d37afec5]. Will try again at next poll. Caused by: [org.apache.camel.RuntimeCamelException - FacebookException [statusCode=-1, response=null, errorType=null, errorMessage=null, errorCode=-1]] org.apache.camel.RuntimeCamelException: FacebookException [statusCode=-1, response=null, errorType=null, errorMessage=null, errorCode=-1] at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1364)[camel-core-2.14.0.jar:2.14.0] at org.apache.camel.component.facebook.FacebookConsumer.poll(FacebookConsumer.java:178)[camel-facebook-2.14.0.jar:2.14.0] at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187)[camel-core-2.14.0.jar:2.14.0] at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114)[camel-core-2.14.0.jar:2.14.0] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_04] at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)[:1.7.0_04] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)[:1.7.0_04] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)[:1.7.0_04] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.7.0_04] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_04] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_04] at java.lang.Thread.run(Thread.java:722)[:1.7.0_04] [ad #0 - facebook://getAccounts] FacebookConsumer WARN Consumer Consumer[facebook://getAccounts?oAuthAppId=395905433905233oAuthAppSecret=417d6b48afe10f402d0bae49d37afec5] failed polling endpoint: Endpoint[facebook://getAccounts?oAuthAppId=395905433905233oAuthAppSecret=417d6b48afe10f402d0bae49d37afec5]. Will try again at next poll. Caused by: [org.apache.camel.RuntimeCamelException - Error invoking getAccounts with {reading=Reading [since=2015-01-09T14%3A47%3A57%2B0530until=2015-01-09T14%3A48%3A18%2B0530]}: null] org.apache.camel.RuntimeCamelException: Error invoking getAccounts with {reading=Reading [since=2015-01-09T14%3A47%3A57%2B0530until=2015-01-09T14%3A48%3A18%2B0530]}: null at org.apache.camel.component.facebook.data.FacebookMethodsTypeHelper.invokeMethod(FacebookMethodsTypeHelper.java:361)[camel-facebook-2.14.0.jar:2.14.0] at org.apache.camel.component.facebook.FacebookConsumer.poll(FacebookConsumer.java:154)[camel-facebook-2.14.0.jar:2.14.0] at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187)[camel-core-2.14.0.jar:2.14.0] at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114)[camel-core-2.14.0.jar:2.14.0] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_04] at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)[:1.7.0_04] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)[:1.7.0_04] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)[:1.7.0_04] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.7.0_04] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_04] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_04] at java.lang.Thread.run(Thread.java:722)[:1.7.0_04] * Whats the possible cause for the error? Thanks, Mahesh - Thanks And regards, Mahesh -- View this message in context: http://camel.465427.n5.nabble.com/error-in-reading-FaceBook-Endpoints-tp5761510.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Help: FTP/SFTP File Delete Problem and FTP/SFTP Polling Problem
Hi What version of Camel do you use? Also you can try set async=true on the controlbus On Fri, Jan 9, 2015 at 8:05 AM, yeandone willcours...@gmail.com wrote: Hi, All. I have an issue deleting a file with delete=true from a SFTP consumer. My route looks like the following: route id=A_ROUTE from uri=sftp:am...@xxx.com?password=xxxamp;delete=trueamp;filter=#fileFilter/ choice when simple${body} != null/simple multicast to uri=direct:a/ to uri=direct:b/ /multicast /when otherwise to uri=direct:b/ /otherwise /choice to uri=controlbus:route?routeId=A_Routeamp;action=stop / /route whenever it runs, it will end up WARN Camel (platformSchedulerCamel) thread #7 - sftp://xxx org.apache.camel.component.file.GenericFileOnCompletion - Rollback file strategy: org.apache.camel.component.file.strategy.GenericFileDeleteProcessStrategy@4b474b47 for file: RemoteFile[a.txt] Does anyone have any idea why it happens? What I want to do is deleting original file after it's processed by direct: a and direct: b and then stop the route which will stop the file polling from the sftp location. If nothing is picked, then I want to do some processing in direct:b and then stop the route. If I remove to uri=controlbus:route?routeId=A_Routeamp;action=stop / at the end, the file will be deleted. However, the sftp consumer will never stop and keep polling stfp, which I do not want to happen. Any help or any ideas will be appreciated!!! Thanks, W -- View this message in context: http://camel.465427.n5.nabble.com/Help-FTP-SFTP-File-Delete-Problem-and-FTP-SFTP-Polling-Problem-tp5761486.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
Irrecoverable faults
Should we avoid issuing these? We are implementing some checks that ask, for example, Is the customer allowed to do this? And if the answer is no we're treating this as irrecoverable. Map this to irrecoverable according to Camel in Action Ch 5, Error Handling. Yet this chapter barely touches irrecoverable errors, focusing almost entirely on recoverable errors which are Throwables from the route. The web site also seems to have the same focus. Am I modelling this in my mind? When Camel thinks of irrecoverable, does it consider this as a stop the runtime type of error or stop the message type of error? And am I barking up the wrong tree entirely - should all business logic checks that fail actually be considered recoverable according to Camel? N.B. I noticed Google has reference to a years-old discussion suggesting to remove Fault, which has raised alarm bells in my thinking too. Thanks, James
How to implement Camel Request/Reply on a topic with multiple services?
So, I have a number of services. Each service handles a type of unique Request. However, the service needs to examine the request before knowing if it can service it. The client want's the request serviced, but does not care to know who did the servicing. I was thinking of using (ActiveMQ virtual) topic Camel's Request/Reply pattern http://camel.apache.org/request-reply.html to implement this interaction (because the client is waiting on a reply), but I am not sure how to consume the message without returning a response. Specifically, a service may realized that it cannot handle the Request it has just received. This may not even be the best approach to solving this issue, so any comments on better approaches are welcome. Thanks. -AP_
onException is ignored
Project is Spring based with Camel 2.14 and the following configuration: onException(AccountNotFoundException.class) .log(Account Not Found. Message discarded.).to(jms:queue:RouterAccountNotFound).stop(); errorHandler(transactionErrorHandler().maximumRedeliveries(3)); from(source()) .transacted() .unmarshal(jacksonUnmarshall) .process(router) .recipientList(simple(${body.media})); We have a JMS connection and a JPA connection wrapped in a Atomikos transaction manager (a XA transaction manager I understand to be required). The above errorHandler triggers if the router throws an Exception, but the onException statement does not fire despite the logs recording the AccountNotFoundException being caught by Camel. Consequently the log()ing and the RouterAccountNotFound queue do not fire at all. The documentation suggests onException should be usable at this point. Can anyone suggest why the above only partly works? Thanks, James
Re: Help: FTP/SFTP File Delete Problem and FTP/SFTP Polling Problem
HI, Claus. Thanks for the prompt reply! I am using Camel 2.12. I also tried adding aync=true in controlbus to uri=controlbus:route?routeId=A_Routeamp;aync=trueamp;action=stop / It does help delete the file, but it has some issues with polling. Until the file get deleted and control bus stops, the route still keeps polling for a while. What I want to do is deleting original file after it's processed by direct: a and direct: b and then stop the route which will stop the file polling from the sftp location. If nothing is picked, then I want to do some processing in direct:b and then stop the route and polling immediately. Any ideas to resolve the issue? Thanks -- View this message in context: http://camel.465427.n5.nabble.com/Help-FTP-SFTP-File-Delete-Problem-and-FTP-SFTP-Polling-Problem-tp5761486p5761535.html Sent from the Camel - Users mailing list archive at Nabble.com.
S3 route problem when access key and secret key are in URI
I am using Camel 2.14.1 When I build a S3 route and specify the accessKey and secretKey in the URI, I got the following exception.(Note that I have URL encoded my secret key so that + is replaced by %2B. ) String awsURLTemplate=aws-s3://%s?accessKey=%ssecretKey=%sregion=eu-west-1; final String awsURL = String.format(awsURLTemplate,bucketName, accessKey,secretKey); DefaultCamelContext context = new DefaultCamelContext(); context.addRoutes(new RouteBuilder() { public void configure() { from(direct:start).to(awsURL).to(stream:out); } }); Exception in thread main org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: To[aws-s3://myBucket?accessKey=***secretKey=***region=eu-west-1] in route: Route(route1)[[From[direct:start]] - [To[aws-s3://... because of Failed to resolve endpoint: aws-s3://myBucket?accessKey=***region=eu-west-1secretKey= due to: The request signature we calculated does not match the signature you provided. Check your key and signing method. (Service: Amazon S3; Status Code: 403; Error Code: SignatureDoesNotMatch; Request ID: C227F0C1D0D16660) at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:945) at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:187) at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:805) at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:2174) at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1906) at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1767) at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1735) at net.sf.camel.s3.S3Demo2.run(S3Demo2.java:58) But it works if the accessKey and secretKey are specified in a registry as described in http://camel.apache.org/aws-s3.html Thanks in advance for any assistance ! Shing
Re: [SQL COMPONENTE] CamelSqlGeneratedKeyRows has a bug?
Fabrizio I've fixed your example. dont' use CamelSqlGeneratedKeyRows, use CamelGeneratedKeyRows because you're using JdbcComponent, not SqlComponent. Plus - this test aserts availability of headers in out - right, but those are copied to in of next (e.g. setBody) processor. regards Grzegorz 2015-01-09 9:40 GMT+01:00 fabrizio.spataro fabrizio.spat...@bizmate.it: Of course! I never want to use out message but reading example code (posted by Grzegorz Grzybek) i suppose that *CamelSqlGeneratedKeyRows * variable set into it. code: // assertions of the response assertNotNull(out); assertNotNull(out.getOut()); assertNotNull(out.getOut().getHeader(SqlConstants.SQL_GENERATED_KEYS_DATA)); (source: https://github.com/apache/camel/blob/camel-2.14.1/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlGeneratedKeysTest.java#L70-L97 ) This variable is not present even into in message headers. My attach code test what I'm saying. Can you run it? Thnkx everyone! -- View this message in context: http://camel.465427.n5.nabble.com/SQL-COMPONENT-CamelSqlGeneratedKeyRows-has-a-bug-tp5761113p5761506.html Sent from the Camel - Users mailing list archive at Nabble.com.
Check endpoints available without looking into the endpoints cache
Hi all, I'm using Camel 2.12.3. I've the same problem that Aida says with hasEndpoint() method in thread [1]. I have been looking for some solution using lookup methods of Camel context registry but without luck. The main problem is registry has endpoints that I declare in Spring context but my routes are in Java DSL. I tried method that getEndopint() using ref:nameEndpoint and nameEndpoint but it isn't work because first String produces an error because says: - org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: ref://seda:miOwnEndpoint due to: No bean could be found in the registry for: seda:miOwnEndpoint of type: org.apache.camel.Endpoint Second String retrieves the endpoint that I want but if it doesn't exist Camel creates new one and I miss exchange when producer template sends the message. Because of that I need one way to check all available endpoints regardless of endpoints cache. [1] http://camel.465427.n5.nabble.com/camelContext-hasEndpoint-returns-null-when-endpoint-apparently-exists-td5757907.html Thanks in advance. rsoleto. -- View this message in context: http://camel.465427.n5.nabble.com/Check-endpoints-available-without-looking-into-the-endpoints-cache-tp5761516.html Sent from the Camel - Users mailing list archive at Nabble.com.
Time consuming route starting at FTP endpoint
Hello, I'm after some advice from people more experienced in Camel than myself on what the correct way is to structure my route(s). My program essentially does the following: 1. Downloads file from FTP server 2. Saves a copy of the file (for auditing purposes) 3. Does some additional (time consuming) processing on the data Therefore my code is like: from(ftp://myserver/toProcess?move=processed;) .to(file://recievedData) .to(direct://additionalProcessing); I use the move option on the FTP component to move the file after processing so it will not be processed again. My problem is often by the time the processing (step 3) has completed the FTP connection is closed, so the file can not be moved resulting in the following exception stack trace: org.apache.camel.component.file.GenericFileOperationFailedException: File operation failed: null Connection is not open. Code: 221 at org.apache.camel.component.file.remote.FtpOperations.buildDirectory(FtpOperations.java:290) at org.apache.camel.component.file.strategy.GenericFileProcessStrategySupport.renameFile(GenericFileProcessStrategySupport.java:106) at org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.commit(GenericFileRenameProcessStrategy.java:88) at org.apache.camel.component.file.GenericFileOnCompletion.processStrategyCommit(GenericFileOnCompletion.java:124) at org.apache.camel.component.file.GenericFileOnCompletion.onCompletion(GenericFileOnCompletion.java:80) at org.apache.camel.component.file.GenericFileOnCompletion.onComplete(GenericFileOnCompletion.java:54) at org.apache.camel.util.UnitOfWorkHelper.doneSynchronizations(UnitOfWorkHelper.java:100) at org.apache.camel.impl.DefaultUnitOfWork.done(DefaultUnitOfWork.java:228) at org.apache.camel.util.UnitOfWorkHelper.doneUow(UnitOfWorkHelper.java:61) at org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.after(CamelInternalProcessor.java:613) at org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.after(CamelInternalProcessor.java:581) at org.apache.camel.processor.CamelInternalProcessor$InternalCallback.done(CamelInternalProcessor.java:240) at org.apache.camel.impl.MDCUnitOfWork$MDCCallback.done(MDCUnitOfWork.java:205) at org.apache.camel.processor.Pipeline.process(Pipeline.java:106) at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) at org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:291) at org.apache.camel.component.seda.SedaConsumer.doRun(SedaConsumer.java:200) at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:147) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) Caused by: java.io.IOException: Connection is not open at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:474) at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:608) at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:582) at org.apache.commons.net.ftp.FTP.pwd(FTP.java:1454) at org.apache.commons.net.ftp.FTPClient.printWorkingDirectory(FTPClient.java:2658) at org.apache.camel.component.file.remote.FtpOperations.buildDirectory(FtpOperations.java:267) ... 20 more Therefore my thinking was I can just restructure the code so the file is moved on the FTP server after I've saved a copy of it. I hoped I would be able to achieve this by putting in a SEDA component: from(ftp://myserver/toProcess?move=processed;) .to(file://recievedData) .to(seda://dataQueue) from(seda://dataQueue) .to(direct://additionalProcessing) However this does not achieve what I want. The file will still not be renamed on the FTP server until additionalProcessing completes. I tried setting the SEDA component options waitForTaskToComplete=Never and exchangePattern=InOnly in the hope that this may help but it doesn't. I thought of 2 ideas how I can achieve what I want (with my current understanding of Camel), but I don't think either is the correct solution (and I have not tested either yet). Solution 1 is to divide it into 2 routes and write it to a temporary location: from(ftp://myserver/toProcess?move=processed;) .to(file://tempLocation); from(file://tempLocation) .to(file://recievedData) .to(direct://aditionalProcessing) This seems wrong as it adds the extra IO overhead. Solution 2 is to use wiretap EIP as follows: from(ftp://myserver/toProcess?move=processed;) .to(file://recievedData) .wiretap(direct:additionalProcessing); However I keep getting the feeling the above solution would be a misuse of the wiretap EIP. Does any one have any idea what the correct way to do this in Camel would be? Thanks in advance for any advice any one can give me. Neil
[feature request] Reporting startup failure
Hi, I'm running 2.14.0 and I had a route which I'd changed from the seda to direct endpoint. I left a ?concurrentConsumers=2 on the URI using the Java DSL. When I started camel the application would start but would shut down again immediately. It took me a while to realise that there was a parameter on the URI which was not valid for the direct component. Camel didn't report an error in the logs at all but just failed silently. Would be good to throw an exception or add some sort of message to highlight the issue. To recreate, use:- @Override public void configure() throws Exception { from(direct:willFail?concurrentConsumers=2) .to(mock:wontReachHere); } Cheers, Chris. -- View this message in context: http://camel.465427.n5.nabble.com/feature-request-Reporting-startup-failure-tp5761531.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Http4 Component - 2.14 - Set Request Timeout
You can use the option httpClient.connectTimeout=6 to set the request timeout. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On January 9, 2015 at 4:09:39 AM, IgnatiusReilly (elpa...@gmail.com) wrote: Hi, I am trying to set the Connection Request Timeout in Camel 2.14. According to the documentation the URI parameter does not work; however it is not clear how to do it using HttpClientBuilder and RequestConfig.Builder. Could someone let me know how to configure this parameter in a Camel Route? Thanks, Ignatius -- View this message in context: http://camel.465427.n5.nabble.com/Http4-Component-2-14-Set-Request-Timeout-tp5761479.html Sent from the Camel - Users mailing list archive at Nabble.com.
Rest DSL: org.apache.camel.ExchangeTimedOutException: The OUT message was not received within: 20000 millis
Hi All, I'm facing a problem which I guess stems from the usage of MEP. Actually when I hit the http://localhost:8082/user/ by using a PUT verb, the client hangs for 20 millis and then an exception is raised (see below). I thought that by specifying the exchangePattern=InOnly Camel should return a response back straight away. Any ideas? -- restConfiguration().component(jetty).bindingMode(RestBindingMode.json) .host(localhost).port(8082); rest(/user).description(User rest service).consumes(application/json) .put().description(Updates or create a user) .route() .choice() .when(header(firstInvocation)) .to(activemq:queue1?exchangePattern=InOnly) .log(# Order received from browser rest client #) .otherwise() .log(# All done #) .to(mock:result) .endChoice().endRest() --- org.apache.camel.ExchangeTimedOutException: The OUT message was not received within: 2 millis due reply message with correlationID: corrID0 not received. Exchange[Message: {replyQueue1=replyQueue1, height=46, weight=34, age=29}] at org.apache.camel.component.jms.reply.ReplyManagerSupport.processReply(ReplyManagerSupport.java:133) at org.apache.camel.component.jms.reply.TemporaryQueueReplyHandler.onTimeout(TemporaryQueueReplyHandler.java:61) at org.apache.camel.component.jms.reply.CorrelationTimeoutMap.onEviction(CorrelationTimeoutMap.java:54) at org.apache.camel.component.jms.reply.CorrelationTimeoutMap.onEviction(CorrelationTimeoutMap.java:30) at org.apache.camel.support.DefaultTimeoutMap.purge(DefaultTimeoutMap.java:212) at org.apache.camel.support.DefaultTimeoutMap.run(DefaultTimeoutMap.java:162) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) --- Regards, Ettore. -- View this message in context: http://camel.465427.n5.nabble.com/Rest-DSL-org-apache-camel-ExchangeTimedOutException-The-OUT-message-was-not-received-within-2-mis-tp5761530.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: [SQL COMPONENTE] CamelSqlGeneratedKeyRows has a bug?
Thanks guy! I finally solved my problem King regards! -- View this message in context: http://camel.465427.n5.nabble.com/SQL-COMPONENT-CamelSqlGeneratedKeyRows-has-a-bug-tp5761113p5761529.html Sent from the Camel - Users mailing list archive at Nabble.com.
RE: Time consuming route starting at FTP endpoint
Hi Neil, Maybe try to connect via SFTP since there is no data timeout value for it (under timeout option : For SFTP there is no data timeout.) http://camel.apache.org/ftp2.html Hope this helps! Regards Morgan -Original Message- From: neil Stevens [mailto:neilstevens2...@gmail.com] Sent: vrijdag 9 januari 2015 13:17 To: users@camel.apache.org Subject: Time consuming route starting at FTP endpoint Hello, I'm after some advice from people more experienced in Camel than myself on what the correct way is to structure my route(s). My program essentially does the following: 1. Downloads file from FTP server 2. Saves a copy of the file (for auditing purposes) 3. Does some additional (time consuming) processing on the data Therefore my code is like: from(ftp://myserver/toProcess?move=processed;) .to(file://recievedData) .to(direct://additionalProcessing); I use the move option on the FTP component to move the file after processing so it will not be processed again. My problem is often by the time the processing (step 3) has completed the FTP connection is closed, so the file can not be moved resulting in the following exception stack trace: org.apache.camel.component.file.GenericFileOperationFailedException: File operation failed: null Connection is not open. Code: 221 at org.apache.camel.component.file.remote.FtpOperations.buildDirectory(FtpOperations.java:290) at org.apache.camel.component.file.strategy.GenericFileProcessStrategySupport.renameFile(GenericFileProcessStrategySupport.java:106) at org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.commit(GenericFileRenameProcessStrategy.java:88) at org.apache.camel.component.file.GenericFileOnCompletion.processStrategyCommit(GenericFileOnCompletion.java:124) at org.apache.camel.component.file.GenericFileOnCompletion.onCompletion(GenericFileOnCompletion.java:80) at org.apache.camel.component.file.GenericFileOnCompletion.onComplete(GenericFileOnCompletion.java:54) at org.apache.camel.util.UnitOfWorkHelper.doneSynchronizations(UnitOfWorkHelper.java:100) at org.apache.camel.impl.DefaultUnitOfWork.done(DefaultUnitOfWork.java:228) at org.apache.camel.util.UnitOfWorkHelper.doneUow(UnitOfWorkHelper.java:61) at org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.after(CamelInternalProcessor.java:613) at org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.after(CamelInternalProcessor.java:581) at org.apache.camel.processor.CamelInternalProcessor$InternalCallback.done(CamelInternalProcessor.java:240) at org.apache.camel.impl.MDCUnitOfWork$MDCCallback.done(MDCUnitOfWork.java:205) at org.apache.camel.processor.Pipeline.process(Pipeline.java:106) at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) at org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:291) at org.apache.camel.component.seda.SedaConsumer.doRun(SedaConsumer.java:200) at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:147) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) Caused by: java.io.IOException: Connection is not open at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:474) at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:608) at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:582) at org.apache.commons.net.ftp.FTP.pwd(FTP.java:1454) at org.apache.commons.net.ftp.FTPClient.printWorkingDirectory(FTPClient.java:2658) at org.apache.camel.component.file.remote.FtpOperations.buildDirectory(FtpOperations.java:267) ... 20 more Therefore my thinking was I can just restructure the code so the file is moved on the FTP server after I've saved a copy of it. I hoped I would be able to achieve this by putting in a SEDA component: from(ftp://myserver/toProcess?move=processed;) .to(file://recievedData) .to(seda://dataQueue) from(seda://dataQueue) .to(direct://additionalProcessing) However this does not achieve what I want. The file will still not be renamed on the FTP server until additionalProcessing completes. I tried setting the SEDA component options waitForTaskToComplete=Never and exchangePattern=InOnly in the hope that this may help but it doesn't. I thought of 2 ideas how I can achieve what I want (with my current understanding of Camel), but I don't think either is the correct solution (and I have not tested either yet). Solution 1 is to divide it into 2 routes and write it to a temporary location: from(ftp://myserver/toProcess?move=processed;) .to(file://tempLocation); from(file://tempLocation) .to(file://recievedData) .to(direct://aditionalProcessing) This seems wrong as it adds the extra IO overhead. Solution 2 is to use wiretap EIP as follows: from(ftp://myserver/toProcess?move=processed;) .to(file://recievedData)
Re: Http4 Component - 2.14 - Set Request Timeout
Willem, Thanks for your reply. I just noticed that the issue was something else... I was about to delete the message! Thanks anyway. Ignatius -- View this message in context: http://camel.465427.n5.nabble.com/Http4-Component-2-14-Set-Request-Timeout-tp5761479p5761533.html Sent from the Camel - Users mailing list archive at Nabble.com.