RE: File transfer using ftp failed
HI Claus Ibsen, Thanks for the information. But then, I have the following jars in classpath but still I am facing the same error, camel-ftp-2.9.2.jar camel-core-2.10.3.jar slf4j-api-1.6.6.jar jsch-0.1.38.jar commons-net-3.2.jar: commons-net-3.2-sources.jar regards Bala -Original Message- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: 05 February 2013 12:45 To: users@camel.apache.org Subject: Re: File transfer using ftp failed On Tue, Feb 5, 2013 at 5:43 AM, AMARNATH, Balachandar wrote: > Hello, > > I tried to do a file transfer using apache camel route using the following > route > > from("ftp://@/etc/?password=") > .process(new Processor() { > public void process(Exchange exchange) throws Exception { > // do something > } > }).to("file:///tmp/"); > > I end up with the following error, > > Exception in thread "main" org.apache.camel.FailedToCreateRouteException: > Failed to create route route1: Route... because of Failed to resolve > endpoint: due to: No component found with scheme: ftp > > I installed camel-ftp and the jar file camel-ftp.jar is in the classpath > You need the transitive JARs as well. eg camel-ftp uses commons net and jcraft for the actual FTP libraries. If you use maven then its very easy as just depend on camel-ftp and Maven will do that for you. If not using maven you need to add those JARS manually. > Any hint will be highly appreciated > > > > With thanks and regards > Balachandar > > > > > The information in this e-mail is confidential. The contents may not be > disclosed or used by anyone other than the addressee. Access to this e-mail > by anyone else is unauthorised. > If you are not the intended recipient, please notify Airbus immediately and > delete this e-mail. > Airbus cannot accept any responsibility for the accuracy or completeness of > this e-mail as it has been sent over public networks. If you have any > concerns over the content of this message or its Accuracy or Integrity, > please contact Airbus immediately. > All outgoing e-mails from Airbus are checked using regularly updated virus > scanning software but you should take whatever measures you deem to be > appropriate to ensure that this message and any attachments are virus free. > -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen This mail has originated outside your organization, either from an external partner or the Global Internet. Keep this in mind if you answer this message. The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, please notify Airbus immediately and delete this e-mail. Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately. All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.
Re: File transfer using ftp failed
On Tue, Feb 5, 2013 at 9:11 AM, AMARNATH, Balachandar wrote: > HI Claus Ibsen, > > Thanks for the information. But then, I have the following jars in classpath > but still I am facing the same error, > > > camel-ftp-2.9.2.jar > camel-core-2.10.3.jar > slf4j-api-1.6.6.jar > jsch-0.1.38.jar > commons-net-3.2.jar: > commons-net-3.2-sources.jar > The Camel JARs *MUST* be the same version, you got 2.9.2 and 2.10.3 mixed up. > > regards > Bala > > -Original Message- > From: Claus Ibsen [mailto:claus.ib...@gmail.com] > Sent: 05 February 2013 12:45 > To: users@camel.apache.org > Subject: Re: File transfer using ftp failed > > On Tue, Feb 5, 2013 at 5:43 AM, AMARNATH, Balachandar > wrote: >> Hello, >> >> I tried to do a file transfer using apache camel route using the following >> route >> >> from("ftp://@/etc/?password=") >> .process(new Processor() { >> public void process(Exchange exchange) throws Exception { >> // do something >> } >> }).to("file:///tmp/"); >> >> I end up with the following error, >> >> Exception in thread "main" org.apache.camel.FailedToCreateRouteException: >> Failed to create route route1: Route... because of Failed to resolve >> endpoint: due to: No component found with scheme: ftp >> >> I installed camel-ftp and the jar file camel-ftp.jar is in the classpath >> > > You need the transitive JARs as well. eg camel-ftp uses commons net > and jcraft for the actual FTP libraries. > If you use maven then its very easy as just depend on camel-ftp and > Maven will do that for you. > > If not using maven you need to add those JARS manually. > > > >> Any hint will be highly appreciated >> >> >> >> With thanks and regards >> Balachandar >> >> >> >> >> The information in this e-mail is confidential. The contents may not be >> disclosed or used by anyone other than the addressee. Access to this e-mail >> by anyone else is unauthorised. >> If you are not the intended recipient, please notify Airbus immediately and >> delete this e-mail. >> Airbus cannot accept any responsibility for the accuracy or completeness of >> this e-mail as it has been sent over public networks. If you have any >> concerns over the content of this message or its Accuracy or Integrity, >> please contact Airbus immediately. >> All outgoing e-mails from Airbus are checked using regularly updated virus >> scanning software but you should take whatever measures you deem to be >> appropriate to ensure that this message and any attachments are virus free. >> > > > > -- > Claus Ibsen > - > Red Hat, Inc. > FuseSource is now part of Red Hat > Email: cib...@redhat.com > Web: http://fusesource.com > Twitter: davsclaus > Blog: http://davsclaus.com > Author of Camel in Action: http://www.manning.com/ibsen > > This mail has originated outside your organization, either from an external > partner or the Global Internet. > Keep this in mind if you answer this message. > > > > The information in this e-mail is confidential. The contents may not be > disclosed or used by anyone other than the addressee. Access to this e-mail > by anyone else is unauthorised. > If you are not the intended recipient, please notify Airbus immediately and > delete this e-mail. > Airbus cannot accept any responsibility for the accuracy or completeness of > this e-mail as it has been sent over public networks. If you have any > concerns over the content of this message or its Accuracy or Integrity, > please contact Airbus immediately. > All outgoing e-mails from Airbus are checked using regularly updated virus > scanning software but you should take whatever measures you deem to be > appropriate to ensure that this message and any attachments are virus free. > -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: Event Driven Use Case
> 1. How can I implement the state saving and reconstructing using memento in > a generic way without serialization? If you can probably narrow the generic requirements of your messages to structure similar to the one below: class MessageState(correlationId String, metaDataCsv: String) Storing fixed amount of Strings per message is trivial for almost any persistent store. Working with serialized objects can be tricky. Badly constructed message can blow your system away. The typical scenario of serialization failure is the "reference leak" - you want to serialize single object, but end up attempting to serialize entire Spring context :) . It is also challenging to efficiently look up for the serialized object by correlation id, while serializing Map is multi-threaded environment is asking for trouble :) . Another option for generic object store is DB4O component [1]. DB4O is an object database and can store any object out-of-the-box. You can also consider to convert POJO message to Java Map and sending it to the Redis component. > 2. This is very heavy traffic app and keeping the state in local memory is > not an option as it will run out of memory as responses from services may > take minutes. Memento objects can be really small. You might consider recalculating this, if performance become an issue :) > Also, response from services can come back to a server which > does not have the state (it is in local cache of another server). That's the reason I suggested EHCache (with persistent store disabled) or Guava Cache with common state shared via JGroups multicast. Both of these solutions keep local copy of in-memory cache synchronized with other machines. > I thought > of using memcache (or other distributed cache). However, it does not have > call-back mechanism if an entry expires. In the previous post I mentioned that Guava Cache provides eviction callbacks. > Also, it will cause problems to > figure out timed-out transactions when my app is down and entries cached in > memcache expires before app comes up. You mentioned that you're using cluster. This sentence indicates that application should not be "totally" down at any moment. You shouldn't be affect by this scenario then. BTW The majority of the cache implementation allow you to configure eviction strategy (or even create your own). Best regards. [1] http://camel.apache.org/db4o.html -- Henryk Konsek http://henryk-konsek.blogspot.com
RE: File transfer using ftp failed
Nope.. I have updated to camel-ftp-2.10.3.jar but still the issue is persisting ! -Original Message- From: Claus Ibsen [mailto:claus.ib...@gmail.com] Sent: 05 February 2013 13:44 To: users@camel.apache.org Subject: Re: File transfer using ftp failed On Tue, Feb 5, 2013 at 9:11 AM, AMARNATH, Balachandar wrote: > HI Claus Ibsen, > > Thanks for the information. But then, I have the following jars in classpath > but still I am facing the same error, > > > camel-ftp-2.9.2.jar > camel-core-2.10.3.jar > slf4j-api-1.6.6.jar > jsch-0.1.38.jar > commons-net-3.2.jar: > commons-net-3.2-sources.jar > The Camel JARs *MUST* be the same version, you got 2.9.2 and 2.10.3 mixed up. > > regards > Bala > > -Original Message- > From: Claus Ibsen [mailto:claus.ib...@gmail.com] > Sent: 05 February 2013 12:45 > To: users@camel.apache.org > Subject: Re: File transfer using ftp failed > > On Tue, Feb 5, 2013 at 5:43 AM, AMARNATH, Balachandar > wrote: >> Hello, >> >> I tried to do a file transfer using apache camel route using the following >> route >> >> from("ftp://@/etc/?password=") >> .process(new Processor() { >> public void process(Exchange exchange) throws Exception { >> // do something >> } >> }).to("file:///tmp/"); >> >> I end up with the following error, >> >> Exception in thread "main" org.apache.camel.FailedToCreateRouteException: >> Failed to create route route1: Route... because of Failed to resolve >> endpoint: due to: No component found with scheme: ftp >> >> I installed camel-ftp and the jar file camel-ftp.jar is in the classpath >> > > You need the transitive JARs as well. eg camel-ftp uses commons net > and jcraft for the actual FTP libraries. > If you use maven then its very easy as just depend on camel-ftp and > Maven will do that for you. > > If not using maven you need to add those JARS manually. > > > >> Any hint will be highly appreciated >> >> >> >> With thanks and regards >> Balachandar >> >> >> >> >> The information in this e-mail is confidential. The contents may not be >> disclosed or used by anyone other than the addressee. Access to this e-mail >> by anyone else is unauthorised. >> If you are not the intended recipient, please notify Airbus immediately and >> delete this e-mail. >> Airbus cannot accept any responsibility for the accuracy or completeness of >> this e-mail as it has been sent over public networks. If you have any >> concerns over the content of this message or its Accuracy or Integrity, >> please contact Airbus immediately. >> All outgoing e-mails from Airbus are checked using regularly updated virus >> scanning software but you should take whatever measures you deem to be >> appropriate to ensure that this message and any attachments are virus free. >> > > > > -- > Claus Ibsen > - > Red Hat, Inc. > FuseSource is now part of Red Hat > Email: cib...@redhat.com > Web: http://fusesource.com > Twitter: davsclaus > Blog: http://davsclaus.com > Author of Camel in Action: http://www.manning.com/ibsen > > This mail has originated outside your organization, either from an external > partner or the Global Internet. > Keep this in mind if you answer this message. > > > > The information in this e-mail is confidential. The contents may not be > disclosed or used by anyone other than the addressee. Access to this e-mail > by anyone else is unauthorised. > If you are not the intended recipient, please notify Airbus immediately and > delete this e-mail. > Airbus cannot accept any responsibility for the accuracy or completeness of > this e-mail as it has been sent over public networks. If you have any > concerns over the content of this message or its Accuracy or Integrity, > please contact Airbus immediately. > All outgoing e-mails from Airbus are checked using regularly updated virus > scanning software but you should take whatever measures you deem to be > appropriate to ensure that this message and any attachments are virus free. > -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen This mail has originated outside your organization, either from an external partner or the Global Internet. Keep this in mind if you answer this message. The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, please notify Airbus immediately and delete this e-mail. Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately. All outgoing e-mails from Airbus a
Re: camel-hazelcast & Transactions
Thanks for your answers. Romain, I tried with jca adaptor but my problem always exist, the method "delete" of my MapStore is invoked before the end of my route. I configured tomee.xml with the tag and it's ok, my adaptor is deployed (Cf below) INFO: Configuring enterprise application: C:\Dev\apache-tomee-plus-1.5.1\resources\hazelcast-ra-2.5.rar 5 févr. 2013 09:47:30 org.apache.openejb.config.OutputGeneratedDescriptors writeRaXml INFO: Dumping Generated ra.xml to: C:\Users\T0135150\AppData\Local\Temp\ra-3367535903212890335hazelcast-ra-2.5.xml 5 févr. 2013 09:47:30 org.apache.openejb.config.ConfigurationFactory configureService INFO: Configuring Service(id=HazelcastResourceAdapter, type=Resource, provider-id=HazelcastResourceAdapter) 5 févr. 2013 09:47:30 org.apache.openejb.config.ConfigurationFactory configureService INFO: Configuring Service(id=hazelcast-ra-2.5, type=Resource, provider-id=hazelcast-ra-2.5) 5 févr. 2013 09:47:30 org.apache.openejb.config.AppInfoBuilder build INFO: Enterprise application "C:\Dev\apache-tomee-plus-1.5.1\resources\hazelcast-ra-2.5.rar" loaded. In my web.xml, I added : hazelcast-ra-2.5 com.hazelcast.jca.ConnectionFactoryImpl Container No changes. Any Idea ? Have you tried before with the camel-hazelcast component ? Thank -- View this message in context: http://camel.465427.n5.nabble.com/camel-hazelcast-Transactions-tp5726943p5726955.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-hazelcast & Transactions
Good question... I added in my spring configuration and I thought it was sufficient for Camel to connect himself to tomee transaction manager. Apparently no but all information that I found on Camel website concerned Jms or Database transaction manager. Moreover, I didn't find information about the configuration of camel & tomee transaction manager on web -- View this message in context: http://camel.465427.n5.nabble.com/camel-hazelcast-Transactions-tp5726943p5726957.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel and file handling
I played around with this a bit more and the reason that the file cannot be displayed is because the file of course is being compressed. I updated my last sample route from my previous query to add the Content-Encoding of gzip to the Processor I created: import java.io.File; import java.util.Map; import org.apache.camel.Exchange; import org.apache.camel.Processor; public class FileProcessor implements Processor { public void process(Exchange exchange) throws Exception { String finalFile = ""; finalFile = "/data/9b62405c463e6be04e6578ae129a6270.jpeg"; File file = new File(finalFile); if (file.exists()) { exchange.getIn().setBody(file); } else { exchange.getIn().setBody("File does not exist"); } exchange.getIn().setHeader("Content-Disposition", "inline;filename*=UTF-8''9b62405c463e6be04e6578ae129a6270.jpeg"); exchange.getIn().setHeader("Content-Type", "image/jpeg"); exchange.getIn().setHeader("Content-Encoding", "gzip"); } } The file is no displayable. I've a few questions here: 1) Why is the file being compressed? 2) When the file is compressed, why is an appropriate header, ie. Content_Encoding, into the Exchange? That definitely sounds like a bug to me. 3) Is there any way to turn off the compression of these files? -- View this message in context: http://camel.465427.n5.nabble.com/Camel-and-file-handling-tp5726797p5726959.html Sent from the Camel - Users mailing list archive at Nabble.com.
Client acknowledgement support of Camel JMS component
Hi It appears using the client ack mode of the JMS component that the message will get de-queued if the route which consumes the message completes without throwing an exception. In my use case, my route consumes messages from a JMS topic and aggregates them using the aggregator EIP with a completion condition of 10 mins. I only want to dequeue the messages from the topic after the aggregator has met the completion condition. Can I do this without throwing "fake" exceptions Thanks Joe -- View this message in context: http://camel.465427.n5.nabble.com/Client-acknowledgement-support-of-Camel-JMS-component-tp5726961.html Sent from the Camel - Users mailing list archive at Nabble.com.
[2.9.5] body=null after onException(_).handled(false)
I have a route that looks like so: onCompletion().onFailureOnly().beanRef('myBean', 'handleFailed') from('seda:asdf') .onException(SpecificException) .beanRef('myBean', 'handleSpecificException') .handled(false) .end() .dynamicRouter('myBean', 'slip') When myBean.slip() throws SpecificException, If I print in.body in handleSpecificException(), I can see that it is not null. If I print it again in handleFailed() it is now null. I have "fixed" this by adding the following to MyBean.handleSpecificException(): x.out.body = x.in.body x.out.headers = x.in.headers Is this expected behaviour - should the workaround be required? Thanks, Alex
Re: Websphere 6.1.0.45: Unable to return data from a camel-cxf component (POJO mode)
I've been able to work a bit more on this topic. Here is what is happening. The exchange headers used in the Camel part propagates into HTTP headers. I wasen't aware of this. Websphere is very strict about the content of the headers and a data object that I was using carried an illegal sequence inside its .toString method (illegal from Websphere HTTP header validation context). Jetty seems to ignore this. This leads to another question. Can I add headers to the "exchange.getOut.setHeader(..)" that can be prevented from propagating as HTTP headers with the SOAP communication? -- View this message in context: http://camel.465427.n5.nabble.com/Websphere-6-1-0-45-Unable-to-return-data-from-a-camel-cxf-component-POJO-mode-tp5726083p5726967.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Websphere 6.1.0.45: Unable to return data from a camel-cxf component (POJO mode)
You can remove the unwanted headers. On Tue, Feb 5, 2013 at 2:09 PM, panzerhans wrote: > I've been able to work a bit more on this topic. Here is what is happening. > > The exchange headers used in the Camel part propagates into HTTP headers. I > wasen't aware of this. > > Websphere is very strict about the content of the headers and a data object > that I was using carried an illegal sequence inside its .toString method > (illegal from Websphere HTTP header validation context). > Jetty seems to ignore this. > > This leads to another question. Can I add headers to the > "exchange.getOut.setHeader(..)" that can be prevented from propagating > as HTTP headers with the SOAP communication? > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Websphere-6-1-0-45-Unable-to-return-data-from-a-camel-cxf-component-POJO-mode-tp5726083p5726967.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Mocking an endpoint in a blueprint that contains a property placeholder
Hi, I have a simple blueprint route that uses camel-mail to send an email. The protocol (i.e. component), host and port are set up as property placeholders: When deployed to Fuse ESB the blueprint containing this route works fine. My problem comes when trying to mock the to endpoint in a unit test (which extends CamelBlueprintTestSupport). When I run my test I find that it's looking for a ComponentResolver for component={{email.protocol}}, which makes sense. Unfortunately this seems to be happening during the creation of the CamelContext so I can't mock it or replace it with a stub. I believe I could create a ComponentResolver to handle such a component, but I'd rather not. Is there a simpler solution? If you're wondering, I've got the component part of the endpoint as a property placeholder so we can easily configure smpt vs. smtps. Thanks This message contains confidential and proprietary information of the sender, and is intended only for the person(s) to whom it is addressed. Any use, distribution, copying, disclosure or taking of any action in reliance upon it by any other person is strictly prohibited. If you have received this message in error, please notify the e-mail sender immediately, and delete the original message without making a copy. Monitise accepts no liability if this email harms any systems or data of the recipient (including as a result of software virus infection or where this e-mail is modified or amended in any way during or following transmission) or if this email is accessed by anyone other than the person(s) to whom it is addressed. The Monitise group includes Monitise plc (Reg. No. 6011822), Monitise Group Limited (Reg. No. 5590897), Monitise International Limited (Reg. No. 5556711), Monitise Europe Limited (Reg. No. 4831976) and Mobile Money Network Limited (Reg. No. 7153130). These companies are registered in England and Wales and their registered office address is 95 Gresham Street, London, EC2V 7NA United Kingdom.
Re: Mocking an endpoint in a blueprint that contains a property placeholder
On Tue, Feb 5, 2013 at 3:18 PM, Martin Ford wrote: > Hi, > > > > I have a simple blueprint route that uses camel-mail to send an email. The > protocol (i.e. component), host and port are set up as property > > placeholders: > > > > > > > > > > > > > > When deployed to Fuse ESB the blueprint containing this route works fine. My > problem comes when trying to mock the to endpoint in a unit test (which > extends CamelBlueprintTestSupport). > > > > When I run my test I find that it's looking for a ComponentResolver for > component={{email.protocol}}, which makes sense. Unfortunately this seems to > be happening during the creation of the CamelContext so I can't mock it or > replace it with a stub. > > > > I believe I could create a ComponentResolver to handle such a component, but > I'd rather not. Is there a simpler solution? > > > > If you're wondering, I've got the component part of the endpoint as a > property placeholder so we can easily configure smpt vs. smtps. > I think there is a method on CamelTestSupport = useOverridePropertiesWithPropertiesComponent you can override and return the properties to use for testing. I guess we should document that on: http://camel.apache.org/camel-test.html. > > Thanks > > > > This message contains confidential and proprietary information of the sender, > and is intended only for the person(s) to whom it is addressed. Any use, > distribution, copying, disclosure or taking of any action in reliance upon it > by any other person is strictly prohibited. If you have received this message > in error, please notify the e-mail sender immediately, and delete the > original message without making a copy. Monitise accepts no liability if this > email harms any systems or data of the recipient (including as a result of > software virus infection or where this e-mail is modified or amended in any > way during or following transmission) or if this email is accessed by anyone > other than the person(s) to whom it is addressed. > > The Monitise group includes Monitise plc (Reg. No. 6011822), Monitise Group > Limited (Reg. No. 5590897), Monitise International Limited (Reg. No. > 5556711), Monitise Europe Limited (Reg. No. 4831976) and Mobile Money Network > Limited (Reg. No. 7153130). These companies are registered in England and > Wales and their registered office address is 95 Gresham Street, London, EC2V > 7NA United Kingdom. -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen
Re: [2.9.5] body=null after onException(_).handled(false)
Hi Alex, > When myBean.slip() throws SpecificException, If I print in.body in > handleSpecificException(), I can see that it is not null. > > If I print it again in handleFailed() it is now null. Actually I can't reproduce this problem neither under Camel 2.9.5 nor under Camel 2.10.1. Here is my minimal example trying to reproduce your behavior: __ public class ErrorHandler { public void exception(Exchange exchange) { System.out.println("Exception: " + exchange.getIn()); } public void completion(Exchange exchange) { System.out.println("Completion: " + exchange.getIn()); } public void router() { throw new RuntimeException(); } } CamelContext context = new DefaultCamelContext(); context.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { onCompletion().onFailureOnly().bean(new ErrorHandler(), "completion"); from("seda:start") .onException(Exception.class) .bean(new ErrorHandler(), "exception") .handled(false) .end() .dynamicRouter(bean(ErrorHandler.class, "router")); } }); context.start(); context.createProducerTemplate().sendBody("seda:start","msg"); __ The output produced by it indicates that both handlers work fine: __ Exception: Message: msg Completion: Message: msg __ If you would be so kind and create minimal Maven project with test case demonstrating the issue, I could debug it and tell you what is the problem. Best regards. -- Henryk Konsek http://henryk-konsek.blogspot.com
Re: Camel direct component
Hi Jothi, > Could anyone please let me know of a > practical example where the direct component would be a good fit? As a addition to what Willem wrote I would mention "abstraction". If you work on big Camel project spread across independent development teams, you can define contracts between routes with "direct" and "seda". For example you, as tech lead of the transformation module team, could define the following route... from("direct:transform").to(...some complex transformation routing goes here...).to("seda:transformed"); ...and say to the tech lead of the team consuming your transformation route - "If you want your message to be transformed, send it to the direct:transform endpoint. Results can be picked from the seda:transformed queue.". This approach is a life saver in the case of the geographically spread teams with different timezones working on the same deployable artifact :) . Best regards. -- Henryk Konsek http://henryk-konsek.blogspot.com
Re: camel-hazelcast & Transactions
If I use directly the transactionManager of TomEE, the problem is the same :/ I don't see where looking for now... Maybe I will find another day Thank for your help -- View this message in context: http://camel.465427.n5.nabble.com/camel-hazelcast-Transactions-tp5726943p5726980.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Websphere 6.1.0.45: Unable to return data from a camel-cxf component (POJO mode)
Yes, I removed the header, and that works fine. However carrying all exchange headers over to HTTP headers makes it very difficult to carry over "route payload" if the CXF endpoint was not the last endpoint. However, I am getting the feeling it is not going to be easily possible to respond back to the WS caller from the CXF bean, and continue processing, e.g. storing something on a queue etc. -- View this message in context: http://camel.465427.n5.nabble.com/Websphere-6-1-0-45-Unable-to-return-data-from-a-camel-cxf-component-POJO-mode-tp5726083p5726981.html Sent from the Camel - Users mailing list archive at Nabble.com.
Reference OSGI Blueprint java.util.Properties service in Blueprint Camel property placeholder
I want to have centralized shared properties (shared across camel contexts) to define things, particularly ActiveMQ endpoints. Furthermore, I want to avoid using /etc/custom.properties, unless I'm unaware of a refresh mechanism that doesn't require restarting karaf and therefore all bundles. A point of consideration here is that if I were to use this for endpoints, I would have to restart the bundles producing to and consuming from them in order to get changed property values. This is true. It still seems more concise than bouncing the whole VM and all bundles to get the new properties. Here's what I know I can do as a solution: I am able to reference a "java.util.Properties" service in one bundle when I inject it as a property on a bean such as a class that extends RouteBuilder in another bundle. This is perfectly viable, just not as elegant as I'd like. Here's what I think I should be able to do as a solution: It appears I should be able to reference the service since it represents a java.util.Properties object through the property placeholder thereby using only the replacement capabilities in Camel, such as {{event.endpoint}} whether in Blueprint DSL or in Java. Ultimately I'm trying not to have to have some Java code to access shared properties. I've actually tried a few permutations of the following xml snippets but this demonstrates exactly what I'm trying to accomplish. After these snippets I've posted some of the stack trace from karaf. I'm a little confused why it's throwing a FileNotFoundException. I guess a subordinate question is, does there need to be a concrete properties file somewhere or do I possibly lack the setup of a proper Registry (see http://camel.apache.org/using-propertyplaceholder.html under Using Properties from the Registry section). If am missing something on the registry maybe I need to do a little more reading on that subject. I'm using Karaf 2.2.5.fuse-70-097 and Camel 2.9.0.fuse-70-097 in FuseESB 7.0.2.fuse-097 Here is the blueprint in the service bundle: http://www.osgi.org/xmlns/blueprint/v1.0.0"; xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"; xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0";> activemq:myapp.event.queue activemq:myapp.command.queue Here is the blueprint for the camel route bundle: http://www.osgi.org/xmlns/blueprint/v1.0.0"; xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"; xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"; xmlns:amq="http://activemq.apache.org/schema/core"; xmlns:cml="http://camel.apache.org/schema/blueprint"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd http://camel.apache.org/schema/blueprint/camel-blueprint-2.9.0.xsd";> Hello Universe Karaf log includes the following: 2013-02-05 10:40:12,455 | ERROR | l-0.0.0-thread-1 | BlueprintContainerImpl | 10 - org.apache.aries.blueprint - 0.3.1.fuse-70-097 | Unable to start blueprint container for bundle a-route.xml org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to intialize bean test-camel-context Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route23: Route[[From[{{event.endpoint}}]] -> [SetBody[consta... because of Failed to resolve endpoint: {{event.endpoint}} due to: Properties vmProperties not found in registry ... Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: {{event.endpoint}} due to: Properties vmProperties not found in registry ... Caused by: java.io.FileNotFoundException: Properties vmProperties not found in registry -- View this message in context: http://camel.465427.n5.nabble.com/Reference-OSGI-Blueprint-java-util-Properties-service-in-Blueprint-Camel-property-placeholder-tp5726985.html Sent from the Camel - Users mailing list archive at Nabble.com.
Quickfix component as initiator - How do I insert user and password to logon
Hi, Im trying to create a system that converts http messages to Fix messages to send to an Exchange (my systems acts as the initiator). What I cannot figure is how I can insert user and password fields to FIX's Logon message (or for that matter, how can I start the FIX connection on demand). I tried to do something like this inside my RouteBuilder (FixLoginRequestProcessor creates a FIX Logon message with the apropiate credentials): from("jetty:{{http.login}}"). process(new FixLoginRequestProcessor()). to("quickfix:receptor.cfg"); But whenever I start the route the FIX engine kicks in automatically and sets up the connection without even going throug the processor (and without sending the user credentials). Is there a way to intercept the automatic Logon message or create the route without starting FIX engine? Yours Pablo -- View this message in context: http://camel.465427.n5.nabble.com/Quickfix-component-as-initiator-How-do-I-insert-user-and-password-to-logon-tp5726991.html Sent from the Camel - Users mailing list archive at Nabble.com.
RE: Camel-Crypto ElGamal encryption works in mvn camel:run but not in Karaf/OSGi
Still on my to do list... Sent from a mobile device Am 05.02.2013 00:07 schrieb "Patel, Gaurav" : > Was anyone able to reproduce? > > I've run the scenario on ServiceMix, Karaf + Camel and FuseESB (linux and > windows) all to the same effect: no key spec. I've even tried installing > Bouncy Castle and the unlimited security policy against my JDK/JRE and not > putting anything into Karaf/lib/ext and nothing changes. Should I ask this > question to the Karaf DL instead of the Camel one? > > Gaurav > > > -Original Message- > From: Christian Müller [mailto:christian.muel...@gmail.com] > Sent: Monday, January 28, 2013 5:30 PM > To: users@camel.apache.org > Subject: Re: Camel-Crypto ElGamal encryption works in mvn camel:run but > not in Karaf/OSGi > > I'm trying to reproduce the issue... > > Best, > Christian > > On Mon, Jan 28, 2013 at 5:38 PM, Patel, Gaurav > wrote: > > > Karaf version 2.2.10 > > Camel 2.10.3 > > > > What's odd to me is that a certain types of keys work in Karaf but the > > other ones do not. It's not a complete failure where I can't get > > camel-crypto working on Karaf, just ElGamal keys. > > > > Is there a way I can setup debug logging to see what the error is > > beyond the stack trace? > > > > Gaurav > > > > > > -Original Message- > > From: Claus Ibsen [mailto:claus.ib...@gmail.com] > > Sent: Saturday, January 26, 2013 4:26 AM > > To: users@camel.apache.org > > Subject: Re: Camel-Crypto ElGamal encryption works in mvn camel:run > > but not in Karaf/OSGi > > > > Hi > > > > You should tell which Karaf version you use. > > But OSGi can be tricky to get working. > > > > > > On Thu, Jan 24, 2013 at 7:04 PM, Patel, Gaurav > > wrote: > > > I have camel 2.10.3 installed and am using the example > > pubring-ElGamal.gpg from > > > 'components\camel-crypto\src\test\resources\org\apache\camel\component\crypto' > > in camel-crypto and user 'sd...@nowhere.net'. > > > > > > When I run the camel route with mvn camel:run, the RSA encryption > > > works > > perfectly as well as the DSA + ElGamal encryption. When I move this > > exact route to Karaf, the RSA encryption continues to work but the DSA > > + ElGamal gives the following stack trace: > > > > > > org.bouncycastle.openpgp.PGPException: exception encrypting session > > > key > > at org.bouncycastle.openpgp.PGPEncryptedDataGenerator.open(Unknown > > Source) at > > org.bouncycastle.openpgp.PGPEncryptedDataGenerator.open(Unknown > > Source) at > > org.apache.camel.converter.crypto.PGPDataFormat.marshal(PGPDataFormat. > > java:86) > > at > > org.apache.camel.processor.MarshalProcessor.process(MarshalProcessor.j > > ava:59) > > at > > org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncPr > > ocessorBridge.process(AsyncProcessorConverterHelper.java:61) > > at > > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelpe > > r.java:73) > > at > > org.apache.camel.processor.DelegateAsyncProcessor.processNext(Delegate > > AsyncProcessor.java:99) > > at > > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyn > > cProcessor.java:90) > > at > > org.apache.camel.management.InstrumentationProcessor.process(Instrumen > > tationProcessor.java:73) > > at > > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelpe > > r.java:73) > > at > > org.apache.camel.processor.DelegateAsyncProcessor.processNext(Delegate > > AsyncProcessor.java:99) > > at > > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyn > > cProcessor.java:90) > > at > > org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceI > > nterceptor.java:91) > > at > > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelpe > > r.java:73) > > at > > org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler( > > RedeliveryErrorHandler.java:334) > > at > > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryEr > > rorHandler.java:220) > > at > > org.apache.camel.processor.RouteContextProcessor.processNext(RouteCont > > extProcessor.java:45) > > at > > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyn > > cProcessor.java:90) > > at > > org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultC > > hannel.java:303) > > at > > org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelpe > > r.java:73) at > > org.apache.camel.processor.Pipeline.process(Pipeline.java:117) at > > org.apache.camel.processor.Pipeline.process(Pipeline.java:80) at > > org.apache.camel.processor.RouteContextProcessor.processNext(RouteCont > > extProcessor.java:45) > > at > > org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyn > > cProcessor.java:90) > > at > > org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWork > > Processor.java:150) > > at > > org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProce > > ssor.java:117) > > at > > org.apache.camel.processor.RouteInflightRepositoryProcesso
Re: Quickfix component as initiator - How do I insert user and password to logon
Can you configure it in the quickfix config? Sent from a mobile device Am 05.02.2013 19:59 schrieb "pvenini" : > Hi, Im trying to create a system that converts http messages to Fix > messages > to send to an Exchange (my systems acts as the initiator). What I cannot > figure is how I can insert user and password fields to FIX's Logon message > (or for that matter, how can I start the FIX connection on demand). I tried > to do something like this inside my RouteBuilder (FixLoginRequestProcessor > creates a FIX Logon message with the apropiate credentials): > > from("jetty:{{http.login}}"). > process(new FixLoginRequestProcessor()). > to("quickfix:receptor.cfg"); > > But whenever I start the route the FIX engine kicks in automatically and > sets up the connection without even going throug the processor (and without > sending the user credentials). > Is there a way to intercept the automatic Logon message or create the route > without starting FIX engine? > > Yours > > Pablo > > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Quickfix-component-as-initiator-How-do-I-insert-user-and-password-to-logon-tp5726991.html > Sent from the Camel - Users mailing list archive at Nabble.com. >
Re: Camel direct component
Hi Jothi, A direct: endpoint provides a synchronous, in memory call which is probably the simplest, most basic way in which two endpoints could communicate. In real life endpoints almost never share the memory space, right? So the answer to your question revolves around those usecases where the two endpoints share the memory space. One is, like you mentioned, kinda artificially splitting a route in two and use a direct endpoint to connect them, sorta like using continuations. It allows for separation of routes into parts that have different roles and make them easier to manage. There is a second probably even more interesting set of usecases, mostly useful during development/testing in different test environments, where you would use a direct endpoint (and a route) to mock an external service not available in that particular environment. Mocking it out, allows you to continue your integration work with minimal impact. Things are even easier if you externalize your uris using things like the properties component, because then the only thing that changes is a string in a text file. And there are obviously others, unit testing was mentioned. I hope this helps, Hadrian On 02/04/2013 04:42 PM, Joe San wrote: Camel users, I came across the direct component. As I understand that this component is used to tie routes together in the same camel context, I'm not able to think of any practical use cases. Could anyone please let me know of a practical example where the direct component would be a good fit? Regards, Jothi
Re: Error invoking restful webservice
Check the casing of your CXF bean ids. Spring is case sensitive. On 5 Feb 2013 20:41, "Hariprasath Manivannan" wrote: > Hi, > > I am having the followig end points > > > http://www.springframework.org/schema/beans"; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > xmlns:cxf="http://camel.apache.org/schema/cxf"; > xsi:schemaLocation="http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans.xsd > http://camel.apache.org/schema/cxf > http://camel.apache.org/schema/cxf/camel-cxf.xsd > http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd";> > > > address="http://myserver:9084/App_service_facade/services/Service1"; > serviceClass="com.example.ServiceOne" > /> > > http://myserver:9084/App_service_facade/services/Service2"; > serviceClass="com.example.ServiceTwo"/> > > > > and the following routes > > http://www.springframework.org/schema/beans"; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > xsi:schemaLocation="http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans-3.0.xsd > http://camel.apache.org/schema/spring > http://camel.apache.org/schema/spring/camel-spring.xsd > http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd";> > > > > > > http://camel.apache.org/schema/spring";> > > > > > > > > > > > So I am trying to invoke two webservice, one after another. The first one > is SOAP and the second one is restful. If I dont have the restful service > invocation, the route works. However with the above route, I get the > following exception during server startup > > Caused by: org.apache.camel.NoSuchBeanException: No bean could be found in > the registry for: App2Endpoint of type: > org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean > at > > org.apache.camel.util.CamelContextHelper.mandatoryLookup(CamelContextHelper.java:130) > at > > org.apache.camel.component.cxf.jaxrs.CxfRsComponent.createEndpoint(CxfRsComponent.java:55) > at > > org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:91) > at > > org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:461) > > I've been stuck on this for days. Any pointers please. > > Thanks, > Hari >
Configuring SSL for CXF-RS consumers in Camel
Hello guys, just a quick question, because, I'm a little bit lost… What is the preffered way to configure SSL for REST interface in Camel project? I'm using CXF-RS and so far, sending requests via http was good enough, but now it gets more serious and I need https… I have found that one possibility could be through "PAX web" and the second one "http conduit". Is it so? What is the difference? At least the PAX web was not working for me, I have very similar scenario what is discussed in this thread ( http://camel.465427.n5.nabble.com/Camel-CXF-HTTPS-td5721517.html) but the "https" resource was not working (connection refused), following the advices in the discussion there. Now I'm going to take a look on "http conduit", but anyway, I'd like to ask you for hints. Thanks! -- S pozdravem / Best regards Martin Stiborský Jabber: st...@njs.netlab.cz Twitter: http://www.twitter.com/stibi
Re: RestFul service using camel
Something like this: https://github.com/muellerc/camel-in-daily-use/blob/master/part-2/src/main/java/org/apache/cmueller/camel/sus/cidu/part1/PrepareRestRequest.java Best, Christian On Tue, Feb 5, 2013 at 5:56 AM, Richa wrote: > Thank you for your reply. But can you please help me with a sample code. I > am > trying to invoke my rest service using the cxfrs. I am putting the method > name in the exchange header, but still I am not able to invoke the message > and get the response. Kindly provide a sample code for my reference. > Thank you > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/RestFul-service-using-camel-tp5726656p5726939.html > Sent from the Camel - Users mailing list archive at Nabble.com. > --
Re: Reference OSGI Blueprint java.util.Properties service in Blueprint Camel property placeholder
Hi, As Camel property placeholder supports to lookup the Properties from the bean reference with the prefix "ref:BeanId", I think you just need to add a reference of the property service in the camel route bundle. -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Wednesday, February 6, 2013 at 2:13 AM, CharlieD wrote: > I want to have centralized shared properties (shared across camel contexts) > to define things, particularly ActiveMQ endpoints. Furthermore, I want to > avoid using /etc/custom.properties, unless I'm unaware of a refresh > mechanism that doesn't require restarting karaf and therefore all bundles. A > point of consideration here is that if I were to use this for endpoints, I > would have to restart the bundles producing to and consuming from them in > order to get changed property values. This is true. It still seems more > concise than bouncing the whole VM and all bundles to get the new > properties. > > Here's what I know I can do as a solution: > I am able to reference a "java.util.Properties" service in one bundle when I > inject it as a property on a bean such as a class that extends RouteBuilder > in another bundle. This is perfectly viable, just not as elegant as I'd > like. > > Here's what I think I should be able to do as a solution: > It appears I should be able to reference the service since it represents a > java.util.Properties object through the property placeholder thereby using > only the replacement capabilities in Camel, such as {{event.endpoint}} > whether in Blueprint DSL or in Java. Ultimately I'm trying not to have to > have some Java code to access shared properties. > > I've actually tried a few permutations of the following xml snippets but > this demonstrates exactly what I'm trying to accomplish. After these > snippets I've posted some of the stack trace from karaf. I'm a little > confused why it's throwing a FileNotFoundException. I guess a subordinate > question is, does there need to be a concrete properties file somewhere or > do I possibly lack the setup of a proper Registry (see > http://camel.apache.org/using-propertyplaceholder.html under Using > Properties from the Registry section). If am missing something on the > registry maybe I need to do a little more reading on that subject. > > I'm using Karaf 2.2.5.fuse-70-097 and Camel 2.9.0.fuse-70-097 in FuseESB > 7.0.2.fuse-097 > > Here is the blueprint in the service bundle: > > http://www.osgi.org/xmlns/blueprint/v1.0.0"; > > xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"; > xmlns:blueprint="http://www.osgi.org/xmlns/blueprint/v1.0.0";> > > > > > > key="event.endpoint">activemq:myapp.event.queue > key="command.endpoint">activemq:myapp.command.queue > > > > > > > Here is the blueprint for the camel route bundle: > > http://www.osgi.org/xmlns/blueprint/v1.0.0"; > > xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"; > > xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"; > xmlns:amq="http://activemq.apache.org/schema/core"; > xmlns:cml="http://camel.apache.org/schema/blueprint"; > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 > http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd > http://camel.apache.org/schema/blueprint/camel-blueprint-2.9.0.xsd";> > > > > > > > Hello Universe > > > > > > > > > > > > > > Karaf log includes the following: > > 2013-02-05 10:40:12,455 | ERROR | l-0.0.0-thread-1 | BlueprintContainerImpl > | 10 - org.apache.aries.blueprint - 0.3.1.fuse-70-097 | Unable to start > blueprint container for bundle a-route.xml > org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to > intialize bean test-camel-context > > Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create > route route23: Route[[From[{{event.endpoint}}]] -> [SetBody[consta... > because of Failed to resolve endpoint: {{event.endpoint}} due to: Properties > vmProperties not found in registry > ... > Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to > resolve endpoint: {{event.endpoint}} due to: Properties vmProperties not > found in registry > ... > Caused by: java.io.FileNotFoundException: Properties vmProperties not found > in registry > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Reference-OSGI-Blueprint-java-util-Properties-service-in-Blueprint-Camel-property-placeholder-tp5726985.html > Sent from the Camel - Users mailing list archive at Nabble.com > (http://Nabble.com).
Re: Transforming large mainframe file
Thanks a lot. It helped lot. I found a help on how to improve the speed also. http://www.catify.com/2012/07/09/parsing-large-files-with-apache-camel/ But, I am unable to convert this into Spring DSL. Any help will be greatly appricated.. Here is my equivalent JAVA DSL from("file:F:/EbcConversion/Data/inbox?noop=true"). split().method("mySplitterBean", "testBody").streaming(). process( new NewDecoder()). aggregate(header(Exchange.FILE_NAME_ONLY), new StringBodyAggregator()).completionSize(750) .completionTimeout(1500). to("file:F:/EbcConversion/Data/outbox/files?fileExist=Append&fileName=output.txt"); -- View this message in context: http://camel.465427.n5.nabble.com/Transforming-large-mainframe-file-tp5726423p5726988.html Sent from the Camel - Users mailing list archive at Nabble.com.
sftp - NoSuchMethodError ...SftpConsumer.isValidFile
Hi, i'm testing the SFTP/FTP over multiple operting systems, when I test it on a Linux RH 5.0 i'm getting an exception. Don't understand what is wrong. Could you help me? The exception i'm getting is: +++ [ - sftp://root@129.222.138.155] SftpOperations INFO JSCH -> Authentications that can continue: password [ - sftp://root@129.222.138.155] SftpOperations INFO JSCH -> Next authentication method: password [ - sftp://root@129.222.138.155] SftpOperations INFO JSCH -> Authentication succeeded (password). [ - sftp://root@129.222.138.155] SftpOperations INFO Connected to sftp://root@129.222.138.155:22 [ - sftp://root@129.222.138.155] SftpConsumer INFO Connected and logged in to: sftp://root@129.222.138.155:22 [ - sftp://root@129.222.138.155] SftpConsumer WARN Consumer Consumer[sftp://root@129.222.138.155?delay=6&passiveMode=true&password=**] failed polling endpoint: Endpoint[sftp://root@129.222.138.155?delay=6&passiveMode=true&password=**]. Will try again at next poll. Caused by: [java.lang.NoSuchMethodError - org.apache.camel.component.file.remote.SftpConsumer.isValidFile(Lorg/apache/camel/component/file/GenericFile;Z)Z] java.lang.NoSuchMethodError: org.apache.camel.component.file.remote.SftpConsumer.isValidFile(Lorg/apache/camel/component/file/GenericFile;Z)Z at org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:121) at org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:50) at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:107) at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:142) at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) +++ My Spring DSL +++ http://camel.apache.org/schema/blueprint";> ftp://root@129.222.138.155?password=password&delay=6&passiveMode=true"/> +++ My pom has these line +++ org.apache.camel camel-ftp 2.10.3 +++ Thanks -- View this message in context: http://camel.465427.n5.nabble.com/sftp-NoSuchMethodError-SftpConsumer-isValidFile-tp5726990.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: sftp - NoSuchMethodError ...SftpConsumer.isValidFile
It looks like you are using different version of camel-core and camel-ftp. Can you check those jars version in you class path ? -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Wednesday, February 6, 2013 at 2:55 AM, guillermo.flores wrote: > Hi, i'm testing the SFTP/FTP over multiple operting systems, when I test it > on a Linux RH 5.0 i'm getting an exception. Don't understand what is wrong. > Could you help me? > > The exception i'm getting is: > +++ > [ - sftp://root@129.222.138.155 (mailto:root@129.222.138.155)] SftpOperations > INFO JSCH > -> Authentications that can continue: password > [ - sftp://root@129.222.138.155 (mailto:root@129.222.138.155)] SftpOperations > INFO JSCH > -> Next authentication method: password > [ - sftp://root@129.222.138.155 (mailto:root@129.222.138.155)] SftpOperations > INFO JSCH > -> Authentication succeeded (password). > [ - sftp://root@129.222.138.155 (mailto:root@129.222.138.155)] SftpOperations > INFO > Connected to sftp://root@129.222.138.155 (mailto:root@129.222.138.155):22 > [ - sftp://root@129.222.138.155 (mailto:root@129.222.138.155)] SftpConsumer > INFO > Connected and logged in to: sftp://root@129.222.138.155 > (mailto:root@129.222.138.155):22 > [ - sftp://root@129.222.138.155 (mailto:root@129.222.138.155)] SftpConsumer > WARN > Consumer > Consumer[sftp://root@129.222.138.155?delay=6&passiveMode=true&password=**] > (mailto:root@129.222.138.155?delay=6&passiveMode=true&password=**]) > failed polling endpoint: > Endpoint[sftp://root@129.222.138.155?delay=6&passiveMode=true&password=**]. > (mailto:root@129.222.138.155?delay=6&passiveMode=true&password=**].) > Will try again at next poll. Caused by: [java.lang.NoSuchMethodError - > org.apache.camel.component.file.remote.SftpConsumer.isValidFile(Lorg/apache/camel/component/file/GenericFile;Z)Z] > java.lang.NoSuchMethodError: > org.apache.camel.component.file.remote.SftpConsumer.isValidFile(Lorg/apache/camel/component/file/GenericFile;Z)Z > at > org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:121) > at > org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:50) > at > org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:107) > at > org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:142) > at > org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) > at > java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:662) > +++ > > My Spring DSL > +++ > xmlns="http://camel.apache.org/schema/blueprint";> > > uri="sftp://root@129.222.138.155?password=password&delay=6&passiveMode=true > > (mailto:root@129.222.138.155?password=password&delay=6&passiveMode=true)"/> > > > > > +++ > > > My pom has these line > +++ > > org.apache.camel > camel-ftp > 2.10.3 > > > +++ > > Thanks > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/sftp-NoSuchMethodError-SftpConsumer-isValidFile-tp5726990.html > Sent from the Camel - Users mailing list archive at Nabble.com > (http://Nabble.com).
Re: Java DSL vs Spring Dsl with Splitter and Aggregator
Can you put the after the ? The aggregator should be done after the split. -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Wednesday, February 6, 2013 at 6:28 AM, Gvvenkat wrote: > I am trying convert one of the JAVA DSL into Spring DSL. Java DSL reads the > file and applies the processor correctly and finally invokes the aggregator > and writes into the destination location ( also removes from the source > location as required). > > But Below equivalent (in opinion Spring DSL :) ) , does not invoke the > aggregator and never writes the destination file and does not remove the > source file so starts looping...One other important thing I should mention > is , I ambootstraping the applicationcontext xml using > org.apache.camel.spring.Main class. > > Here is both JAVA DSL and Spring DSL.. Can some expert help me in > identifying the issue why Spring DSL behaviour is not the same as Java DSL. > > Spring Dsl > > http://camel.apache.org/schema/spring";> > > > > from uri="file:F:/EbcConversion/Data/inbox/? > delete=true&idempotent=true&readLock=changed&readLockCheckInterval=1500"/> > > > > > > > > > > completionTimeout="1500" completionSize="750" > > > Exchange.FILE_NAME_ONLY > > > > uri="file:F:/EbcConversion/Data/outbox/files/?fileExist=Append&fileName=output.txt" > /> > > > > > > Java DSL > > from("file:F:/EbcConversion/Data/inbox?delete=true&idempotent=true&readLock=changed&readLockCheckInterval=1500"). > split().method("mySplitterBean", "testBody").streaming(). > process( new NewDecoder()). > aggregate(header(Exchange.FILE_NAME_ONLY), > new StringBodyAggregator()).completionSize(750) > .completionTimeout(1500). > to("file:F:/EbcConversion/Data/outbox/files?fileExist=Append&fileName=output.txt"); > > > Thanks a lot. > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Java-DSL-vs-Spring-Dsl-with-Splitter-and-Aggregator-tp5727007.html > Sent from the Camel - Users mailing list archive at Nabble.com > (http://Nabble.com).
Exception in restful web service
Hi, I have a restful webservice that I am invoking using camel-cxf. I want to call a particular function on the server. I can call the server but I am getting the following exception while processing: org.apache.cxf.jaxrs.client.ClientWebApplicationException: .No message body reader has been found for class : class com.amadeus.Server.Hello, ContentType : application/xml. My method in the server that I am invoking is as follows: @GET @Path("/xmlHello") @Produces ( "application/xml" ) public String sayXMLHello() { return "Server says hello"; } Kindly help me with tihs problem. -- View this message in context: http://camel.465427.n5.nabble.com/Exception-in-restful-web-service-tp5727019.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Java DSL vs Spring Dsl with Splitter and Aggregator
Hi, I'm not sure why you are using the mock endpoint. Can you just change the aggregate part like this ? Exchange.FILE_NAME_ONLY -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Wednesday, February 6, 2013 at 11:28 AM, Gvvenkat wrote: > Thanks William for your quick response. > > I made the change as below..but still no difference.. Please let me know, I > did not understand your instructions correctly. > > Thanks > > > > > uri="file:F:/EbcConversion/Data/inbox/?delete=true&idempotent=true&readLock=changed&readLockCheckInterval=1500"/> > > > > > > > > > completionTimeout="1500" completionSize="750" > > > Exchange.FILE_NAME_ONLY > > > > uri="file:F:/EbcConversion/Data/outbox/files/?fileExist=Append&fileName=output.txt" > /> > > > > > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Java-DSL-vs-Spring-Dsl-with-Splitter-and-Aggregator-tp5727007p5727017.html > Sent from the Camel - Users mailing list archive at Nabble.com > (http://Nabble.com).
Re: Exception in restful web service
Can you access the service with simple http get request? For the Exception I look like the client has some trouble to read the message. -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Wednesday, February 6, 2013 at 1:12 PM, Richa wrote: > Hi, > I have a restful webservice that I am invoking using camel-cxf. I want to > call a particular function on the server. I can call the server but I am > getting the following exception while processing: > > org.apache.cxf.jaxrs.client.ClientWebApplicationException: .No message body > reader has been found for class : class com.amadeus.Server.Hello, > ContentType : application/xml. > > My method in the server that I am invoking is as follows: > > @GET > @Path("/xmlHello") > @Produces ( "application/xml" ) > public String sayXMLHello() { > > return "Server says hello"; > > } > > Kindly help me with tihs problem. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Exception-in-restful-web-service-tp5727019.html > Sent from the Camel - Users mailing list archive at Nabble.com > (http://Nabble.com).
Error handling - Want to send emails on errors
Hi, I am new to Camel and slowly coming to terms with it. I want a custom error handler so that i does the error mapping (code, description etc) and return custom messages back to the clients. As part of this i want to send emails to admin with the error information. I noticed threads where slow SMTP/Mail server issues can cause trouble http://stackoverflow.com/questions/7107616/apache-camel-smtp-component-hangs-the-whole-bus-if-mailserver-is-down I simply want the mail to be sent out as a one-way call and not worry about how/when the email is sent out and i want the control to be returned immediately to the pipeline and back to the client. I was thinking of invoking the email in my Error Processor and I don't think i will have a chance here to make it an async (one-way call). Appreciate if people could pitch in with their thoughts and suggestions. Thanks Manglu -- View this message in context: http://camel.465427.n5.nabble.com/Error-handling-Want-to-send-emails-on-errors-tp5727021.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Exception in restful web service
Thank you for the reply Willem. Yes, I can access the rest service with simple get request. If I type the url for accessing the function in the browser, I get the output on the browser window. But in this case, my function is accessed ( I have a sysout in the function which tells me that the function is hit ) but I always get this exception in the out body of the exchange. -- View this message in context: http://camel.465427.n5.nabble.com/Exception-in-restful-web-service-tp5727019p5727023.html Sent from the Camel - Users mailing list archive at Nabble.com.