transferring a data wrapper-object along the route
Hi, I've got quite a long route which consists of 5-6 handler/to's clauses. Starting from the first handler I create a data transfer object (some business transaction specific info) which I populate with additional information on every step. In the end of the route I serialize that object, using JPA. I can't use body, since body is been used to transfer the business process- specific messages. Currently, I use exchange.setProperty() to store that object: BusinessTransaction transaction = prepareTransactionObject(keys, messagePayload); exchange.setProperty(BusinessTransaction.TRANSACTION_PROPERTY, transaction); In every sequential handler I extract the BusinessTransaction object from the Exchange property: exchange.getProperty(BusinessTransaction.TRANSACTION_PROPERTY, BusinessTransaction.class); ... and populate is with new information. Question: Is that way safe (e.g. thread safe), or, perhaps, there are other recommendations (using headers, for example) to transfer accompanying information along the long route? Thanks, Anton -- View this message in context: http://camel.465427.n5.nabble.com/transferring-a-data-wrapper-object-along-the-route-tp4960377p4960377.html Sent from the Camel - Users mailing list archive at Nabble.com.
Misleading jmx statistics on jpa component
Im using the jpa component as a consumer to poll a table. The batchsize of each poll is set to eg. 100 as : from uri=jpa:org.apache.camel.MyEntity?consumer.query=select x from org.apache.MyEntity x order by sekvensamp;maximumResults=100amp;consumeLockEntity=false / transacted/ The route is transacted so at the end the whole batch is either successful, or gets rolled back i there is a problem with any of the records read. It works nicely - the problem is that the jmx statistics on the route logs each exchange as completed even though at the end everything might get rolled back. In my opinion they should be regarded as failed instead. ? Camel version 2.8.1 /preben -- View this message in context: http://camel.465427.n5.nabble.com/Misleading-jmx-statistics-on-jpa-component-tp4960503p4960503.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Regarding mail reading
Usually my approach for learning a new Camel component (and any open source application) is this: 1. Check the component description page. 2. If that's not enough jump into the source code and see it myself (looking at the test also helps a lot) 3. If I still cannot solve my issue, ask in the user list the exact problem providing full description of the version used and so on. HTH Bilgin On Thu, Nov 3, 2011 at 5:23 AM, Ketan Barapatre ketanbarapa...@gmail.comwrote: I have created maven app and my code is working now. Thank You very much. [?] Can you please guide me on How can i proceed now means after getting Endpoint object ? Any documentation or tutorial for reading mail will help me a lot. Thank you very much. On Wed, Nov 2, 2011 at 4:28 PM, Ketan Barapatre ketanbarapa...@gmail.comwrote: I have created test project added camel-mail in my class path and other jars are also in classpath which comes with camel download. I will create Maven project and try this but is anything wrong if i don't use maven. Thank You Ketan On Wed, Nov 2, 2011 at 3:28 PM, Bilgin Ibryam bibr...@gmail.com wrote: Do you have mail component added to your project with correct camel version? Something like this? dependency groupIdorg.apache.camel/groupId artifactIdcamel-mail/artifactId versionx.x.x/version !-- use the same version as your Camel core version -- /dependency Bilgin On Tue, Nov 1, 2011 at 6:37 PM, Ketan Barapatre ketanbarapa...@gmail.com wrote: I have been through the provided links and documentation. Now I want to read mails from gmail server. I am getting exception in following code. Please correct my mistake i'm new to this. I may have mistaken in creating URL. CamelContext myCamelContext = new DefaultCamelContext(); String url = smtp:// smtp.gmail.com:465?password=mypasswordusername=myusername; //String url = pop3:// smtp.gmail.com:465?password=mypasswordusername=myusername; //String url = imap:// smtp.gmail.com:465?password=mypasswordusername=myusername; Endpoint endpoint = myCamelContext.getEndpoint(url); System.out.println( endpoint + endpoint); *Exception * [ main] AnnotationTypeConverterLoader INFO Found 3 packages with 15 @Converter classes to load [ main] DefaultTypeConverter INFO Loaded 163 core type converters (total 163 type converters) [ main] AnnotationTypeConverterLoader INFO Loaded 27 @Converter classes Exception in thread main org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: smtp:// smtp.gmail.com:465?password=mypasswordusername=myusername%40gmail.comdue to: org.apache.camel.TypeConverterLoaderException: Failed to load type converters because of: Cannot find any type converter classes from the following packages: [org.apache.camel.scala.converter.ScalaTypeConverter] Java Result: 1 On Sun, Oct 30, 2011 at 7:16 AM, Bilgin Ibryam bibr...@gmail.com wrote: Hi Ketan, A good starting point for Camel is http://camel.apache.org/getting-started.html and Camel in Action book. For receiving emails you have to take a look at the examples here http://camel.apache.org/mail.html Also reading the tests from the source code helps a lot understanding the components. HTH Bilgin Ibryam On Sat, Oct 29, 2011 at 8:43 AM, Ketan Barapatre ketanbarapa...@gmail.com wrote: Hello All, I want to develop an application where I can get the text of incoming mails (gmail or any mail server). Mail can be of plain text or text\html types. I am new to Apache Camel. Please guide me. -- Regards Ketan Barapatre -- Regards Ketan Barapatre -- Regards Ketan Barapatre -- Regards Ketan Barapatre
Re: Karaf vs Servicemix 4.x
Hi, Thanks for the replies. Can some one please comment on the below query. Apache ServiceMix 5 will become much ligher when we ditch the JBI baggage Will it still be possible to install JBI features into servicemix 5 or even that will not work? With Best Regards, Diwakar -- View this message in context: http://camel.465427.n5.nabble.com/Karaf-vs-Servicemix-4-x-tp4954984p4960631.html Sent from the Camel - Users mailing list archive at Nabble.com.
JBI support in future versions of Camel
Hi, Camel and JBI work together very well (for both routing and components). Will this support be available in future versions of Camel? Will there be some incompatible Camel interface change that will make JBI support not to work? Please let me know your comment. With Best Regards, Diwakar -- View this message in context: http://camel.465427.n5.nabble.com/JBI-support-in-future-versions-of-Camel-tp4960636p4960636.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Karaf vs Servicemix 4.x
On Thu, Nov 3, 2011 at 11:01 AM, diwakar diwakar.j...@nsn.com wrote: Hi, Thanks for the replies. Can some one please comment on the below query. Apache ServiceMix 5 will become much ligher when we ditch the JBI baggage Will it still be possible to install JBI features into servicemix 5 or even that will not work? I would assume that would be the idea. But SMX5 will not come out of the box with JBI support. You would have to install it manually. This kind of questions is better asked on the SMX @user mailing list as its about SMX and not Camel. With Best Regards, Diwakar -- View this message in context: http://camel.465427.n5.nabble.com/Karaf-vs-Servicemix-4-x-tp4954984p4960631.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
Re: Karaf vs Servicemix 4.x
Hi, Thanks for the reply. With Best Regards, Diwakar -- View this message in context: http://camel.465427.n5.nabble.com/Karaf-vs-Servicemix-4-x-tp4954984p4960662.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: transferring a data wrapper-object along the route
On Thu, Nov 3, 2011 at 8:51 AM, anton_nazarov naza...@telkom.co.za wrote: Hi, I've got quite a long route which consists of 5-6 handler/to's clauses. Starting from the first handler I create a data transfer object (some business transaction specific info) which I populate with additional information on every step. In the end of the route I serialize that object, using JPA. I can't use body, since body is been used to transfer the business process- specific messages. Currently, I use exchange.setProperty() to store that object: BusinessTransaction transaction = prepareTransactionObject(keys, messagePayload); exchange.setProperty(BusinessTransaction.TRANSACTION_PROPERTY, transaction); In every sequential handler I extract the BusinessTransaction object from the Exchange property: exchange.getProperty(BusinessTransaction.TRANSACTION_PROPERTY, BusinessTransaction.class); ... and populate is with new information. Question: Is that way safe (e.g. thread safe), or, perhaps, there are other recommendations (using headers, for example) to transfer accompanying information along the long route? Thats a good solution to store as property on the exchange, as it will be available for the entire lifecycle of the Exchange. If you store in headers, then objects may be discarded if sending over transports and getting a reply message back etc. So use exchange properties for objects you want to keep around, and which are not part of the message details (body or header). And yes its thread safe. Thanks, Anton -- View this message in context: http://camel.465427.n5.nabble.com/transferring-a-data-wrapper-object-along-the-route-tp4960377p4960377.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
camel is support for s-http?
Hi! s-http (secure http) I want to use. camel works support for s-http ? If you use supporting What should I set? current setting : route id=shttp from uri=servlet:///test?matchOnUriPrefix=true/ camel:convertBodyTo type=String/ camel:process ref=inProcessor/ to uri=http://shttp.test.com?bridgeEndpoint=true/ camel:convertBodyTo type=String/ camel:process ref=outProcessor/ /route result : HttpOperationFailedException -- View this message in context: http://camel.465427.n5.nabble.com/camel-is-support-for-s-http-tp4960717p4960717.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel is support for s-http?
On Thu, Nov 3, 2011 at 11:44 AM, finger yu...@hotmail.com wrote: Hi! s-http (secure http) I want to use. camel works support for s-http ? If you use supporting What should I set? Can you be a bit more elaborate? Where do you want to use HTTPS ? For example in this to step? to uri=http://shttp.test.com?bridgeEndpoint=true/ Then read this page http://camel.apache.org/http current setting : route id=shttp from uri=servlet:///test?matchOnUriPrefix=true/ camel:convertBodyTo type=String/ camel:process ref=inProcessor/ to uri=http://shttp.test.com?bridgeEndpoint=true/ camel:convertBodyTo type=String/ camel:process ref=outProcessor/ /route result : HttpOperationFailedException -- View this message in context: http://camel.465427.n5.nabble.com/camel-is-support-for-s-http-tp4960717p4960717.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
Re: transferring a data wrapper-object along the route
Claus, Thank you for the clarification. regards, Anton -- View this message in context: http://camel.465427.n5.nabble.com/transferring-a-data-wrapper-object-along-the-route-tp4960377p4960768.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel is support for s-http?
I just did a quick search and didn't find Apache HTTPClient which is used by camel-http supports the s-http. On Thu Nov 3 13:01:20 2011, finger wrote: Hi! s-http (secure http) I want to use. camel works support for s-http ? If you use supporting What should I set? current setting : route id=shttp from uri=servlet:///test?matchOnUriPrefix=true/ camel:convertBodyTo type=String/ camel:process ref=inProcessor/ to uri=http://shttp.test.com?bridgeEndpoint=true/ camel:convertBodyTo type=String/ camel:process ref=outProcessor/ /route result : HttpOperationFailedException -- View this message in context: http://camel.465427.n5.nabble.com/camel-is-support-for-s-http-tp4960161p4960161.html Sent from the Camel Development mailing list archive at Nabble.com. -- Willem -- FuseSource Web: http://www.fusesource.com Blog:http://willemjiang.blogspot.com (English) http://jnn.javaeye.com (Chinese) Twitter: willemjiang Weibo: willemjiang
Re: camel is support for s-http?
Ah you mean S-HTTP ? http://en.wikipedia.org/wiki/Secure_Hypertext_Transfer_Protocol I guess nobody really uses it. On Thu, Nov 3, 2011 at 12:24 PM, Willem Jiang willem.ji...@gmail.com wrote: I just did a quick search and didn't find Apache HTTPClient which is used by camel-http supports the s-http. On Thu Nov 3 13:01:20 2011, finger wrote: Hi! s-http (secure http) I want to use. camel works support for s-http ? If you use supporting What should I set? current setting : route id=shttp from uri=servlet:///test?matchOnUriPrefix=true/ camel:convertBodyTo type=String/ camel:process ref=inProcessor/ to uri=http://shttp.test.com?bridgeEndpoint=true/ camel:convertBodyTo type=String/ camel:process ref=outProcessor/ /route result : HttpOperationFailedException -- View this message in context: http://camel.465427.n5.nabble.com/camel-is-support-for-s-http-tp4960161p4960161.html Sent from the Camel Development mailing list archive at Nabble.com. -- Willem -- FuseSource Web: http://www.fusesource.com Blog: http://willemjiang.blogspot.com (English) http://jnn.javaeye.com (Chinese) Twitter: willemjiang Weibo: willemjiang -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
Re: camel is support for s-http?
That's right. Secure_Hypertext_Transfer_Protocol It means not supports by camel? -- View this message in context: http://camel.465427.n5.nabble.com/camel-is-support-for-s-http-tp4960717p4960853.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Contract first approach (using WSDL) to create a WS using cxf and route using camel
Hi Claus, Do we have Fuse IDE based example somewhere. Since using camel through fuse ide might be better. Else can you suggest any way to do WSDl based example using Fuse IDE. Regards Guru -- View this message in context: http://camel.465427.n5.nabble.com/Contract-first-approach-using-WSDL-to-create-a-WS-using-cxf-and-route-using-camel-tp4951686p4960963.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel is support for s-http?
On Thu, Nov 3, 2011 at 12:51 PM, finger yu...@hotmail.com wrote: That's right. Secure_Hypertext_Transfer_Protocol It means not supports by camel? Yes I do not think its support. Camel has a number of HTTP related components, and its the underlying HTTP client that needs to support it. camel-http camel-http4 camel-jetty camel-ahc All Camel HTTP components. But I do not think any of the underlying HTTP clients supports secure HTTP. But you can google and see which HTTP client Java libraries you can find. -- View this message in context: http://camel.465427.n5.nabble.com/camel-is-support-for-s-http-tp4960717p4960853.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
Re: Spliter in Camel
On Tue, Nov 1, 2011 at 1:37 PM, ebinsingh ebenezer.si...@verizonwireless.com wrote: Ah ok. I was trying to get some performance statistics and was using a single thread. Any tips on increasing performance when using Camel (I would use thread pool). My task would be to read a file (csv or xml), spilt them into single records, process these records, aggregate 2000 records into 1 and publish it to MQ. I currently see that it takes little less than a second to process a file of 2000 records. It only makes sense to parallel process splitted messages if you do some CPU intensive work on the message, and/or enrich with data from an external resource (get data from a DB, WebService call etc.) to get some CPU and IO bound usages. Then multiple threads can better scale as it can process messages which waiting for IO to reply etc. If all you do is to assemble 2000 records, then that would be faster in a single threaded. Thanks regards, Ebe -- View this message in context: http://camel.465427.n5.nabble.com/Spliter-in-Camel-tp4940967p4955063.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
Getting error in camel-example-cxf-blueprint
http://camel.465427.n5.nabble.com/file/n4961123/Picture1.png Hi, I am getting error while running mvn install command from the source directory of camel-example-cxf-blueprint. It is showing cxf-codegen-plugin error. As per my knowledge everything is ok in pom.xml file. I think the problem is of version. Please tell me if that is the problem. If yes then please help me by providing alternate way to run the example. Regards, Sachin Mehta -- View this message in context: http://camel.465427.n5.nabble.com/Getting-error-in-camel-example-cxf-blueprint-tp4961123p4961123.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Contract first approach (using WSDL) to create a WS using cxf and route using camel
On Thu, Nov 3, 2011 at 1:50 PM, Gnanaguru S gnanaguru.sattanat...@wipro.com wrote: Hi Claus, Do we have Fuse IDE based example somewhere. Since using camel through fuse ide might be better. There will possible be an example and documentation in the future. Else can you suggest any way to do WSDl based example using Fuse IDE. Do you create the WSDL by hand? Or do you already have an existing WSDL? Eclipse have WS* plugins to help create WSDL and web services etc. When you have the WSDL, then you may add that CXF plugin in the pom.xml file. If you want to generate source code from the WSDL, in case you want to use the POJO data format with CXF. There is a webinar series at FuseSource which demonstrates using WebServices. You may check it out. Regards Guru -- View this message in context: http://camel.465427.n5.nabble.com/Contract-first-approach-using-WSDL-to-create-a-WS-using-cxf-and-route-using-camel-tp4951686p4960963.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
Error Handler
I have a CXF bean sending out a camel message on a ProducerTemplate and I want any exceptions thrown on the route to immediately come back as the response. It is an inOut message: producer.sendBodyAndHeaders(URI, ExchangePattern.InOut, body, headers); I have not figured out the magic method to getting the response to automatically fast fail if an exception is thrown by any method along the way. For example, the URI goes to an ActiveMQ queue, and if I have it immediately run If (true) throw new RuntimeException(); The exception eventually results the jetty response of HTTP 500 server error on the jetty CXF API. I have two bundles, one bundle is the jetty CXF followed by sending this to an active MQ queue and the second bundle consumes the message with another route. If on the second route, the operation throws an Exception and I create an error handler, to the tune of camel:onException camel:exceptionjava.lang.Throwable/camel:exception camel:bean ref=fastFailErrorHandler method=handleError / /camel:onException public Object handleError(Exchange exchange) { Throwable caused = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Throwable.class); exchange.getIn().setFault(true); exchange.getOut().setFault(true); logger.debug(Error handler triggered); return caused; } The original problem will be a timeout exception, waiting the default 20 seconds. If I modify it to be camel:onException camel:exceptionjava.lang.Throwable/camel:exception camel:handled camel:constanttrue/camel:constant /camel:handled camel:bean ref=fastFailErrorHandler method=handleError / /camel:onException Then the body continues working its way through subsequent queues as if nothing went wrong. How do I tell Camel, hey Camel, please throw this thing to the original caller as the response body. Thanks, Zach Calvert
Re: Misleading jmx statistics on jpa component
Hi Preben, could you also post the log snippet where it shows that the transaction is rollback only? Christian Am 03.11.2011 10:00, schrieb Preben.Asmussen: Im using the jpa component as a consumer to poll a table. The batchsize of each poll is set to eg. 100 as : from uri=jpa:org.apache.camel.MyEntity?consumer.query=select x from org.apache.MyEntity x order by sekvensamp;maximumResults=100amp;consumeLockEntity=false / transacted/ The route is transacted so at the end the whole batch is either successful, or gets rolled back i there is a problem with any of the records read. It works nicely - the problem is that the jmx statistics on the route logs each exchange as completed even though at the end everything might get rolled back. In my opinion they should be regarded as failed instead. ? Camel version 2.8.1 /preben -- View this message in context: http://camel.465427.n5.nabble.com/Misleading-jmx-statistics-on-jpa-component-tp4960503p4960503.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Christian Schneider http://www.liquid-reality.de Open Source Architect Talend Application Integration Division http://www.talend.com
Re: JmsComponent changes between 2.4.0 and 2.6.0
i upgraded aqapi to 11.2.0.3 and ojdbc to ojdbc5-11.2.0.2.0 and now it works in camel 2.6.0 -- View this message in context: http://camel.465427.n5.nabble.com/JmsComponent-changes-between-2-4-0-and-2-6-0-tp3398446p4961487.html Sent from the Camel - Users mailing list archive at Nabble.com.
Questions on Camel camel-example-cxf-osgi sample
Hi all, two questions: 1.) Line #51 of the camel-example-cxf-osgi sample's README[1] hosts a CXF web service at the following URL: http://localhost:8181/cxf/camel-example-cxf-osgi/webservices/incident?wsdl However, the default string for OOTB Karaf would have services instead of CXF: http://localhost:8181/services/camel-example-cxf-osgi/webservices/incident http://localhost:8181/cxf/camel-example-cxf-osgi/webservices/incident?wsdl I have a patch to update the README and can have the URL changed to services but was wondering where cxf came from--is that the default string if it is hosted on ServiceMix (only Karaf uses services by default?), or does ServiceMix use services too by default? Then we can switch the README to have them use services instead so no special container configuration would be needed. 2.) I cannot get this sample to work using either cxf or services above in the URL string. Karaf log error message is: Can't find the the request for http://localhost:8181/services/camel-example-cxf-osgi/webservices/incident's Observer which may mean CXF configuration isn't being properly detected. Line #32 of the Spring camel-context.xml configuration here: *http://tinyurl.com/3bumwtx* seems suspect: * *address=/camel-example-cxf-osgi/webservices/incident Shouldn't it be the entire address, like so: address=http://localhost:8181/services/camel-example-cxf-osgi/webservices/incident http://localhost:8181/cxf/camel-example-cxf-osgi/webservices/incident?wsdl (although that didn't seem to work for me either, same error!) The address value of the camel-context.xml for *test* cases has the full URL as above. Thanks, Glen [1] http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cxf-osgi/README.txt?annotate=1147432 -- Glen Mazza Talend - http://www.talend.com/apache Blog - http://www.jroller.com/gmazza/ Twitter - glenmazza
Camel FTP with username having embedded @ character.
I'm trying to connect to hosta.mydomain.com with a username of user@othername and password of password. FTP2 is failing miserably with a org.apache.camel.FailedToCreateRouteExceptionwith a cause of : Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:453) at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:46) at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:158) at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:113) at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:119) at org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:72) at org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:88) at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:680) at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:140) ... 50 more My route appears similar to : : ftp://username@othern...@hosta.mydomain.com?password=password Running it with a normal username (non embedded @othername) works normally. (The ftp server on the remote end (hosta.domain.com) is requiring the @ for remote/network user ftp logins). I've tried removing the username from the initial URI definition and adding it as a parameter but get the same results. Any suggestions? -- --- Craig Taylor ctalk...@ctalkobt.net
Re: Camel FTP with username having embedded @ character.
Additional notes: * Testing w/ %40 instead of @ in the username also fails to work. * It appears from testing with java.net.URI that %40 is supposed to be used instead of @ as it also fails with @. On Thu, Nov 3, 2011 at 2:36 PM, Craig Taylor ctalk...@ctalkobt.net wrote: I'm trying to connect to hosta.mydomain.com with a username of user@othername and password of password. FTP2 is failing miserably with a org.apache.camel.FailedToCreateRouteException with a cause of : Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:453) at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:46) at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:158) at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:113) at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:119) at org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:72) at org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:88) at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:680) at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:140) ... 50 more My route appears similar to : : ftp://username@othern...@hosta.mydomain.com?password=password Running it with a normal username (non embedded @othername) works normally. (The ftp server on the remote end (hosta.domain.com) is requiring the @ for remote/network user ftp logins). I've tried removing the username from the initial URI definition and adding it as a parameter but get the same results. Any suggestions? -- --- Craig Taylor ctalk...@ctalkobt.net -- --- Craig Taylor ctalk...@ctalkobt.net
Re: Camel ftp read next file after close connection
Hi I localized the error. Object DefaultShutdownStrategy$ShutdownTask call ((ShutdownAware) consumer).deferShutdown(shutdownRunningTask) The method of the object GenericFileConsumer always returns false. I redefined the method of the FtpConsumer Now DefaultShutdownStrategy waits until the process. As you can see, the waiting time starts at 300 seconds, and should be 10 seconds. For details, see page http://camel.apache.org/cronscheduledroutepolicy.html . Parameter routeStopGracePeriod = 10 seconds. The time period to wait before initiating graceful route stop -- View this message in context: http://camel.465427.n5.nabble.com/Camel-ftp-read-next-file-after-close-connection-tp4952369p4962474.html Sent from the Camel - Users mailing list archive at Nabble.com.