Re: AggregationStrategyBeanAdapter potential issue when using POJO aggregator and receiving null response
Hi Claus, It is not a timeout. The null body is the response from the endpoint (a bean method in my case). I think it would be great, alt least for this use-case, to allow null body from an endpoint to be handled by a POJO aggregator. Thanks, Radu B. On Thu, May 29, 2014 at 4:26 PM, Claus Ibsen claus.ib...@gmail.com wrote: On Fri, May 23, 2014 at 3:32 PM, Radu Badita radu.bad...@gmail.com wrote: Checked the documentation and understood. Basically the attribute AggregationStrategyBeanAdater.allowNullNewExchange has to be true. But it doesn't work since the newExchange is not null, instead only its in-message body is null. Therefore the following: if (!allowNullNewExchange newExchange == null) { return oldExchange; } is not is not executed and it still continues to attempt to extract and convert the in-body (which fails). Hi Did your enrich hit a timeout, or is the null body indeed a response from the enrich endpoint you used? We could look into adding an option to allow null body as a valid response. On Fri, May 23, 2014 at 4:13 PM, Claus Ibsen claus.ib...@gmail.com wrote: Hi See bottom of this page about no data http://camel.apache.org/aggregator2 On Fri, May 23, 2014 at 3:06 PM, Radu Badita radu.bad...@gmail.com wrote: Thanks for the reply, but allowNullBody is not under user control as it is set in AggregationStrategyBeanInfo(99) when calling: Expression newBody = ExpressionBuilder.mandatoryBodyExpression(newType); because mandatoryBodyExpression() just calls mandatoryBodyExpression(type, false) where the second param is nullBodyAllowed. I don't see any attribute to control AggregationStrategyBeanInfo.createMethodInfo()'s behavior at that point, so either default should not ask for mandatory body, or it should be configurable somehow. On Fri, May 23, 2014 at 12:39 PM, Claus Ibsen claus.ib...@gmail.com wrote: You need to turn on allowNullBody or something like that On Fri, May 23, 2014 at 11:33 AM, Radu Badita radu.bad...@gmail.com wrote: Hi all, I'm fairly new Camel user, but I'm pretty sure this is an issue: I'm using a POJO Aggregator to aggregate the response from an Enrich EAI. The strategy method has two parameters, one for the 'oldExchange' message body and the other for the 'newExchange' message body; in my case a Map and an Object respectively. The problem is that when the response is null, before my aggregation strategy method is invoked, message body has to be obtained from the 'newExchange' which is not null, but the in-message body is. The object is extracted with mandatoryBodyExpression which throws exception: InvalidPayloadException: No body available of type: java.lang.Object on: Message: [Body is null]. Is there a reason to require mandatory body in response? In this case I guess null responses cannot be handled, so probably it shouldn't. Regards, Radu B -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/ -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/ -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
Re: Redeliver policy keep parking threads
Can you please share your route definition with us? Which version do you use? Best, Christian Am 19.05.2014 12:06 schrieb poussma mathieu.pou...@zenika.com: Hello, I have a route that tries to redeliver the messages in case of the destination is not available. I noticed when camel tries to redeliver a message, the thread that was originality handling the message seems to be parked and waiting for the redeliver termination. If my route fails to send 1000 messages, I'll have 1000 threads waiting in memory for the redeliver to finish. The problem is that is has been resulting to generate dozen of java.lang.OutOfMemoryError: unable to create new native thread I tried the asyncDelayedRedelivery but is did not change that much. Is there a way to tell camel to free the threads during the redeliver delay ? Thanks in advance M. -- View this message in context: http://camel.465427.n5.nabble.com/Redeliver-policy-keep-parking-threads-tp5751283.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Validator in camel route shows strange error message
Which version do you use? Best, Christian Am 13.05.2014 17:14 schrieb yuncil jonas.stei...@hotmail.de: I tested it with another schema file, and the test successfully passed. The original schema file has many includes and the included files also have many includes, consequently there are lots of references to resolve. Could it be a streaming issue or similar? -- View this message in context: http://camel.465427.n5.nabble.com/Validator-in-camel-route-shows-strange-error-message-tp5751018p5751066.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: SMPP type connection.
You should be able to configure log4j in a way that this class logs into a different file. May this helps? Best, Christian Am 06.05.2014 12:53 schrieb PinkSs vkrn...@gmail.com: Hi All, I am using amq+camel+smpp for working with SMSC. I used SMPP as camel coponent and use these endpoints in routes. I want to monitor on SMPP connection bind, logs every SMSC bind and unbind in separate file than activemq.log. Kindly guide me in approaching the mentioned event scenario. -- View this message in context: http://camel.465427.n5.nabble.com/SMPP-type-connection-tp2796517p5750912.html Sent from the Camel - Users mailing list archive at Nabble.com.
Camel-hbase : problem with qualifier id
Hello, I'm not sure if this is a bug or an undocumented feature so I put this here. When using camel-hbase's producer, if you want to use an HBase qualifier with the value id, it doesn't work. For example : I have an HBase table registrations with a family token and a qualifier id. To scan it, I use this route : However the result doesn't give the database values. I tryed with another qualifier and it worked fine. I found out that when the producer tries to resolve the input parameters, this instruction goes wrong : This should get a String with the value id, but instead it gets the value of the breadcrumbID header which is ID-L83577-52983-1403687981986-0-1. Thanks -- View this message in context: http://camel.465427.n5.nabble.com/Camel-hbase-problem-with-qualifier-id-tp5752781.html Sent from the Camel - Users mailing list archive at Nabble.com.
Parlay Rest SMS with Apache Camel
Hi All, Please find below How we can send Parlay Rest SMS with Apache Camel. http://imranrazakh.blogspot.ae/2014/04/parlay-rest-sms-with-apache-camel.html Regards -- View this message in context: http://camel.465427.n5.nabble.com/Parlay-Rest-SMS-with-Apache-Camel-tp5752787.html Sent from the Camel - Users mailing list archive at Nabble.com.
Camel AdviceWith issues
Hello Its my long pending doubt on using AOP stuffs in Camel while writing test cases. 1. weavebyid - works only with processors like Choice, doTry, Multicast. It doesn't work with endpoints. Especially with 'To' endpoints. ( For 'From' endpoint we anyway have ReplaceFromWith ) 2. weavebyToString - It works with 'To' endpoints. If we have a endpoint called to ref=cloud-endpoint / then why it expects a wild card like this ? weaveByToString(.*cloud-endpoint*.).remove(); 3. If my 'To' endpoint is inside a processor like Choice . Then weaveByToString remove the choice also . Even if choice and the To endpoint have different id's. Its manageable to write test cases with existing features, but Camel will become more interesting if these issues are sorted out :) A happy camel rider ! Guru -- View this message in context: http://camel.465427.n5.nabble.com/Camel-AdviceWith-issues-tp5752786.html Sent from the Camel - Users mailing list archive at Nabble.com.
CXFRS documentation
Some context first: 1. I am trying to implement a REST service containing a number of methods using CXFRS 2. The routes will be one part of a bigger war which will be deployed in Tomcat. 3. I am trying to use bindingStyle=SimpleConsumer The problem is that I find some of the xml configuration examples a little confusing, particularly the references to *org.apache.camel.component.cxf.jaxrs.testbean.CustomerService* For the server, why is this class needed at all, couldn't *org.apache.camel.component.cxf.jaxrs.testbean.CustomerServiceResource* be used instead? The real implementation should be in the Camel routes. Then there are Tomcat, there are an OK example showing how to configure CXF endpoints for JAX-WS for use within Tomcat, but no similar documentation for CXFRS, I just assume that the JAX-WS related information is relevant for CXFRS too. -- View this message in context: http://camel.465427.n5.nabble.com/CXFRS-documentation-tp5752788.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: CXFRS documentation
The main reason I am looking into this at all is that the restlet component doesn't offer a clean way of specifying and handling of QueryParameters, the route description only contains the PathParameters (@PathParam vs. @QueryParam annotations in JAX-RS) It is possible to extract them from the CamelHttpQuery but this is quite cumbersome when implementing this for lots of individual routes; we don't want to add headers further down the processing chain unless them being needed. A route option on the restlet component supporting QueryParams would help a lot, something like queryParams=SortBy:name,SortingOrder:asc or something similar. What needs to be added is a list of QueryParams with optional default values. -- View this message in context: http://camel.465427.n5.nabble.com/CXFRS-documentation-tp5752788p5752789.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problems with file component.
As noted in a my latest comment on the Jira issue there might be possible to work around this problem using filters. See comments jira issue for further details. -- View this message in context: http://camel.465427.n5.nabble.com/Problems-with-file-component-tp5752629p5752790.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel mail: content-transfer-encoding configurable
Ticket created, see https://issues.apache.org/jira/browse/CAMEL-7536. Looking forward to provide a patch. kind regards, Christoph -- View this message in context: http://camel.465427.n5.nabble.com/camel-mail-content-transfer-encoding-configurable-tp5752504p5752791.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel-sent email content goes to an attachment ATT00001.xml?
Hi all, seems this is not a problem of Camel but of Microsoft exchange servers. See: http://support.microsoft.com/kb/969854/en-us or http://kb.mit.edu/confluence/pages/viewpage.action?pageId=4981187 Regards -- View this message in context: http://camel.465427.n5.nabble.com/Camel-sent-email-content-goes-to-an-attachment-ATT1-xml-tp4689081p5752793.html Sent from the Camel - Users mailing list archive at Nabble.com.
Problem with sFTP PUT
Hi, I am using Camel 2.12.0. I am using the sftp component. The sFTP server is hosted on a UNIX based system. The following works fine when I 'PUT' a file manually This is What works: psftp put D:\opt\share\Outbound_DTCC\DTS4\UP\C5T62\S60300 put/DTS4.UP.C5T62.S60300 I am trying to do something similar with a camel Route - but I am getting exception. Note: Its clear from the exception that I cannot chnage directory to /put and then 'PUT' my file, becuase the sFTP server hasd not provided privilege for doign a cd/ls command. But not sure how to get this to work. from uri=jms:queue:queue.sftpToSDR/ setHeader headerName=CamelFileName simpleput/DTS4.UP.C5T62.S60300/simple to uri=sftp://${emir.dtcc.sftp.user}@${emir.dtcc.sftp.url}?password=${emir.dtcc.sftp.password}amp;binary=trueamp;disconnect=trueamp;stepwise=falseamp;maximumReconnectAttempts=0/ ] ] Stacktrace --- org.apache.camel.component.file.GenericFileOperationFailedException: Cannot change directory to: /apps/cdts/data_in_datapower/ at org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:542)[camel-ftp-2.12.0.jar:2.12.0] at org.apache.camel.component.file.remote.SftpOperations.changeCurrentDirectory(SftpOperations.java:499)[camel-ftp-2.12.0.jar:2.12.0] at org.apache.camel.component.file.remote.SftpOperations.buildDirectory(SftpOperations.java:438)[camel-ftp-2.12.0.jar:2.12.0] at org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:267)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:166)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:49)[camel-ftp-2.12.0.jar:2.12.0] at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:132)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:307)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:127)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:163)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.processor.interceptor.HandleFaultInterceptor.process(HandleFaultInterceptor.java:41)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:91)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.spring.spi.TransactionErrorHandler.processByErrorHandler(TransactionErrorHandler.java:218)[camel-spring-2.12.0.jar:2.12.0] at org.apache.camel.spring.spi.TransactionErrorHandler$1.doInTransactionWithoutResult(TransactionErrorHandler.java:181)[camel-spring-2.12.0.jar:2.12.0] at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)[spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)[spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.apache.camel.spring.spi.TransactionErrorHandler.doInTransactionTemplate(TransactionErrorHandler.java:174)[camel-spring-2.12.0.jar:2.12.0] at org.apache.camel.spring.spi.TransactionErrorHandler.processInTransaction(TransactionErrorHandler.java:134)[camel-spring-2.12.0.jar:2.12.0] at org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:103)[camel-spring-2.12.0.jar:2.12.0] at org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:112)[camel-spring-2.12.0.jar:2.12.0] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[camel-core-2.12.0.jar:2.12.0] at
Re: Problem with sFTP PUT
You should probably use the file component to read the file then send the output to sftp somewhat like: from(file://D:/opt/share/Outbound_TDCC/DTS4/UP/C5T62?fileName=S60300) .setHeader(CamelFileName,DTS4.UP.C5T62.S60300) .to(sfp://...); (Using java routebuilder style.) -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-sFTP-PUT-tp5752794p5752795.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with sFTP PUT
Should be: from(file://D:/opt/share/Outbound_TDCC/DTS4/UP/C5T62?fileName=S60300) .setHeader(CamelFileName,constant(DTS4.UP.C5T62.S60300)) .to(sfp://...); -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-sFTP-PUT-tp5752794p5752796.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with sFTP PUT
I will try this approach (storing the file in disk, reading it again and sending over sFTP) But I think the problem is with the put/filename Its the 'put' directory before the file name - I think the route is not able to traverse to that directory when it attempts to put the file. (nothing wrong with the file name itself) -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-sFTP-PUT-tp5752794p5752797.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: CXFRS documentation
Hi On 25/06/14 11:52, Knut-Håvard Aksnes wrote: Some context first: 1. I am trying to implement a REST service containing a number of methods using CXFRS 2. The routes will be one part of a bigger war which will be deployed in Tomcat. 3. I am trying to use bindingStyle=SimpleConsumer The problem is that I find some of the xml configuration examples a little confusing, particularly the references to *org.apache.camel.component.cxf.jaxrs.testbean.CustomerService* For the server, why is this class needed at all, couldn't *org.apache.camel.component.cxf.jaxrs.testbean.CustomerServiceResource* be used instead? The real implementation should be in the Camel routes. Then there are Tomcat, there are an OK example showing how to configure CXF endpoints for JAX-WS for use within Tomcat, but no similar documentation for CXFRS, I just assume that the JAX-WS related information is relevant for CXFRS too. Yes, I'd expect that too, though some of CXF WS properties would not work with CXFRS Thanks, Sergey -- View this message in context: http://camel.465427.n5.nabble.com/CXFRS-documentation-tp5752788.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with sFTP PUT
Have you tried adding ./ as a prefix to the target file name. To me this looks like a problem not in changing directory to put but a problem in changing to your root directory on the sFTP server, there are no put in this error line from the error message: org.apache.camel.component.file.GenericFileOperationFailedException: Cannot change directory to: /apps/cdts/data_in_datapower/ I assume that */apps/cdts/data_in_datapower/* is your root directory on the server. -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-sFTP-PUT-tp5752794p5752799.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with sFTP PUT
/apps/cdts/data_in_datapower/ is the root directory but I do not have access/privilege to access root directory. When I login I will be defaulted to home directory from where I can do a 'put' But when I PUT the file I must also explicitly include the /put directory (because sFTP server has not given privilege for doing a change directory, which is why I have set stepwise=false). This works fine when I do it manually but fails via Camel-sFTP Not sure how to tackle this. FYI: the sFTP server runs in a UNIX machine. So next I am going to try SEPERATOR=UNIX in my route. -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-sFTP-PUT-tp5752794p5752805.html Sent from the Camel - Users mailing list archive at Nabble.com.
Pound,Euro symbols in message rendered as ? on camel route
Hi, I am facing issue with Pound symbol coming in my messages to camel route , This pound symbol when comes in json request on my camel rest endpoint , it gets converted to ? the same gets shown on log too. I have tried below ways to fix this by setting convertBodyTo tag charset to utf-8 but it didn't worked. Here is the route : from uri=jetty:http://localhost:8080/testService/ camel:convertBodyTo type=String charset=utf-8 / camel:log message=Message Body: ${body} / to uri=jetty:http://localhost:8080/testEndpoints/ Regards, Aadil -- View this message in context: http://camel.465427.n5.nabble.com/Pound-Euro-symbols-in-message-rendered-as-on-camel-route-tp5752807.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with sFTP PUT
Hi Can some one advise on how to fix this? I have tried setting separator to Unix, also tried stepwise to true/false - cannot get it to work. -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-sFTP-PUT-tp5752794p5752808.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with sFTP PUT
Looks like you don't have access rights or write permissions given by your ftp server admin. On 25/06/2014 6:27 pm, deepak_a angesh...@gmail.com wrote: Hi, I am using Camel 2.12.0. I am using the sftp component. The sFTP server is hosted on a UNIX based system. The following works fine when I 'PUT' a file manually This is What works: psftp put D:\opt\share\Outbound_DTCC\DTS4\UP\C5T62\S60300 put/DTS4.UP.C5T62.S60300 I am trying to do something similar with a camel Route - but I am getting exception. Note: Its clear from the exception that I cannot chnage directory to /put and then 'PUT' my file, becuase the sFTP server hasd not provided privilege for doign a cd/ls command. But not sure how to get this to work. from uri=jms:queue:queue.sftpToSDR/ setHeader headerName=CamelFileName simpleput/DTS4.UP.C5T62.S60300/simple to uri=sftp://${emir.dtcc.sftp.user}@ ${emir.dtcc.sftp.url}?password=${emir.dtcc.sftp.password}amp;binary=trueamp;disconnect=trueamp;stepwise=falseamp;maximumReconnectAttempts=0/ ] ] Stacktrace --- org.apache.camel.component.file.GenericFileOperationFailedException: Cannot change directory to: /apps/cdts/data_in_datapower/ at org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:542)[camel-ftp-2.12.0.jar:2.12.0] at org.apache.camel.component.file.remote.SftpOperations.changeCurrentDirectory(SftpOperations.java:499)[camel-ftp-2.12.0.jar:2.12.0] at org.apache.camel.component.file.remote.SftpOperations.buildDirectory(SftpOperations.java:438)[camel-ftp-2.12.0.jar:2.12.0] at org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:267)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:166)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:49)[camel-ftp-2.12.0.jar:2.12.0] at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:132)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:307)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:127)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:163)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.processor.interceptor.HandleFaultInterceptor.process(HandleFaultInterceptor.java:41)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:91)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.spring.spi.TransactionErrorHandler.processByErrorHandler(TransactionErrorHandler.java:218)[camel-spring-2.12.0.jar:2.12.0] at org.apache.camel.spring.spi.TransactionErrorHandler$1.doInTransactionWithoutResult(TransactionErrorHandler.java:181)[camel-spring-2.12.0.jar:2.12.0] at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)[spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)[spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.apache.camel.spring.spi.TransactionErrorHandler.doInTransactionTemplate(TransactionErrorHandler.java:174)[camel-spring-2.12.0.jar:2.12.0] at org.apache.camel.spring.spi.TransactionErrorHandler.processInTransaction(TransactionErrorHandler.java:134)[camel-spring-2.12.0.jar:2.12.0] at org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:103)[camel-spring-2.12.0.jar:2.12.0] at org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:112)[camel-spring-2.12.0.jar:2.12.0] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[camel-core-2.12.0.jar:2.12.0] at
Problem with inserting database from camel-context.xml
hi good day, I'm new to all this. i have the following split parallelProcessing=true streaming=true tokenize token=\n group=1/ unmarshalcsv//unmarshal transform simple${body[0]}/simple /transform log message=${body}/ to uri=sql:INSERT INTO prueba(id, nombre, sex, num) VALUES(#,#,#,#)/ .. .. which works correctly when fields of my database are TEXT, but if I have a field, for example, ID int, not performing insert, any solution within the camel-context.xml or have to resort to a java class that I do the transformation? -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-inserting-database-from-camel-context-xml-tp5752810.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with sFTP PUT
I have got confirmation that relevant access/rights have been given to the /put directory. As explained in my first post, I can successfully 'PUT' by logging to the sFTP form command line via psftp.exe Problem occurs only when i use Camel. -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-sFTP-PUT-tp5752794p5752812.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with sFTP PUT
Hi Take care about absolute vs relative path. If the path to login is relative to the home dir of the accout, then do not use a front slash. You seem to have an absolute path with /apps/cdts/data_in_datapower/ On Wed, Jun 25, 2014 at 2:57 PM, deepak_a angesh...@gmail.com wrote: Hi, I am using Camel 2.12.0. I am using the sftp component. The sFTP server is hosted on a UNIX based system. The following works fine when I 'PUT' a file manually This is What works: psftp put D:\opt\share\Outbound_DTCC\DTS4\UP\C5T62\S60300 put/DTS4.UP.C5T62.S60300 I am trying to do something similar with a camel Route - but I am getting exception. Note: Its clear from the exception that I cannot chnage directory to /put and then 'PUT' my file, becuase the sFTP server hasd not provided privilege for doign a cd/ls command. But not sure how to get this to work. from uri=jms:queue:queue.sftpToSDR/ setHeader headerName=CamelFileName simpleput/DTS4.UP.C5T62.S60300/simple to uri=sftp://${emir.dtcc.sftp.user}@${emir.dtcc.sftp.url}?password=${emir.dtcc.sftp.password}amp;binary=trueamp;disconnect=trueamp;stepwise=falseamp;maximumReconnectAttempts=0/ ] ] Stacktrace --- org.apache.camel.component.file.GenericFileOperationFailedException: Cannot change directory to: /apps/cdts/data_in_datapower/ at org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:542)[camel-ftp-2.12.0.jar:2.12.0] at org.apache.camel.component.file.remote.SftpOperations.changeCurrentDirectory(SftpOperations.java:499)[camel-ftp-2.12.0.jar:2.12.0] at org.apache.camel.component.file.remote.SftpOperations.buildDirectory(SftpOperations.java:438)[camel-ftp-2.12.0.jar:2.12.0] at org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:267)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:166)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:49)[camel-ftp-2.12.0.jar:2.12.0] at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:132)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:307)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:127)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:163)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.processor.interceptor.HandleFaultInterceptor.process(HandleFaultInterceptor.java:41)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:91)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[camel-core-2.12.0.jar:2.12.0] at org.apache.camel.spring.spi.TransactionErrorHandler.processByErrorHandler(TransactionErrorHandler.java:218)[camel-spring-2.12.0.jar:2.12.0] at org.apache.camel.spring.spi.TransactionErrorHandler$1.doInTransactionWithoutResult(TransactionErrorHandler.java:181)[camel-spring-2.12.0.jar:2.12.0] at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)[spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)[spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.apache.camel.spring.spi.TransactionErrorHandler.doInTransactionTemplate(TransactionErrorHandler.java:174)[camel-spring-2.12.0.jar:2.12.0] at org.apache.camel.spring.spi.TransactionErrorHandler.processInTransaction(TransactionErrorHandler.java:134)[camel-spring-2.12.0.jar:2.12.0] at org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:103)[camel-spring-2.12.0.jar:2.12.0] at org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:112)[camel-spring-2.12.0.jar:2.12.0] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[camel-core-2.12.0.jar:2.12.0] at
Re: Camel hang on graceful shutdown - NOT trying to stop a route from a route
Thanks for the suggestion. I tried it but unfortunately it didn't fix anything. I even included the broker tag id in the list of 'depends-on' without success. Anyone else have thoughts on this? Thanks, Paul On Tue, Jun 24, 2014 at 12:55 AM, boday ben.o...@initekconsulting.com wrote: you might try adding a depends-on attribute to the camelContext definition to tell Spring the order to start/stop things... camelContext id=camel.dev autoStartup=${camel.auto.startup} xmlns=http://camel.apache.org/schema/spring; depends-on=activemq, remote.activemq Paul Gale wrote Hi, ActiveMQ 5.9.1 Camel 2.13.1 Spring 3.2.5 OS: RHEL 6.3 Tanuki Java Service Wrapper 3.5.24 When I shutdown my broker inside which a Camel context is containing just one route (shown below) it hangs. The route connects to a topic on a remote broker and writes out the messages to a queue on the local broker. The route is about as simple as it gets. At the time of the hang I get that good old chestnut of a message: Still waiting for shutdown of 1 message listener invokers After a timeout the Java Service Wrapper kills the broker process - not good. After some Googling I've seen where others have reported this error before. However, the difference here is that I am NOT trying to stop a route from another route (at least it doesn't look like I am) and yet I still get the same hang. I am simply trying to stop the broker which should gracefully shutdown the one route in the Camel context when the broker shuts down. Clearly I am missing something. Thoughts? Thanks, Paul Here is my camel.xml: ?xml version=1.0 encoding=UTF-8? beans xmlns=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.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd; bean class=org.springframework.beans.factory.config.PropertyPlaceholderConfigurer property name=ignoreUnresolvablePlaceholders value=true/ property name=locations list value file:${activemq.conf}/credentials.properties /value value file:${activemq.conf}/developer.testing.properties /value /list /property /bean bean id=remote.activemq class=org.apache.activemq.camel.component.ActiveMQComponent property name=brokerURL value=failover:(tcp://queue01.inf.man-${source.environment}.ove.local:61616,tcp://queue02.inf.man-${source.environment}.ove.local:61616)?randomize=false/ property name=userName value=${activemq.username}/ property name=password value=${activemq.password}/ /bean bean id=activemq class=org.apache.activemq.camel.component.ActiveMQComponent property name=brokerURL value=vm://localhost?create=falseamp;waitForStart=1/ property name=userName value=${activemq.username}/ property name=password value=${activemq.password}/ /bean bean id=shutdown class=org.apache.camel.impl.DefaultShutdownStrategy property name=timeout value=15/ property name=suppressLoggingOnTimeout value=true/ /bean camelContext id=camel.dev autoStartup=${camel.auto.startup} xmlns=http://camel.apache.org/schema/spring; propertyPlaceholder id=properties location=developer.testing.properties/ route from uri=remote.activemq:topic:{{source.topic}}?clientId={{client.id.prefix}}_camel_client/ to uri=activemq:{{source.topic}}.browse/ /route /camelContext /beans - Ben O'Day IT Consultant -http://consulting-notes.com -- View this message in context: http://camel.465427.n5.nabble.com/Camel-hang-on-graceful-shutdown-NOT-trying-to-stop-a-route-from-a-route-tp5752711p5752722.html Sent from the Camel - Users mailing list archive at Nabble.com.
Does Re-Delivery work with TCP?
Does the message re-delivery work with TCP endpoints? I tried and it works just fine with HTTP - i.e Camel will try to redeliver the message. BUT with TCP (mina2, netty) it does not try to attempt to redeliver the message. It just fails the first time with the exception Failed to get the session For my tests, I tried to send a message to a non-existent TCP endpoint. But I expect redelivery to kick in -- View this message in context: http://camel.465427.n5.nabble.com/Does-Re-Delivery-work-with-TCP-tp5752814.html Sent from the Camel - Users mailing list archive at Nabble.com.
convertBody - To SFTP component
hi - I have a message with body content with string value of file name and directory in it. That I need to send to a different server using sftp component. I am sure we need to convert the message body to a File class to be able to send it using the sftp, do we need to scan through the file to convert this or is there an alternative to this ?please suggest. thanks -- View this message in context: http://camel.465427.n5.nabble.com/convertBody-To-SFTP-component-tp5752815.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: convertBody - To SFTP component
Hi Camel allows to send the message body as-is over FTP (either if its text based or binary), the latter assum it can be read as input stream. Camel uses type converters for this. http://camel.apache.org/type-converter.html So if you want Camel to send a file to a ftp server you can just keep the data as a String, and it will upload the data as text. You can use the Exchange.FILE_NAME header if you want to give the file a fixed name. See more details at http://camel.apache.org/file2 http://camel.apache.org/ftp2 http://camel.apache.org/ftp-example.html On Wed, Jun 25, 2014 at 10:42 PM, eswar easwaramoor...@gmail.com wrote: hi - I have a message with body content with string value of file name and directory in it. That I need to send to a different server using sftp component. I am sure we need to convert the message body to a File class to be able to send it using the sftp, do we need to scan through the file to convert this or is there an alternative to this ?please suggest. thanks -- View this message in context: http://camel.465427.n5.nabble.com/convertBody-To-SFTP-component-tp5752815.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
Re: convertBody - To SFTP component
Hi , I don't thing you need to convert the string to file inorder to put it in a remote sever. You just need to set the header for valid file name otherwise camel will create the file with the name as messageid Sent from my iPhone On 26 Jun, 2014, at 4:42 am, eswar easwaramoor...@gmail.com wrote: hi - I have a message with body content with string value of file name and directory in it. That I need to send to a different server using sftp component. I am sure we need to convert the message body to a File class to be able to send it using the sftp, do we need to scan through the file to convert this or is there an alternative to this ?please suggest. thanks -- View this message in context: http://camel.465427.n5.nabble.com/convertBody-To-SFTP-component-tp5752815.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with inserting database from camel-context.xml
Hi The SQL component does not support providing types in the # placeholders. You would need to convert the data before. Or you can take a look at using for example the camel-mybatis component. Although we could look at improving the sql component so you can provide the type Maybe something like to uri=sql:INSERT INTO prueba(id, nombre, sex, num) VALUES(#int,#,#,#)/ Though finding a syntax that works can be a bit tricky. I logged a ticket about this https://issues.apache.org/jira/browse/CAMEL-7543 On Wed, Jun 25, 2014 at 6:56 PM, aioria3077 aioria3...@gmail.com wrote: hi good day, I'm new to all this. i have the following split parallelProcessing=true streaming=true tokenize token=\n group=1/ unmarshalcsv//unmarshal transform simple${body[0]}/simple /transform log message=${body}/ to uri=sql:INSERT INTO prueba(id, nombre, sex, num) VALUES(#,#,#,#)/ .. .. which works correctly when fields of my database are TEXT, but if I have a field, for example, ID int, not performing insert, any solution within the camel-context.xml or have to resort to a java class that I do the transformation? -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-inserting-database-from-camel-context-xml-tp5752810.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
Re: Parlay Rest SMS with Apache Camel
Hi Thanks for sharing this On Wed, Jun 25, 2014 at 12:19 PM, imranrazakhan imranrazak...@gmail.com wrote: Hi All, Please find below How we can send Parlay Rest SMS with Apache Camel. http://imranrazakh.blogspot.ae/2014/04/parlay-rest-sms-with-apache-camel.html Regards -- View this message in context: http://camel.465427.n5.nabble.com/Parlay-Rest-SMS-with-Apache-Camel-tp5752787.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/