Re: Problem with donefilename on sftp.
I continued some others tests... All this work correctly with file:, with ftp: but not with sftp: If someone can check and/or help me (workaround? bug report? other?) , it would be very appreciated. -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-donefilename-on-sftp-tp5728209p5728281.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with donefilename on sftp.
On Thu, Feb 28, 2013 at 8:47 AM, seazor jguel...@skynet.be wrote: I continued some others tests... All this work correctly with file:, with ftp: but not with sftp: If someone can check and/or help me (workaround? bug report? other?) , it would be very appreciated. There is a known issue in Camel 2.10.3 with the sftp component. Use 2.10.2 or the new 2.10.4. -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-donefilename-on-sftp-tp5728209p5728281.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
Re: Problem polling UNIX FTP server
Hi There is a known issue in Camel 2.10.3 with the sftp component. Use 2.10.2 or the new 2.10.4. On Wed, Feb 27, 2013 at 7:34 PM, GarethHughes gareth.hug...@hp.com wrote: Hi, I'm new to Camel so I may have missed something obvious. I am using Camel 2.10.3, running on Windows 2003 server and Java 1.6. I am attempting to poll files from an FTP endpoint using the following URL: ftp:egate@devweb/camel_hosts/REMHOST_A/out?password=*amp;binary=trueamp;localWorkDirectory={{work_base_directory}}/REMHOST_A/receiveamp;ftpClient.dataTimeout=3000amp;move=..//sentamp;stepwise=false The FTP server is running on Solaris 10... ftp quote SYST 215 UNIX Type: L8 Version: SUNOS However, Camel appears to think it is an Windows box as it is replacing UNIX style file separators with Windows style separators [vweb/camel_hosts/REMHOST_A/out] GenericFileOnCompletionWARN Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - File operation failed: 550 \apps\seebeyond: No such file or directory. Cannot change directory to: \apps\seebeyond. Code: 550] org.apache.camel.component.file.GenericFileOperationFailedException: File operation failed: 550 \apps\seebeyond: No such file or directory. Cannot change directory to: \apps\seebeyond. Code: 550 at org.apache.camel.component.file.remote.FtpOperations.doChangeDirectory(FtpOperations.java:702)[camel-ftp-2.10.3.jar:2.10.3] at org.apache.camel.component.file.remote.FtpOperations.changeCurrentDirectory(FtpOperations.java:658)[camel-ftp-2.10.3.jar:2.10.3] at org.apache.camel.component.file.remote.FtpOperations.buildDirectory(FtpOperations.java:284)[camel-ftp-2.10.3.jar:2.10.3] at org.apache.camel.component.file.strategy.GenericFileProcessStrategySupport.renameFile(GenericFileProcessStrategySupport.java:100)[camel-core-2.10.3.jar:2.10.3] at org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.commit(GenericFileRenameProcessStrategy.java:86)[camel-core-2.10.3.jar:2.10.3] at org.apache.camel.component.file.GenericFileOnCompletion.processStrategyCommit(GenericFileOnCompletion.java:132)[camel-core-2.10.3.jar:2.10.3] at org.apache.camel.component.file.GenericFileOnCompletion.onCompletion(GenericFileOnCompletion.java:82)[camel-core-2.10.3.jar:2.10.3] at org.apache.camel.component.file.GenericFileOnCompletion.onComplete(GenericFileOnCompletion.java:53)[camel-core-2.10.3.jar:2.10.3] at org.apache.camel.util.UnitOfWorkHelper.doneSynchronizations(UnitOfWorkHelper.java:55)[camel-core-2.10.3.jar:2.10.3] at org.apache.camel.impl.DefaultUnitOfWork.done(DefaultUnitOfWork.java:226)[camel-core-2.10.3.jar:2.10.3] at org.apache.camel.processor.UnitOfWorkProcessor.doneUow(UnitOfWorkProcessor.java:199)[camel-core-2.10.3.jar:2.10.3] at org.apache.camel.processor.UnitOfWorkProcessor.processSync(UnitOfWorkProcessor.java:139)[camel-core-2.10.3.jar:2.10.3] at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:115)[camel-core-2.10.3.jar:2.10.3] at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)[camel-core-2.10.3.jar:2.10.3] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10.3.jar:2.10.3] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[camel-core-2.10.3.jar:2.10.3] at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[camel-core-2.10.3.jar:2.10.3] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)[camel-core-2.10.3.jar:2.10.3] at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)[camel-core-2.10.3.jar:2.10.3] at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:336)[camel-core-2.10.3.jar:2.10.3] at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsumer.java:94)[camel-ftp-2.10.3.jar:2.10.3] at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:189)[camel-core-2.10.3.jar:2.10.3] at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:155)[camel-core-2.10.3.jar:2.10.3] at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:142)[camel-core-2.10.3.jar:2.10.3] at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92)[camel-core-2.10.3.jar:2.10.3] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)[:1.6.0_26] at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)[:1.6.0_26] at
Re: Endpoint configuration error
On Thu, Feb 28, 2013 at 7:19 AM, Richa rsinha2...@gmail.com wrote: Hi, I am creating a JmsEndpoint for my route. The problem is that when the JMS is down, the following line: JmsEndpoint endpoint=(JmsEndpoint)getContext().getEndpoint(activemq:topic:jms.topicName is throwing exception. I have put this line in a try catch block but still I cannot catch the exception. I don't want to throw the exception but to catch the exception and handle it in my way.Kindly help me with this. Where have you put this code? And what Camel version do you use? Its just java code, so a try catch exception or throwable ought to handle that. -- View this message in context: http://camel.465427.n5.nabble.com/Endpoint-configuration-error-tp5728272.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
Re: camel-blueprint-test issues
Hi Well spotted. I have logged a ticket https://issues.apache.org/jira/browse/CAMEL-6111 On Thu, Feb 28, 2013 at 5:32 AM, Ryan Moquin fragility...@gmail.com wrote: I converted a test that was using the camel-test library to the camel-test-blueprint library and it appears that the route runs at least twice, but at the exact same time. I'm not sure why each route is being created more than once per test. I do see at the beginning of the test it print out that I't loading the bundle activator twice. I also generated a sample camel blueprint project from the maven archetype and it appears to exhibit the same behavior. I'using 2.11-SNAPSHOT btw. I haven't seen anyone mention this nor did I see anything in jira about it. Has anyone noticed anything similar? I decided I'd have to try using karaf pax exam instead since I just can't to figure out how to get the blueprint the testing working correctly. Hopefully someone has seen and gotten past that behavior. Thanks for any suggestions or help! Ryan -- 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
SFTP authentication issue
Hi, I am trying to connect to an SFTP endpoint. The JSCH class uses the following parameters for authentication: (PreferredAuthentications, gssapi-with-mic,publickey,keyboard-interactive,password) If I use the custom JSCH class then I am not able to connect to my SFTP endpoint because of the gssapi-with-mic. To solve this problem, I overwrote this class and commented the following line: config.put(PreferredAuthentications, gssapi-with-mic,publickey,keyboard-interactive,password); in the static block and instead put: config.put(PreferredAuthentications, publickey,keyboard-interactive,password); Now it works fine. But I want to know is there some other way to solve this issue or programatically switch off the use of gssapi-with-mic? -- View this message in context: http://camel.465427.n5.nabble.com/SFTP-authentication-issue-tp5728286.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Endpoint configuration error
Thank you for your reply claus. I am using camel 2.10.2. It's a normal java function. The function returns the JmsEndpoint which I later use in my route. But even though I put try catch block, I get this exception thrown out. Apparently the code does not go to the catch block. Currently my catch block is: catch(Exception e) { System.out.println(Error); } But even if I put JMSException or ConnectException I get an error in my code that the catch block is unreachable. Please help me in solving this issue. -- View this message in context: http://camel.465427.n5.nabble.com/Endpoint-configuration-error-tp5728272p5728288.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Large file processing with Apache Camel
After digging more into my problem I found that the slow db access was the main issue, maybe you heard before of setting sendStringParametersAsUnicode=false in the jdbc driver to dramatically increase the performance. Since the last time I posted here I learned a lot about apache camel and I implemented some nice changes, but I'm confronting with a synchronization problem right now. I split each line that comes from the file and I enable parallel processing: from().split(body(String.class).tokenize(\n)).parallelProcessing().process(processor).to() Inside this processor I take the line, send it to the xml mapper as an input stream and in the end I set the xml as the body of the out message. The processor's process method is not synchronized and I run into situations where the input line has a code 1234 and the output doesn't contain the code 1234 but 1235, but this code belongs to another line 100% sure. So I should control the synchronization process by myself, right? -- View this message in context: http://camel.465427.n5.nabble.com/Large-file-processing-with-Apache-Camel-tp5727977p5728292.html Sent from the Camel - Users mailing list archive at Nabble.com.
JMS Dead Letter channel discards JMS custom headers
Hi There, I am using errorHandler with DeadLetterchannel configured with useOriginalMessage,maximumRedeliveries and redeliveryDelay. Everything works fine. But when I get the actual message in the dead letter queue in case of failures, the JMS headers are getting discarded, even the JMSCorrelationID is getting discarded. Any ideas? Code snippet: errorHandler(deadLetterChannel(dlqJMSUrl) .useOriginalMessage() .maximumRedeliveries(recordActivityRetryCount) .redeliveryDelay(redeliveryDelay)); I tried using preserveQos=true, but still the same issue. Regards, CGSK -- View this message in context: http://camel.465427.n5.nabble.com/JMS-Dead-Letter-channel-discards-JMS-custom-headers-tp5728293.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Large file processing with Apache Camel
On Thu, Feb 28, 2013 at 1:03 PM, cristisor cristisor...@yahoo.com wrote: After digging more into my problem I found that the slow db access was the main issue, maybe you heard before of setting sendStringParametersAsUnicode=false in the jdbc driver to dramatically increase the performance. Since the last time I posted here I learned a lot about apache camel and I implemented some nice changes, but I'm confronting with a synchronization problem right now. I split each line that comes from the file and I enable parallel processing: from().split(body(String.class).tokenize(\n)).parallelProcessing().process(processor).to() Inside this processor I take the line, send it to the xml mapper as an input stream and in the end I set the xml as the body of the out message. The processor's process method is not synchronized and I run into situations where the input line has a code 1234 and the output doesn't contain the code 1234 but 1235, but this code belongs to another line 100% sure. So I should control the synchronization process by myself, right? If you run in parallel processing mode, then the lines can be processed out of order and concurrently. Also your custom processor will be invoked concurrently by multiple threads as they process the lines in parallel. So you have to write your code in a thread safe manner, if you want to access shared resources. -- View this message in context: http://camel.465427.n5.nabble.com/Large-file-processing-with-Apache-Camel-tp5727977p5728292.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
Re: JMS Dead Letter channel discards JMS custom headers
On Thu, Feb 28, 2013 at 1:23 PM, cgsk karthik2...@gmail.com wrote: Hi There, I am using errorHandler with DeadLetterchannel configured with useOriginalMessage,maximumRedeliveries and redeliveryDelay. Everything works fine. But when I get the actual message in the dead letter queue in case of failures, the JMS headers are getting discarded, even the JMSCorrelationID is getting discarded. Any ideas? Code snippet: errorHandler(deadLetterChannel(dlqJMSUrl) .useOriginalMessage() .maximumRedeliveries(recordActivityRetryCount) .redeliveryDelay(redeliveryDelay)); I tried using preserveQos=true, but still the same issue. Regards, CGSK What version of Camel do you use? In a recent release we have improved on this for JMS so the original headers should be included. -- View this message in context: http://camel.465427.n5.nabble.com/JMS-Dead-Letter-channel-discards-JMS-custom-headers-tp5728293.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
Re: JMS Dead Letter channel discards JMS custom headers
On Thu, Feb 28, 2013 at 2:37 PM, cgsk karthik2...@gmail.com wrote: Thanks for the reply. I am using 2.8.2 version. Yes you need Camel 2.10 or better. -- View this message in context: http://camel.465427.n5.nabble.com/JMS-Dead-Letter-channel-discards-JMS-custom-headers-tp5728293p5728296.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
camel and several implementations of an interface
Having a bundle with an interface and several implementations of it (all in their own bundle), how can I decide which bundle to call? Details: Bundle 1 just defines an interface. (packageName.InterfaceName) Bundle 2, 3 4 implement this interface. Problem is, with .to(bean:packageName.InterfaceName?method=doIt) I just can set the interface. But how to decide which concrete implementation to call? (Working with Equinox) -- View this message in context: http://camel.465427.n5.nabble.com/camel-and-several-implementations-of-an-interface-tp5728298.html Sent from the Camel - Users mailing list archive at Nabble.com.
RE: Camel smpp special characters for sending sms
Hello, I found the solution to my problem and I wanted to update you about it. On the initial tests I did I was setting the dataCoding / alphabet (= 8 UCS2) as URI options. This didn't work. If I set the alphabet to UCS2 as a Producer Message Header and encoding = UTF-16BE as URI options then it works :-) (Note that I'm using a spring based endpoint configuration) What I'm wondering is why setting the alphabet at the URI options is not taken into account ? Final question why is not possible to set the encoding as a producer message headers ? -- View this message in context: http://camel.465427.n5.nabble.com/Camel-smpp-special-characters-for-sending-sms-tp5728152p5728300.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Endpoint configuration error
On Thu, Feb 28, 2013 at 9:53 AM, Richa rsinha2...@gmail.com wrote: Thank you for your reply claus. I am using camel 2.10.2. It's a normal java function. The function returns the JmsEndpoint which I later use in my route. But even though I put try catch block, I get this exception thrown out. Apparently the code does not go to the catch block. Currently my catch block is: catch(Exception e) { System.out.println(Error); } But even if I put JMSException or ConnectException I get an error in my code that the catch block is unreachable. Please help me in solving this issue. I guess the exception is thrown from somewhere else. Maybe later if you use the endpoint to create a consumer, and that fails, or when starting the consumer. -- View this message in context: http://camel.465427.n5.nabble.com/Endpoint-configuration-error-tp5728272p5728288.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
RE: [Spam]: Re: Is there batch functionality in Camel?
Thanks Henryk and Maruan! It really helped. Best Regards, Ivan -Original Message- From: Henryk Konsek [mailto:hekon...@gmail.com] Sent: Wednesday, February 27, 2013 10:27 PM To: users@camel.apache.org Subject: [Spam]: Re: Is there batch functionality in Camel? Hi Ivan, I wonder if the Spring Batch Component ( http://camel.apache.org/springbatch.html) is proper to use in this case? You can use CamelItemReader to pass messages into Spring Batch. However I would say that your case is too simple to use Spring Batch for this purpose. I would advise to use aggregator instead. from(seda:queue). aggregate().groupExchanges(). completionSize(1000).completionTimeout(1). to(seda:aggregatedResults); Best regards. -- Henryk Konsek http://henryk-konsek.blogspot.com
Re: Has anyone ever successfully deployed the Camel Web Console on JBoss-6?
I got past the issue of JBoss croaking on Scala by the workaround mentioned here: http://www.mastertheboss.com/infinispan/infinispan-restful-interface Now, the error is: 11:56:19,087 SEVERE The ResourceConfig instance does not contain any root resource classes. [com.sun.jersey.server.impl.application.RootResourceUriRules] 11:56:19,087 SEVERE Exception occurred when intialization: com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes. at com.sun.jersey.server.impl.application.RootResourceUriRules.init(RootResourceUriRules.java:99) [:1.12] at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1308) [:1.12] If anyone has an idea. Thanks, Chris On Thu, Feb 28, 2013 at 11:47 AM, Chris Wolf cwolf.a...@gmail.com wrote: It's looking like JBoss doesn't like Scala because I'm getting this error: Caused by: java.lang.RuntimeException: Error visiting resource: VFSResourceContext @scala/tools/nsc/backend/icode/ICodeCheckers$ICodeChecker$$anonfun$ifAthenB$1$1.class / BaseClassLoader@5c4766d2{vfs:///C:/opt/jboss6rdf/server/default/services/camel.war}, visitor: org.jboss.scanning.annotations.plugins.GenericAnnotationVisitor@1741be6c ... Caused by: java.lang.IllegalArgumentException: Null type at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.getTypeInfo(IntrospectionTypeInfoFactoryImpl.java:330) [jboss-reflect.jar:2.2.1.SP1] ...and searching on the web yields a bunch of hits regarding Scala on JBoss, but not this, exact issue. Thanks, Chris
Re: Problem polling UNIX FTP server
Hi Claus, Thank you for your advice. I installed 2.10.2 and it works...as you said it would. -- View this message in context: http://camel.465427.n5.nabble.com/Problem-polling-UNIX-FTP-server-tp5728242p5728307.html Sent from the Camel - Users mailing list archive at Nabble.com.
Prolems with parametrized bean method call via simple
Hi friends I´m facing a strange behavior when performing this XML DSL statement. When I call /validateFiringUnitSchedule /method passing its 2 parameters, the second argument has its value splited just because it contains ,. For example, when ${in.body.cronExpression} is 0 0 10,11,12 * * ? its value is set to 0 0 10 . camel:choice camel:whencamel:simple*${bean:scheduler?method=validateFiringUnitSchedule(${in.body.scheduleID}, ${in.body.cronExpression})}*/camel:simple camel:setHeader headerName=schedule.uri simplequartz://infosender/schedule${in.body.scheduleID}?cron=${in.body.cronExpression}/simple /camel:setHeader camel:setBody simple${body.scheduleID}/simple /camel:setBody to uri=bean:scheduler?method=buildScheduleJobRoute / /camel:when /camel:choice Is it a bug??? -- View this message in context: http://camel.465427.n5.nabble.com/Prolems-with-parametrized-bean-method-call-via-simple-tp5728319.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel processor in InOut to send 2 replies
Will the following work for you (using Java DSL)? from(jms:queue:data) .setHeader(id, constant(1)) .multicast() .inOnly(jms:queue:first, jms:queue:second); from(jms:queue:first) .to(bean:myMessageProcessor) .to(jms:queue:finished); from(jms:queue:second) .to(bean:myMessageProcessor) .to(jms:queue:finished); from(jms:queue:finished) .aggregate(header(id), new YourAggregatingStrategy()).completionSize(2) .to(mock:dataresult); Best, Christian On Wed, Feb 27, 2013 at 2:55 PM, Marco Crivellaro marco.cr...@gmail.comwrote: Hi Hadrian, thanks for your reply. Sorry if I've been unclear. The messages I am publishing to the In queue have JMSReplyTo header set. As you suggested I've used the reply to header to send an additional message using a bespoke producer in the process method of the Processor: javax.jms.Destination replyTo = exchange.getIn().getHeader(JMSReplyTo, javax.jms.Destination.class); JmsEndpoint replyEndpoint = new JmsEndpoint(); replyEndpoint.setDestination(replyTo); DefaultProducerTemplate producer = (DefaultProducerTemplate) exchange.getContext().createProducerTemplate(); producer.sendBodyAndHeaders(replyEndpoint.getEndpointUri().toString(), TEST, exchange.getOut().getHeaders()); -- View this message in context: http://camel.465427.n5.nabble.com/camel-processor-in-InOut-to-send-2-replies-tp5728189p5728230.html Sent from the Camel - Users mailing list archive at Nabble.com. --
Re: Is there anyway to configure the JPA component to get it's query (or query parameters) from an inbound message?
Just send the details here if somebody is looking for the same in some month... Thanks in advance, Christian On Wed, Feb 27, 2013 at 6:23 PM, Chris Wolf cwolf.a...@gmail.com wrote: I figured out how to do it. If anyone is interested, I can supply details. On Wed, Feb 27, 2013 at 10:54 AM, Chris Wolf cwolf.a...@gmail.com wrote: I ask because I want the query to be parameterized by the results of up-stream component executions. Thanks, Chris --
Re: cxf response
Could you have a look at [1]. May be it will help. This is a working example... However, you should be able to simplify your route: from(cxf:cxfEndpoint?wsdlURL=foodataFormat=POJO) .process(myProcessor) .to(bean:myBean); Is your object example.ExampleResponse generated by the CXF maven plugin? May it's not the right object? Check your generated ObjectFactory class. May there is a second createExampleResponse() method which takes an JaxbElement? If not, can you share your code? [1] https://github.com/muellerc/apachecon-na-2013/tree/master/cxf-component Best, Christian On Wed, Feb 27, 2013 at 5:54 PM, Smith-John mich...@gmail.com wrote: I also tried it with generated JAXB classes from my wsdl/xsd and marshalling. But from(cxf:cxfEndpoint?wsdlURLdataFormat=PAYLOAD).unmarshal(jaxb).process(myProcessor).to(bean:myBean).marshall(jaxb) doesn't work. myBean puts an Object of the generated jaxb classes into the body but I get unable to marshal type example.ExampleResponse as an element because it is missing an @XmlRootElement annotation. Some advice to fix this would be nice. -- View this message in context: http://camel.465427.n5.nabble.com/cxf-response-tp5728106p5728236.html Sent from the Camel - Users mailing list archive at Nabble.com. --
Re: Issue Replacing a component with Mock in Camel Context
First of all, you should use from(direct:eventMessageList).routeId(PseudoEventQueue) instead of from(direct:eventMessageList).id(PseudoEventQueue) And in your test method, you can do context.getRouteDefinition(PseudoEventQueue).adviceWith(context, new RouteBuilder() { public void configure() throws Exception { interceptSendToEndpoint(jms:queue:foo) .skipSendToOriginalEndpoint() .to(mock:foo); } }); as described here: http://camel.apache.org/advicewith.html Will this work? Best, Christian On Tue, Feb 26, 2013 at 10:27 PM, shyenuganti shyenuga...@gmail.com wrote: context.resolveEndpoint is not availble on both the regular CamelContext or the ModelCamelContext in 2.10.3. Is the method deprecated? I am using @EndpointInject to get the resolve the endpoint. But still the assertion fails in my case although everything seems to work. Is there any thing that I doing wrong in my example above? -- View this message in context: http://camel.465427.n5.nabble.com/Issue-Replacing-a-component-with-Mock-in-Camel-Context-tp5728195p5728200.html Sent from the Camel - Users mailing list archive at Nabble.com. --
Re: prepared statements in camel-jdbc?
I am seeing this post is quite old hence want to reassure, Does Camel JDBC support Prepeared statements? -- View this message in context: http://camel.465427.n5.nabble.com/prepared-statements-in-camel-jdbc-tp3319106p5728328.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: prepared statements in camel-jdbc?
On Fri, Mar 1, 2013 at 5:24 AM, kavan desai kavan.de...@barclays.com wrote: I am seeing this post is quite old hence want to reassure, Does Camel JDBC support Prepeared statements? Check the source code https://svn.apache.org/repos/asf/camel/trunk/components/camel-jdbc/ -- View this message in context: http://camel.465427.n5.nabble.com/prepared-statements-in-camel-jdbc-tp3319106p5728328.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
AggregationStrategy not writing to end result
Hi, I am using an aggregator to add ; inbetween the message that is tokenized by \n. But the end result does not show ';' at the end every line.. what am I doing wrong.. Here is route config... route from uri=file:{{splitInBox}} / log message=spliting the message using tokenizer(\n) from splitInBox to splitOutBox. filename ${header.CamelFileName} / split streaming=true strategyRef=splitNewLineStrategy tokenize token=\n/ to uri=file:{{splitOutBox}} / /split log message=Split completed / /route Here is the AggregationStrategy implemention. public class SplitLineStrategy implements AggregationStrategy { private static Logger log = Logger.getLogger(SplitLineStrategy.class); public Exchange aggregate(Exchange oldExchange, Exchange newExchange) { // put order together in old exchange by adding the order from new exchange if (oldExchange == null) { // the first time we aggregate we only have the new exchange, // so we just return it return newExchange; } String orders = oldExchange.getIn().getBody(String.class) + \n; String newLine = newExchange.getIn().getBody(String.class); log.debug(Aggregate old orders: + orders); log.debug(Aggregate new order: + newLine); // put orders together separating by semi colon orders = orders + ; +newLine; // put combined order back on old to preserve it oldExchange.getIn().setBody(orders); log.info( aggregator returns + orders); // return old as this is the one that has all the orders gathered until now return oldExchange; } } Any help will be great.. Thanks a lot. -- View this message in context: http://camel.465427.n5.nabble.com/AggregationStrategy-not-writing-to-end-result-tp5728317.html Sent from the Camel - Users mailing list archive at Nabble.com.
example using HazelcastIdempotentRepository in Spring DSL
Hello all, I'm trying to figure out how to use the HazelcastIdempotentRepository as the idempotentConsumer for a duplicate filter in a Spring DSL route. example: ... idempotentConsumer messageidRepositoryRef=idempotentRepo headerPrimaryValue/header . bean id=idempotentRepo class=org.apache.camel.processor.idempotent.hazelcast.HazelcastIdempotentRepository/ throws the following error: No default constructor found; nested exception is java.lang.NoSuchMethodException: org.apache.c amel.processor.idempotent.hazelcast.HazelcastIdempotentRepository.init() I tried supplying a string constructor to HazelcastIdempotentRepository as shown in the API, but I get the following error: Could not convert constructor argument value of type [java.lang.String] to required type [com.hazelcast.core.HazelcastInstance]: Failed to convert value of type 'java.lang.String' to required type 'com.hazelcast.core.HazelcastInstance'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [com.hazelcast.core.HazelcastInstance]: no matching editors or conversion strategy found What am I doing wrong? thanks for any help Dave -- View this message in context: http://camel.465427.n5.nabble.com/example-using-HazelcastIdempotentRepository-in-Spring-DSL-tp5728318.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Large file processing with Apache Camel
You have to make sure your processor is thread safe, because it is shared between all parallel executed threads. Best, Christian On Thu, Feb 28, 2013 at 1:03 PM, cristisor cristisor...@yahoo.com wrote: After digging more into my problem I found that the slow db access was the main issue, maybe you heard before of setting sendStringParametersAsUnicode=false in the jdbc driver to dramatically increase the performance. Since the last time I posted here I learned a lot about apache camel and I implemented some nice changes, but I'm confronting with a synchronization problem right now. I split each line that comes from the file and I enable parallel processing: from().split(body(String.class).tokenize(\n)).parallelProcessing().process(processor).to() Inside this processor I take the line, send it to the xml mapper as an input stream and in the end I set the xml as the body of the out message. The processor's process method is not synchronized and I run into situations where the input line has a code 1234 and the output doesn't contain the code 1234 but 1235, but this code belongs to another line 100% sure. So I should control the synchronization process by myself, right? -- View this message in context: http://camel.465427.n5.nabble.com/Large-file-processing-with-Apache-Camel-tp5727977p5728292.html Sent from the Camel - Users mailing list archive at Nabble.com. --
Re: example using HazelcastIdempotentRepository in Spring DSL
Hi I suggest to check some unit test of the camel-hazelcast, to see some examples of this idempotent in use https://svn.apache.org/repos/asf/camel/trunk/components/camel-hazelcast/ And I guess the Camel docs could be updated a bit with an example for Spring XML as well. As the sample we have is Java code based: http://camel.apache.org/idempotent-consumer.html On Thu, Feb 28, 2013 at 9:28 PM, davebarker dbar...@genscape.com wrote: Hello all, I'm trying to figure out how to use the HazelcastIdempotentRepository as the idempotentConsumer for a duplicate filter in a Spring DSL route. example: ... idempotentConsumer messageidRepositoryRef=idempotentRepo headerPrimaryValue/header . bean id=idempotentRepo class=org.apache.camel.processor.idempotent.hazelcast.HazelcastIdempotentRepository/ throws the following error: No default constructor found; nested exception is java.lang.NoSuchMethodException: org.apache.c amel.processor.idempotent.hazelcast.HazelcastIdempotentRepository.init() I tried supplying a string constructor to HazelcastIdempotentRepository as shown in the API, but I get the following error: Could not convert constructor argument value of type [java.lang.String] to required type [com.hazelcast.core.HazelcastInstance]: Failed to convert value of type 'java.lang.String' to required type 'com.hazelcast.core.HazelcastInstance'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [com.hazelcast.core.HazelcastInstance]: no matching editors or conversion strategy found What am I doing wrong? thanks for any help Dave -- View this message in context: http://camel.465427.n5.nabble.com/example-using-HazelcastIdempotentRepository-in-Spring-DSL-tp5728318.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