Re: How can i use CDI with CamelTestSupport
I just added a comment on your issue. I think you may need to extends the CdiTestSupport instead of CamelTestSupport. The key point is find the right CdiContainer to use, as I didn't see the code of EJBContainerRunner, you may need to the work there if the CdiTestSupport doesn't work. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On May 21, 2015 at 3:58:00 PM, kikou1984 (hichem.ouesl...@atos.net) wrote: I found a Camel-cdi.jar contains a CdiBeanRegistry with method lookup, how can we use it please in the context ? -- View this message in context: http://camel.465427.n5.nabble.com/How-can-i-use-CDI-with-CamelTestSupport-tp5767328p5767370.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Web Srevice exposed over https not working
Yeah, the stack trace just tells us the connection is closed. Do you use cxf client to connect the WebService? Can you check if there is any error on the client side? We need more information about the camel route and the client. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On May 17, 2015 at 2:04:34 PM, gargankur007 (gargankur...@gmail.com) wrote: I googled and have a sense that may be connection is getting closed when SoapResposne is being written -- View this message in context: http://camel.465427.n5.nabble.com/Web-Srevice-exposed-over-https-not-working-tp5767156p5767157.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: ERROR: Cannot find any registered HttpDestinationFactory from the Bus.
CXF http transport looks up the HttpDestinationFactory for (Jetty or Netty) if the address is start with “http://; or https://“. If you don’t put those jar into the class patch, you will get the error. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On May 20, 2015 at 1:55:47 AM, Aki Yoshida (elak...@gmail.com) wrote: If you do not want to use the embedded jetty server but your servlet container, you have to use a relative path in the address field. so something like address=/canonicalcxfserviceproxy/webservices/canonical and this endpoint will be available under the context path configured at your CXFServlet. 2015-05-15 8:28 GMT+02:00 jainmcs03 : Team, For camel-CXF web service proxy i created a maven JAVA project to configure the jetty embedded container as described in the example and run it in eclipse and its works fine. But while delpoying as .war in tomact its giving subject Error. ERROR HTTPTransportFactory - Cannot find any registered HttpDestinationFactory from the Bus. I have removed cxf-rt-transports-http-jetty, i keep only cxf-rt-transports-http. How to resolve this. Below is the endpoint trying to publish, no other config included in my spring config file(camel-config.xml). address=http://localhost:8080/canonicalcxfserviceproxy/webservices/canonical; endpointName=xsd:CanonicalSoap serviceName=xsd:Canonical wsdlURL=etc/canonical.wsdl xmlns:xsd=http://localhost:8080/canonicalcxfserviceproxy/canonical/ Regards Jayendran -- View this message in context: http://camel.465427.n5.nabble.com/ERROR-Cannot-find-any-registered-HttpDestinationFactory-from-the-Bus-tp5767130.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: HttpProducer to ignore response body avoiding stream caching
So you just need to check the statuses code and don’t need to read the message body. Yeah, we can add an option for it to avoid recopying the input stream from the HttpClient. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On May 19, 2015 at 11:31:33 PM, Marco Crivellaro (marco.cr...@gmail.com) wrote: I am using camel-http to send HTTP Post notifications to a wide range of endpoints which I don't control directly, sometimes the endpoints response is quite big and due to the fact HttpProducer is caching the response stream temporary files are being written to disk. I can set the caching threshold to a higher value and therefore avoid writing to disk but this would have an impact on HEAP consumption. It would be great if the response body can optionally be ignored (maybe only for 200:300 statuses), I am not doing anything with the endpoint response body if the status is 200. Maybe such option will be helpful for other camel riders? -- View this message in context: http://camel.465427.n5.nabble.com/HttpProducer-to-ignore-response-body-avoiding-stream-caching-tp5767260.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: How to make Soap Service Provider work over web
I think you just need to change the address to outside IP or 0.0.0.0 (which let the jetty engine to listen to all the network interface”. such as from(“cxf://http://192.168.1.123:9090/services?serviceClass=AdataFormat=POJO”) or from(“cxf://http://0.0.0.0:9090/services?serviceClass=AdataFormat=POJO”) -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On May 20, 2015 at 2:46:26 AM, gargankur007 (gargankur...@gmail.com) wrote: HI I have came route for Soap service Provider like from(cxf://http://localhost:9090/services?serviceClass=AdataFormat=POJO;) My question is do I need to package the application as WAR to enable it accessing from web? I am able to use it by URL http://localhost:9090/services but not by http://{realIP}:9090/services;. Is it mandatory to package the app as war and specify CXFServlet as the servlet for all the services with pattern /services/*. -- View this message in context: http://camel.465427.n5.nabble.com/How-to-make-Soap-Service-Provider-work-over-web-tp5767265.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: QueueReplyManager - reply received for unknown correlationID
Can you show us the camel route that you have? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On May 11, 2015 at 4:46:02 PM, MS (matija.slivo...@gmail.com) wrote: CXF uses Http transport. Message is afterwords forwarded to ActiveMQ request queue. After response is read from 'response' queue message is relayed back to WS endpoint. serviceClass=proxy.bridge.amq.AmqBridgePortType address=http://localhost:{{port}}/bridge/amq; wsdlURL=wsdl/amq-bridge.wsdl endpointName=s:amqBridge serviceName=s:BridgeService xmlns:s=http://proxy/bridge/amq/ class=org.apache.activemq.ActiveMQConnectionFactory / class=org.apache.camel.component.jms.JmsConfiguration class=org.apache.activemq.camel.component.ActiveMQComponent -- View this message in context: http://camel.465427.n5.nabble.com/QueueReplyManager-reply-received-for-unknown-correlationID-tp5766856p5766956.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-context.xml getting loaded multiple times
If you don’t want to common camel-context be load multiple times, you can just deploy it in a single war. If you just want to reuse the route definition, you can take a look this FAQ[1] using the routeContext to do that kind of job. [1]http://camel.apache.org/how-do-i-import-routes-from-other-xml-files.html -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On May 7, 2015 at 6:00:06 PM, sureshsg (suresh.s...@gmail.com) wrote: Hi I have 3 wars running on a single tomcat instance. Each of the war has a spring application context and camel-context.xml. Again each of the war has a common library. This common library also has camel-context.xml. The error is common library's camel-context is getting loaded multiple times and resulting in multiple consumers for an endpoint. I am using contextScan to load the routes and have also tried specifying the includes package but did not work. Could you please help? -- View this message in context: http://camel.465427.n5.nabble.com/camel-context-xml-getting-loaded-multiple-times-tp5766803.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Vramel or modifying Camel
You can integrate the vert.x with Camel by implement the camel component API (which could be a more easy way to go), and we just have camel-vertx component[1] to do this kind of work. the Vramel way is like reimplement the Camel DSL on base of vert.x API, which need to lots of work to reimplement the Camel core functions. [1]http://camel.apache.org/vertx.html -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On May 3, 2015 at 7:50:27 AM, Anton Hughes (kurren...@gmail.com) wrote: Hi I am currently developing a vert.x project, and am looking for how to integrate Camel. I recently came by https://github.com/wired-mind/Vramel - a port of Camel to Vertx. From cursory look into Vramel, it seems to be mostly identical to Camel. As I am not deeply familiar with the camel core and internals, I would be interested to learn what, in Camel, would need to be modified so that it can run using the vert.x bus and async model? Thanks
Re: QueueReplyManager - reply received for unknown correlationID
The CorrelationID is quite important when the message exchange pattern is InOut. What’s the transport that you use in CXF endpoint? If it uses the JMS transport, I guess that could cause some trouble in your route. Regards, -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On May 11, 2015 at 8:14:38 AM, Henrique Viecili (viec...@gmail.com) wrote: Is there any documentation about uncorrelated messages sent to reply destinations? How does it behave when the reply destination is shared/exclusive/temporary? Regards, Henrique Viecili Henrique Viecili On 9 May 2015 at 16:54, Claus Ibsen wrote: Hi What Camel and AMQ version do you use? And do you see this WARN for every request/reply you do? eg it seems as if you get a duplicate message? On Fri, May 8, 2015 at 1:38 PM, MS wrote: The idea is to create simple proxy with WS at one end and JMS(ActiveMQ) at the other. Use case goes like this: 1. send request using CXF endpoint 2. message is forwarded to activemq request queue 3. response is read from activemq response queue 4. received rsp. message is returned back to CXF endpoint as response ${body[0]} uri=activemq:queue:request?replyTo=responsereplyToType=Exclusive / The route works but I also receive following WARN message: reply.QueueReplyManager WARN Reply received for unknown correlationID [Camel-ID-HR00089234-50027-1431082752364-0-6] on reply destination [queue://response]. Current correlation map size: 0. The message will be ignored: ActiveMQTextMessage How did the message arrive at WS endpoint if this queue manager states that it'll be ignored. How can I resolve this issue (warning). -- View this message in context: http://camel.465427.n5.nabble.com/QueueReplyManager-reply-received-for-unknown-correlationID-tp5766856.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: Using quartz and quartz2
Hi, You are not supposed to use tow quartz endpoint with same relative path setting. Please change the uri to another path such as quartz://sync/myTimer2”. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On May 3, 2015 at 4:02:53 AM, Mansour Al Akeel (mansour.alak...@gmail.com) wrote: I am just starting with quartz-camel. Toying with a small project, as I need the stateful capability. public class DataBaseSyncRouteBuilder extends RouteBuilder { @Override public void configure() throws Exception { from(quartz://sync/myTimer).process(new Processor() { @Override public void process(Exchange exchange) throws Exception { System.out.println(One second timer...); } }); } } This is generating this error: [.db.integration.MainApp.main()] SpringCamelContext INFO Apache Camel 2.15.1 (CamelContext: camel5) is shutdown in 0.046 seconds [WARNING] java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.camel.FailedToStartRouteException: Failed to start route route2 because of Multiple consumers for the same endpoint is not allowed: Endpoint[quartz://sync/myTimer] at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:3142) at org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:3099) at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3029) at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3042) at org.apache.camel.impl.DefaultCamelContext.startRouteService(DefaultCamelContext.java:2919) at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:843) at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:2895) at org.apache.camel.impl.DefaultCamelContext.addRouteDefinitions(DefaultCamelContext.java:775) at org.apache.camel.builder.RouteBuilder.populateRoutes(RouteBuilder.java:397) at org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:311) at org.apache.camel.impl.DefaultCamelContext$1.call(DefaultCamelContext.java:731) at org.apache.camel.impl.DefaultCamelContext$1.call(DefaultCamelContext.java:728) at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2486) at org.apache.camel.impl.DefaultCamelContext.addRoutes(DefaultCamelContext.java:728) at org.apache.camel.main.MainSupport.postProcessCamelContext(MainSupport.java:476) at org.apache.camel.main.MainSupport.postProcessContext(MainSupport.java:405) at org.apache.camel.spring.Main.doStart(Main.java:171) at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at org.apache.camel.main.MainSupport.run(MainSupport.java:150) at org.apache.camel.main.MainSupport.run(MainSupport.java:354) Chaging the URL to use quartz2 : from(quartz2://sync/myTimer).process(new Processor() { Is causing this error: [WARNING] java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route2: Route(route2)[[From[quartz2://sync/myTimer]] - [process[Pro... because of Failed to resolve endpoint: quartz2://sync/myTimer due to: Trigger key sync.myTimer is already in us$ by Endpoint[quartz2://sync/myTimer] at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:190) at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:841) at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:2895) at org.apache.camel.impl.DefaultCamelContext.addRouteDefinitions(DefaultCamelContext.java:775) at org.apache.camel.builder.RouteBuilder.populateRoutes(RouteBuilder.java:397) at org.apache.camel.builder.RouteBuilder.addRoutesToCamelContext(RouteBuilder.java:311
Re: Unmarshal not working
Please use the PAYLOAD data format, as the Message data format just redirect the underlay Stream for you in camel route, if you don’t want to handle the SOAP envelope yourself, PAYLOAD is your first choice. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On May 8, 2015 at 4:38:29 AM, Christian Müller (christian.muel...@gmail.com) wrote: Please check the available data formats in the CXF component. Best, Christian Am 07.05.2015 10:00 schrieb jainmcs03 : Hi Team, JAXB can only unmarshall an XML if the soap envelope has already been removed. However, the SOAP response I'm trying to unmarshall has its namespace declaration on the soap envelope. So how to remove the SOAP envelope in camel route. Regards, Jayendran -- View this message in context: http://camel.465427.n5.nabble.com/Unmarshal-not-working-tp5766790p5766797.html Sent from the Camel - Users mailing list archive at Nabble.com.
Apache Camel 2.15.2 Released
The Camel community announces the immediate availability of the new patch release Camel 2.15.2. This release contains a total of 71 fixes applied in the past few weeks by the community on the Camel 2.15.x maintenance branch. The artifacts are published and ready for you to download[1] either from the Apache mirrors or from the Central Maven repository. For more details please take a look at the release notes[2]. Many thanks to all who made this release possible. [1]http://camel.apache.org/download.html [2]https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12329743styleName=projectId=12311211 On behalf of the Camel PMC, -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem
Re: TypeConversion Error
Can you try to disable the stream cache and try again? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 28, 2015 at 9:23:51 PM, Scarpacci (mike.giardine...@gmail.com) wrote: Hi Willem, Thanks for your response. I can tell that it is using the StreamCache and even applied the setting in the context, but it is still failing. I added more of the debug output to hopefully shed some more light on the problem. I am a camel newbie, so there is a good chance that this is user error. *Additional Debug Logs:* 06:18:46.315 [Camel (ArdisSystem) thread #0 - file:///Users/dev/data/input/actor] DEBUG o.a.c.component.file.FileConsumer - About to process file: GenericFile[/Users/dev/data/input/actor/BackgroundFull.txt] using exchange: Exchange[BackgroundFull.txt] 06:18:46.324 [Camel (ArdisSystem) thread #0 - file:///Users/dev/data/input/actor] DEBUG o.a.c.c.file.GenericFileConverter - Read file /Users/dev/data/input/actor/BackgroundFull.txt (no charset) 06:18:46.335 [Camel (ArdisSystem) thread #0 - file:///Users/dev/data/input/actor] DEBUG o.a.camel.processor.SendProcessor - Endpoint[akka://ArdisSystem/user/$a?autoAck=truereplyTimeout=6+milliseconds] Exchange[Message: [Body is instance of org.apache.camel.StreamCache]] 06:18:46.341 [Camel (ArdisSystem) thread #0 - file:///Users/dev/data/input/actor] DEBUG org.apache.camel.util.FileUtil - Retrying attempt 0 to delete file: /var/folders/dh/zfqvn9gn7cl6h63d3400y4zxp3xtzf/T/camel-tmp-214819/cos1926967760124850497.tmp 06:18:46.341 [Camel (ArdisSystem) thread #0 - file:///Users/dev/data/input/actor] DEBUG org.apache.camel.util.FileUtil - Tried 1 to delete file: /var/folders/dh/zfqvn9gn7cl6h63d3400y4zxp3xtzf/T/camel-tmp-214819/cos1926967760124850497.tmp with result: true 06:18:46.343 [Camel (ArdisSystem) thread #0 - file:///Users/dev/data/input/actor] DEBUG o.a.c.c.file.GenericFileOnCompletion - Done processing file: GenericFile[/Users/dev/data/input/actor/BackgroundFull.txt] using exchange: Exchange[Message: [Body is instance of org.apache.camel.StreamCache]] 06:18:46.343 [Camel (ArdisSystem) thread #0 - file:///Users/dev/data/input/actor] DEBUG org.apache.camel.util.FileUtil - Retrying attempt 0 to delete file: /Users/dev/data/input/actor/BackgroundFull.txt.camelLock 06:18:46.343 [Camel (ArdisSystem) thread #0 - file:///Users/dev/data/input/actor] DEBUG org.apache.camel.util.FileUtil - Tried 1 to delete file: /Users/dev/data/input/actor/BackgroundFull.txt.camelLock with result: true 06:18:46.344 [Camel (ArdisSystem) thread #0 - file:///Users/dev/data/input/actor] DEBUG org.apache.camel.util.FileUtil - Retrying attempt 0 to delete file: /Users/dev/data/input/actor/.camel/BackgroundFull.txt 06:18:46.344 [Camel (ArdisSystem) thread #0 - file:///Users/dev/data/input/actor] DEBUG org.apache.camel.util.FileUtil - Tried 1 to delete file: /Users/dev/data/input/actor/.camel/BackgroundFull.txt with result: true 06:18:46.344 [Camel (ArdisSystem) thread #0 - file:///Users/dev/data/input/actor] DEBUG o.a.c.c.f.s.GenericFileRenameProcessStrategy - Renaming file: GenericFile[/Users/dev/data/input/actor/BackgroundFull.txt] to: GenericFile[/Users/dev/data/input/actor/.camel/BackgroundFull.txt] 06:18:46.344 [Camel (ArdisSystem) thread #0 - file:///Users/dev/data/input/actor] DEBUG org.apache.camel.util.FileUtil - Tried 1 to rename file: /Users/dev/data/input/actor/BackgroundFull.txt to: /Users/dev/data/input/actor/.camel/BackgroundFull.txt with result: true [ERROR] [04/28/2015 06:18:46.349] [ArdisSystem-akka.actor.default-dispatcher-3] [akka://ArdisSystem/user/$a] Error during type conversion from type: org.apache.camel.converter.stream.FileInputStreamCache to the required type: java.lang.String with value org.apache.camel.converter.stream.FileInputStreamCache@39d38328 due java.io.IOException: Stream closed org.apache.camel.TypeConversionException: Error during type conversion from type: org.apache.camel.converter.stream.FileInputStreamCache to the required type: java.lang.String with value org.apache.camel.converter.stream.FileInputStreamCache@39d38328 due java.io.IOException: Stream closed -- View this message in context: http://camel.465427.n5.nabble.com/TypeConversion-Error-tp5766411p5766427.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: TypeConversion Error
It looks like camel just remove the temp cached file when you want to send the message to the other processor. You can setup the camel property to change the CamelCachedOutputStreamThreshold property[1] of camel context to a big value. [1]http://camel.apache.org/stream-caching.html -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 28, 2015 at 12:37:22 PM, Scarpacci (mike.giardine...@gmail.com) wrote: Hi All, I am using akka-camel to process files. My initial tests were working great, however when I started passing in actual xml files it is puking with type conversions. Here is my consumer (very simple, but puking at msg.bodyAs[String] class FileConsumer extends Consumer { def endpointUri = file:/data/input/actor val processor = context.actorOf(Props[Processor], processor) def receive = { case msg: CamelMessage = { println(Parent...received %s format msg) processor ! msg.bodyAs[String] } } } *[ERROR*] [04/27/2015 12:10:48.617] [ArdisSystem-akka.actor.default-dispatcher-5] [akka://ArdisSystem/user/$a] Error during type conversion from type: org.apache.camel.converter.stream.FileInputStreamCache to the required type: java.lang.String with value org.apache.camel.converter.stream.FileInputStreamCache@4611b35a due java.io.FileNotFoundException: /var/folders/dh/zfqvn9gn7cl6h63d3400y4zxp3xtzf/T/camel-tmp-807558/cos2920459202139947606.tmp (No such file or directory) org.apache.camel.TypeConversionException: Error during type conversion from type: org.apache.camel.converter.stream.FileInputStreamCache to the required type: java.lang.String with value org.apache.camel.converter.stream.FileInputStreamCache@4611b35a due java.io.FileNotFoundException: /var/folders/dh/zfqvn9gn7cl6h63d3400y4zxp3xtzf/T/camel-tmp-807558/cos2920459202139947606.tmp (No such file or directory) I am wondering if it has something to do with the actual contents of the xml. They are not big at all (roughly 70kb). I doubt I will be able to provide an actual example of the XML itself. Just baffled as to why something so small and being converted to a string is having issues. Other dummy example xml files have worked fine. -- View this message in context: http://camel.465427.n5.nabble.com/TypeConversion-Error-tp5766411.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Syslog data format incorrect parsing of structured data
I just create a JIRA[1] and the patch is on the way. [1]https://issues.apache.org/jira/browse/CAMEL-8687 -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 22, 2015 at 5:57:38 AM, Sameer Babu K K (sameer...@yahoo.com.invalid) wrote: According to RFC 5424 syslog structured data can be like the below examples: All examples in this section show only the structured data part of the message. Examples should be considered to be on one line. They are wrapped on multiple lines in this document for readability purposes. A description is given after each example. Example 1 - Valid [exampleSDID@32473 iut=3 eventSource=Application eventID=1011] This example is a structured data element with a non-IANA controlled SD-ID of type exampleSDID@32473, which has three parameters. Example 2 - Valid [exampleSDID@32473 iut=3 eventSource=Application eventID=1011][examplePriority@32473 class=high] But the syslog data format (org.apache.camel.component.syslog.SyslogConverter) just considers the value till next space as the structured message. StringBuilder msgId = new StringBuilder(); while ((charFound = (char) (byteBuffer.get() 0xff)) != ' ') { msgId.append(charFound); } rfc5424SyslogMessage.setMsgId(msgId.toString()); StringBuilder structuredData = new StringBuilder(); while ((charFound = (char) (byteBuffer.get() 0xff)) != ' ') { structuredData.append(charFound); } rfc5424SyslogMessage.setStructuredData(structuredData.toString()); This seems to be a bug to me. Is there a fix or latest version available for this parsing? Best Regards,Sameer
Re: HTTP operation failed invoking statusCode: 500
PAYLOAD message body just have the SOAP headers and SOAP body messages. If you want to send out the PAYLOAD message to a real web service endpoint, you need to use camel cxf endpoint to do it as it will put the message body into a soap envelope. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 21, 2015 at 6:42:06 PM, ercan.canlier (ercan.canl...@gmail.com) wrote: Hi Jiang, First of all, thanks for your interest. Could you please give me some hints about it? How can i show only soap body also at response? Or how should i redirect the request with PAYLOAD mode? Thanks. Ercan -- View this message in context: http://camel.465427.n5.nabble.com/HTTP-operation-failed-invoking-statusCode-500-tp5766085p5766092.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: HTTP operation failed invoking statusCode: 500
If you change the data format of the cxf endpoint, you can not just redirect the input stream to a http endpoint, as the PAYLOAD message doesn’t has the soap envelope. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 21, 2015 at 12:42:41 PM, ercan.canlier (ercan.canl...@gmail.com) wrote: Hello, I have proxied real web service by defining proxy. I am tracing messages via camel's tracer and writing to database and after that presenting on the web application. The XML Request and Responses are quite long and i wanted to make them smaller by setting dataFormat=PAYLOAD at CXF endpoint but when i change this dataFormat=MESSAGE to dataFormat=PAYLOAD, i got this exception : HTTP operation failed invoking http://localhost:9082/webservices/payment with statusCode: 500 What is wrong with the configuration? Could you please help? Here is my endpoint configuration: address=http://localhost:${proxy.port}/gadget-ws-proxy/webservices/payment; endpointName=s:PaymentEndpoint serviceName=s:PaymentEndpointService wsdlURL=etc/wsdl/report_incident.wsdl xmlns:s=http://gadget.com; / init-method=start destroy-method=stop value=http://localhost:${real.port}/webservices/payment; / uri=http://localhost:${real.port}/webservices/payment; / Thanks in advance. Best regards. Ercan -- View this message in context: http://camel.465427.n5.nabble.com/HTTP-operation-failed-invoking-statusCode-500-tp5766085.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Authentication in pipes and filters ???
I think you can just throw out the authentication failure exception and you can use the error handler to setup some kind of reject exception for the response to use. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 16, 2015 at 4:15:38 PM, Cristiano Costantini (cristiano.costant...@gmail.com) wrote: Hello, I was searching to implement a Pipes and Filter EIP that, as the picture illustrated in http://camel.apache.org/pipes-and-filters.html, it has a step that Authenticates the exchange. I have not however figured out how to manage a failed authentication: how do I best implement the rejection of the exchange to be further processed by subsequents endpoints? I'm confused as my exchange is an InOut, so I cannot simply abort the processing, I need to send back some output (either an empty response or error code) to the initial from endpoint... Any suggestion? thanks, Cristiano
Re: The Camel Kafka component crashes with a NoClassDefFoundError exception.
As the Scala lib has some backward compatible issue, so we cannot apply the scala version we use in camel to the Camel kafka. I think it’s up to the user to choice the right version of Scala there. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 17, 2015 at 4:41:37 AM, Henryk Konsek (hekon...@gmail.com) wrote: If we are talking about camel-scala, then I believe that scala dependency should be provided. We integrate Camel with Scala, but it is up to end-user to provide the version of Scala s(he) wants to use in the project. Laters! czw., 16 kwi 2015 o 19:10 użytkownik Claus Ibsen napisał: Hi Yeah I am not sure why the scala dependency was set to scope=provided. Maybe git blame can tell. But sure you are welcome to log a ticket and provide a patch / PR http://camel.apache.org/support On Wed, Apr 15, 2015 at 5:50 PM, ccampo wrote: The Camel Kafka component crashes with a NoClassDefFoundError exception. If you define a Camel route which uses the Camel Kafka component, it will crash when running with a NoClassDefFoundError. I've tracked this down to the project that uses camel-kafka 2.15.1 also requires an explicit dependency on scala-library 2.10.2. This dependency is not mentioned anywhere in the documentation. Here's the error that occurs when the Scala dependency is missing: Here's the route I'm using: My project is using Spring Boot 1.2.3 and Camel 2.15.1. Would you like me to open a JIRA ticket for this to be resolved? -- View this message in context: http://camel.465427.n5.nabble.com/The-Camel-Kafka-component-crashes-with-a-NoClassDefFoundError-exception-tp5765829.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: Camel-CXF will generate invalid XML in some cases
Hi Stephan, How did you turn the payload body into String? If you use the CxfPayload.getBody() you should get the a list of element which namespaces are set rightly. The PayLoadDataFormatFeature[1] just setup the interceptors for CXF to avoid processing the message part. I guess that is the missing pice that you want to know :) [1]https://github.com/apache/camel/blob/master/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 15, 2015 at 10:21:38 PM, Siano, Stephan (stephan.si...@sap.com) wrote: Hi, I am currently trying to debug an issue that is actually driving me crazy. I am calling a web service from a camel cxf endpoint in payload mode that returns data that uses a namespace in an attribute name that is defined on the SOAP envelope of the response. If I convert the CxfPayload into a String, the XML will be invalid because the namespace definition is missing. The response message looks like this: xsi:type=xsd:stringResponseData If you try any XML operation on this (like an XPath) the parser will complain that the xsi namespace prefix is undefined. The route looks like that: and the endpoint is defined like that: address=http://localhost:8080/cxf/getSeedDummyService; endpointName=orange:MessageFlow_2 id=SII_SEED_SII_GET_SEED My analysis so far is that the Source that is transferred from a CXF Message object to a Camel CxfPayload object is a StaxSource (the CXF class). If I try similar things in Camel-CXF unit tests, the source seems to be a DOMSource for some reason (and there is some special code for namespace handling in DefaultCxfBinding for that). However I have not managed to figure out where the SOAP envelop is read in payload mode and how to get a proper transformation in to anything flat that does not lose the namespace but does not parse the whole thing into a DOM tree (which is pretty huge). It am also under the impression that Woodstox does also play some role in this context (the XMLStreamReader behind the StaxSource is from Woodstox and this does not return these outer namespaces with the getNamespaceCount() method. Does anybody have an idea how to proceed here? Best regards Stephan
Re: Handling splitting and error handling
handled(true) just tell camel to keep on processing the message as the error is recovered. So I think you still need use handled(false) in your onException. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 15, 2015 at 5:22:21 PM, blommish (johanblomgren1...@gmail.com) wrote: So well, this can be handled by using transacted() after picking up the message from direct:inbound, making it look like: from(direct:inbound) .transacted() .multicast().parallelProcessing().to(direct:a, direct:b); But there's another issue then. If I have onException(Exception.class).handled(true).useOriginalMessage().to(jms:errorQueue) It WILL not rollback the messages from the endpoints, for example if it fails to validate for message a, it will still send the message b to q3 and q4. But when having handled(false) it will not. But then it *will also rollback the message to the inbound queue* AND post it to the errorQueue? -- View this message in context: http://camel.465427.n5.nabble.com/Handling-splitting-and-error-handling-tp5765748p5765819.html Sent from the Camel - Users mailing list archive at Nabble.com.
RE: Bi-directional comms on TCP connection
First the Netty or Mina Consumer works in clientMode just connect the address of the device as a client when the route is started, then it can keep receiving the event from the device. If the consumer doesn’t work in clientMode, it just start a server which listen to address and wait for the client to connect. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 16, 2015 at 7:30:45 AM, Quoc Le (quo...@fortna.com) wrote: Hi Willem, I look at the code and your unit test NettyConsumerClientModeTest but still don't quite follow why clientMode can help with the case that Carl described. How can the consumer-server connects to the client-device in the first place? Can you explain the magic there? Thanks, -Quoc -Original Message- From: Willem Jiang [mailto:willem.ji...@gmail.com] Sent: Wednesday, April 15, 2015 3:00 AM To: users@camel.apache.org Subject: Re: Bi-directional comms on TCP connection We implement CAMEL-1077[1] in camel-2.15.x recently, so the ESB can talk to the device as a client to receive the events. But now the miss part is how can we share the channel between netty consumer and the netty producer. [1]https://issues.apache.org/jira/browse/CAMEL-1077 -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 14, 2015 at 11:33:13 PM, Carl Nygard (cjnyg...@gmail.com) wrote: I have a question about the Mina/Netty TCP connector in Camel. Can Mina/Netty handle bi-directional comms through Camel, or do we need to handle this type of interface externally? We have embedded devices (button/light combo) that will consume TCP messages to light a device and initiate messages to indicate button press events. In other words, the device is the server, but will also spontaneously generate event messages back to the client/ESB. Both sides (server/device,client/ESB) expect ACKs for messages. So in essence, it is a 2-way communication using 1 TCP connection, initiated by ESB. Unfortunately, Camel Netty and Mina doesn’t have the capability to support 2-way asynchronous (https://issues.apache.org/jira/browse/CAMEL-2624 - It’s still open ticket rom 2010, 2012 + this is the duplicated ticket with some more context: https://issues.apache.org/jira/browse/CAMEL-1075 ) What we have tried so far: 1. synchronous channel (before realize the limitation above): This will always require our ESB-EndPoint to initiate the conversation, good to receive ACK, but not allowing device to send Event message at will. 2. asynchronous channel: (http://camel.apache.org/async.html ) With async model, we can send request, do something else and let the async callback to process the reply. However, we still have a 1-1 relationship between request and reply, and so in order to allow device to “initiate” the Event message, ESB-Endpoint will need to send more “no-op requests” to device-Endpoint, to catch for ACK and Event message. This solution is not beautiful (quite hacking), and will not work if there’s no “no-op operation” (e.g. device will ACK on all messages sent). 3. Look at examples in these 2 books: “Camel in Actions” ( https://dl.dropboxusercontent.com/u/3786274/Camel%20In%20Action.pdf ) and “Apache Camel Developer’s Cookbook” ( https://dl.dropboxusercontent.com/u/3786274/Apache%20Camel%20Developer %20Cookbook.pdf ) but not much light on the issue we are facing. Any help? --carl
Re: SOAP headers not relayed for a SOAP 1.2 service when using CXF component
How did you specify the SOAP 1.2 binding in your camel-cxf endpoint? What kind of soap header were lost? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 15, 2015 at 9:28:44 PM, _redwings (eriknygre...@gmail.com) wrote: Hi! I'm using Camel 2.15.0 and the CXF component (CXF 3.0.4) to call a SOAP 1.2 web service in PAYLOAD mode. The call in itself works fine, however necessary out of band soap headers (i.e. not defined in the contract) are not relayed to the service endpoint for some reason. In the log I can see the following trace message : TRACE org.apache.camel.component.cxf.DefaultCxfBinding - Propagate SOAP/protocol header: {http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security : [wsse:Security: null] But at the server side all I get are the typical SOAP 1.2 addressing headers (Action, ReplyTo etc) which the cxf component seems to have generated for me, and all the other soap headers are gone. I've used wireshark to determine that the problem seem to be in the CXF consumer somewhere. I have a similar use case calling a SOAP 1.1 web service and there soap header relaying works fine. Any ideas why the soap headers aren't relayed in my cxf client? -- View this message in context: http://camel.465427.n5.nabble.com/SOAP-headers-not-relayed-for-a-SOAP-1-2-service-when-using-CXF-component-tp5765823.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Getting list of contexts or getting context by name
I just assume the context means Camel Context, am I right? If you create the Camel Context you need to manage it yourself. I don’t think it is possible to look up the other Camel Context from the route which only knows about the CamelContext holds it. There are some components can only be used to talk each other within the same CamelContext, such as seda, direct. And we use these component to glue the routes. So my suggestion is you keep the dynamic routes in the same CamelContext, unless you don’t want them talk to each other. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 15, 2015 at 9:38:42 PM, Gustav Sinder (gustav.sin...@ferrologic.se) wrote: Hi, I'm working on a solution where I dynamically setup/remove routes based on external configuration. So far so good, it works good, a manager route handles this just good. A thought would be to place the dynamic routes in another context. I can create new contexts from within the Java without problem but I can't seem to find a way to either list the active contexts and/or get a context by its name. Also, are there any drawbacks on using another CamelContext instead of placing it all in the same one where the manager route also runs? Thanks /Gustav
Re: Bi-directional comms on TCP connection
We implement CAMEL-1077[1] in camel-2.15.x recently, so the ESB can talk to the device as a client to receive the events. But now the miss part is how can we share the channel between netty consumer and the netty producer. [1]https://issues.apache.org/jira/browse/CAMEL-1077 -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 14, 2015 at 11:33:13 PM, Carl Nygard (cjnyg...@gmail.com) wrote: I have a question about the Mina/Netty TCP connector in Camel. Can Mina/Netty handle bi-directional comms through Camel, or do we need to handle this type of interface externally? We have embedded devices (button/light combo) that will consume TCP messages to light a device and initiate messages to indicate button press events. In other words, the device is the server, but will also spontaneously generate event messages back to the client/ESB. Both sides (server/device,client/ESB) expect ACKs for messages. So in essence, it is a 2-way communication using 1 TCP connection, initiated by ESB. Unfortunately, Camel Netty and Mina doesn’t have the capability to support 2-way asynchronous (https://issues.apache.org/jira/browse/CAMEL-2624 - It’s still open ticket rom 2010, 2012 + this is the duplicated ticket with some more context: https://issues.apache.org/jira/browse/CAMEL-1075 ) What we have tried so far: 1. synchronous channel (before realize the limitation above): This will always require our ESB-EndPoint to initiate the conversation, good to receive ACK, but not allowing device to send Event message at will. 2. asynchronous channel: (http://camel.apache.org/async.html ) With async model, we can send request, do something else and let the async callback to process the reply. However, we still have a 1-1 relationship between request and reply, and so in order to allow device to “initiate” the Event message, ESB-Endpoint will need to send more “no-op requests” to device-Endpoint, to catch for ACK and Event message. This solution is not beautiful (quite hacking), and will not work if there’s no “no-op operation” (e.g. device will ACK on all messages sent). 3. Look at examples in these 2 books: “Camel in Actions” ( https://dl.dropboxusercontent.com/u/3786274/Camel%20In%20Action.pdf ) and “Apache Camel Developer’s Cookbook” ( https://dl.dropboxusercontent.com/u/3786274/Apache%20Camel%20Developer%20Cookbook.pdf ) but not much light on the issue we are facing. Any help? --carl
Re: Why so many port used when I use camel-netty4-http
I don’t think camel-netty4-http can open those ports like you side. What’s your camel route looks like? Did you just deploy the camel route inside the tomcat? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 7, 2015 at 8:24:05 PM, Yuffie (yuffie.pa...@gmail.com) wrote: Hi, when I use netty4-http compoment, I found it use a lot ports which I have not defined in my program: 协议 本地地址 外部地址 状态 PID TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 1080 TCP 0.0.0.0:135 0.0.0.0:0 LISTENING 992 TCP 0.0.0.0:445 0.0.0.0:0 LISTENING 4 TCP 0.0.0.0:1025 0.0.0.0:0 LISTENING 560 TCP 0.0.0.0:1026 0.0.0.0:0 LISTENING 676 TCP 0.0.0.0:1027 0.0.0.0:0 LISTENING 480 TCP 0.0.0.0:1028 0.0.0.0:0 LISTENING 1036 TCP 0.0.0.0:1042 0.0.0.0:0 LISTENING 668 TCP 0.0.0.0:3306 0.0.0.0:0 LISTENING 2924 TCP 0.0.0.0:8009 0.0.0.0:0 LISTENING 10368 TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 10368 TCP 0.0.0.0:8082 0.0.0.0:0 LISTENING 10368 TCP 0.0.0.0:12025 0.0.0.0:0 LISTENING 1460 TCP 0.0.0.0:12110 0.0.0.0:0 LISTENING 1460 TCP 0.0.0.0:12119 0.0.0.0:0 LISTENING 1460 TCP 0.0.0.0:12143 0.0.0.0:0 LISTENING 1460 TCP 0.0.0.0:12465 0.0.0.0:0 LISTENING 1460 TCP 0.0.0.0:12563 0.0.0.0:0 LISTENING 1460 TCP 0.0.0.0:12993 0.0.0.0:0 LISTENING 1460 TCP 0.0.0.0:12995 0.0.0.0:0 LISTENING 1460 TCP 0.0.0.0:27275 0.0.0.0:0 LISTENING 1460 TCP 0.0.0.0:62332 0.0.0.0:0 LISTENING 1512 TCP 127.0.0.1:1135 0.0.0.0:0 LISTENING 8496 TCP 127.0.0.1:8005 0.0.0.0:0 LISTENING 10368 TCP 127.0.0.1:1 0.0.0.0:0 LISTENING 2980 TCP 127.0.0.1:10015 0.0.0.0:0 LISTENING 1512 TCP 127.0.0.1:12025 0.0.0.0:0 LISTENING 1460 TCP 127.0.0.1:12110 0.0.0.0:0 LISTENING 1460 TCP 127.0.0.1:12119 0.0.0.0:0 LISTENING 1460 TCP 127.0.0.1:12143 0.0.0.0:0 LISTENING 1460 TCP 127.0.0.1:12465 0.0.0.0:0 LISTENING 1460 TCP 127.0.0.1:12563 0.0.0.0:0 LISTENING 1460 TCP 127.0.0.1:12993 0.0.0.0:0 LISTENING 1460 TCP 127.0.0.1:12995 0.0.0.0:0 LISTENING 1460 TCP 127.0.0.1:17568 127.0.0.1:17570 ESTABLISHED 1620 TCP 127.0.0.1:17570 127.0.0.1:17568 ESTABLISHED 10368 TCP 127.0.0.1:17573 127.0.0.1:17574 ESTABLISHED 10368 TCP 127.0.0.1:17574 127.0.0.1:17573 ESTABLISHED 10368 TCP 127.0.0.1:17575 127.0.0.1:17576 ESTABLISHED 10368 TCP 127.0.0.1:17576 127.0.0.1:17575 ESTABLISHED 10368 TCP 127.0.0.1:17580 127.0.0.1:17581 ESTABLISHED 10368 TCP 127.0.0.1:17581 127.0.0.1:17580 ESTABLISHED 10368 TCP 127.0.0.1:17582 127.0.0.1:17583 ESTABLISHED 10368 TCP 127.0.0.1:17583 127.0.0.1:17582 ESTABLISHED 10368 TCP 127.0.0.1:17584 127.0.0.1:17585 ESTABLISHED 10368 TCP 127.0.0.1:17585 127.0.0.1:17584 ESTABLISHED 10368 TCP 127.0.0.1:17586 127.0.0.1:17587 ESTABLISHED 10368 TCP 127.0.0.1:17587 127.0.0.1:17586 ESTABLISHED 10368 TCP 127.0.0.1:17588 127.0.0.1:17589 ESTABLISHED 10368 TCP 127.0.0.1:17589 127.0.0.1:17588 ESTABLISHED 10368 TCP 127.0.0.1:17590 127.0.0.1:17591 ESTABLISHED 10368 TCP 127.0.0.1:17591 127.0.0.1:17590 ESTABLISHED 10368 TCP 127.0.0.1:17592 127.0.0.1:17593 ESTABLISHED 10368 TCP 127.0.0.1:17593 127.0.0.1:17592 ESTABLISHED 10368 TCP 127.0.0.1:17594 127.0.0.1:17595 ESTABLISHED 10368 TCP 127.0.0.1:17595 127.0.0.1:17594 ESTABLISHED 10368 TCP 127.0.0.1:17596 127.0.0.1:17597 ESTABLISHED 10368 TCP 127.0.0.1:17597 127.0.0.1:17596 ESTABLISHED 10368 TCP 127.0.0.1:17598 127.0.0.1:17599 ESTABLISHED 10368 TCP 127.0.0.1:17599 127.0.0.1:17598 ESTABLISHED 10368 TCP 127.0.0.1:17600 127.0.0.1:17601 ESTABLISHED 10368 TCP 127.0.0.1:17601 127.0.0.1:17600 ESTABLISHED 10368 TCP 127.0.0.1:17602 127.0.0.1:17603 ESTABLISHED 10368 TCP 127.0.0.1:17603 127.0.0.1:17602 ESTABLISHED 10368 TCP 127.0.0.1:17604 127.0.0.1:17605 ESTABLISHED 10368 TCP 127.0.0.1:17605 127.0.0.1:17604 ESTABLISHED 10368 TCP 127.0.0.1:27275 0.0.0.0:0 LISTENING 1460 TCP 192.168.6.111:139 0.0.0.0:0 LISTENING 4 TCP 192.168.6.111:1173 180.153.160.237:80 CLOSE_WAIT 9064 TCP 192.168.6.111:1195 180.153.160.237:80 CLOSE_WAIT 9064 TCP 192.168.6.111:1197 180.153.160.237:80 CLOSE_WAIT 9064 TCP 192.168.6.111:1240 180.153.160.237:80 CLOSE_WAIT 9064 TCP 192.168.6.111:1642 180.153.160.237:80 CLOSE_WAIT 9064 TCP 192.168.6.111:2938 180.149.138.98:80 ESTABLISHED 7868 TCP 192.168.6.111:13364 60.28.215.83:80 ESTABLISHED 7868 TCP 192.168.6.111:17234 119.161.83.27:443 ESTABLISHED 7868 TCP 192.168.6.111:17327 180.153.160.237:80 CLOSE_WAIT 9064 TCP 192.168.6.111:17606 119.161.83.27:443 ESTABLISHED 7868 TCP 192.168.6.111:17619 119.161.83.27:443 ESTABLISHED 7868 TCP 192.168.6.111:17621 119.161.83.27:443 ESTABLISHED 7868 TCP 192.168.6.111:17640 119.161.83.27:443 ESTABLISHED 7868 TCP 192.168.6.111:17641 119.161.83.27:443 TIME_WAIT 0 TCP 192.168.6.111:17646 164.46.204.84:443 SYN_SENT 1460 TCP 192.168.6.111:17647 180.149.153.11:80 ESTABLISHED 7868 TCP [::]:135 [::]:0 LISTENING 992 TCP [::]:445 [::]:0 LISTENING 4 TCP [::]:1025 [::]:0 LISTENING 560 TCP [::]:1026 [::]:0 LISTENING 676 TCP [::]:1027
Re: camel-ftp 2.15.1 return ftp error code 421
I just try to guess what’s the cause of issue of camel-ftp 2.15.1 by looking up the change log. I’m not sure if changing the receiving buffer could make the difference. It looks like you just find the key of the issue, am I right? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 8, 2015 at 10:29:12 PM, alexey-s (alex...@mail.ru) wrote: It looks like quite a different matter. On the server, there is a restriction session. After 10 minutes, the server connection tearing. No problem in download speed of large files. Disconnection is the fault of the strategy routePolicyStopTime. But it's not scary. The main problem is to read a large number of file names. It is necessary to go into the database idempotentRepository. There check the name of a previously processed file. The total scan time a large number of file names transferred abroad in 10 minutes. FtpConsumer not time to start downloading the file contents. Parameter maxMessagesPerPoll I do not override. By default, it is 1000. Current indicators idempotentRepository repository size: 194159 files. -- Aleksey -- View this message in context: http://camel.465427.n5.nabble.com/camel-ftp-2-15-1-return-ftp-error-code-421-tp5765272p5765482.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Jetty HTTPS 2way
Which of CXF version are you using? If I remember right CXF fix some SSLv3 issue last year within the version of 2.7.x, I’m not sure if it can cause the issue that you faced. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 7, 2015 at 4:35:14 PM, garethahealy (garethahe...@gmail.com) wrote: Hi Willem, Switched to camel-http4 and works. Cheers. -- View this message in context: http://camel.465427.n5.nabble.com/Jetty-HTTPS-2way-tp5765296p5765431.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-ftp 2.15.1 return ftp error code 421
OK, here is another change CAMEL-8513[1] in Camel 2.15.1 which improves the download speed. I guess it may cause the ftp server complain about the server load. So the workaround could be set the receiveBufferSize option to 1024 to slow down the processing speed. [1]https://issues.apache.org/jira/browse/CAMEL-8513 -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 6, 2015 at 10:35:40 PM, alexey-s (alex...@mail.ru) wrote: Honestly. 2.15.0 On this effect is much less than 2.15.1. I used to CronScheduledRoutePolicy ftpDocReadRoutePolicy = new CronScheduledRoutePolicy(); ftpDocReadRoutePolicy.setRouteStartTime(routePolicyStartTime); ftpDocReadRoutePolicy.setRouteStopTime(routePolicyStopTime); ftpDocReadRoutePolicy.setRouteStopGracePeriod(routePolicyStopGracePeriod); I used to have broke the connection when receiving the contents of files from ftp server. Now the volume of data to be processed has increased by 50 times. To combat system start time and stop very large. No problem. To test the interval between the start and stop up to 10 minutes. The strangest thing that 2.15.1 error occurs frequently. For a couple of hours of tests in 2.15.0 fix one mistake. 2.15.1 At the same time, for the problem persists for more than 10 times. And here's remarks. -- View this message in context: http://camel.465427.n5.nabble.com/camel-ftp-2-15-1-return-ftp-error-code-421-tp5765272p5765367.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Karaf with Camel 2.15.1, CXF 3.0.4 - which Spring versions can be used?
As we doesn’t specify the spring version inside of camel feature, you need to choice the spring version yourself inside of Karaf. If you load the spring feature 4.0, it should work out of box. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 3, 2015 at 11:26:55 PM, Martin Lichtin (lich...@yahoo.com.invalid) wrote: Using Camel 2.15.1 and CXF 3.0.4 in a Karaf container, I'm wondering how one can control the Spring version. Camel feature camel-spring loads Spring with spring which will result in loading 3.2.11.RELEASE. Is there a way to use Spring 4? - Martin
Re: Jetty HTTPS 2way
It looks like some thing is wrong when doing the TLSv1.2 Handshake. Can you try to use camel-http or camel-http4 to do the same thing? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 4, 2015 at 4:17:21 AM, garethahealy (garethahe...@gmail.com) wrote: I am trying to make a rest call, via HTTPS and have 2way auth. I originally tried to do this with CXF[1], but due to an issue with the conduit not attaching, have moved to a jetty endpoint. I have the below config for the jetty endpoint: class=org.apache.camel.util.jsse.KeyStoreParameters value=${http.certs.location}/client-keystore.jks/ class=org.apache.camel.util.jsse.KeyStoreParameters value=${http.certs.location}/client-truststore.jks/ class=org.apache.camel.util.jsse.TrustManagersParameters class=org.apache.camel.util.jsse.KeyManagersParameters class=org.apache.camel.util.jsse.SSLContextParameters class=org.apache.camel.component.jetty.JettyHttpComponent And make the call as per: uri=jetty://{{fuse.rest.transport}}://{{fuse.rest.host}}:{{fuse.rest.port}}/rest/fuse/ But i still get cert issues. I know the certs are correct and that i am pointing to the correct stores as i have a simple java class that proves this works. I've put SSL in debug[2], but am not sure what a lot of it means. The main thing that sticks out is: CamelJettyClient(0x73d8db54)-4716, WRITE: TLSv1.2 Handshake, length = 48 CamelJettyClient(0x73d8db54)-4712, called closeInbound() CamelJettyClient(0x73d8db54)-4712, fatal error: 80: Inbound closed before receiving peer's close_notify: possible truncation attack? javax.net.ssl.SSLException: Inbound closed before receiving peer's close_notify: possible truncation attack? %% Invalidated: [Session-35, TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA] This is for camel 2.12. Have i missed something on the config side? [1] http://cxf.547215.n5.nabble.com/Camel-CXF-HTTPS-http-tlsClientParameters-not-attaching-td5755601.html [2] https://gist.github.com/garethahealy/014fcfe6d59eb53b -- View this message in context: http://camel.465427.n5.nabble.com/Jetty-HTTPS-2way-tp5765296.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-ftp 2.15.1 return ftp error code 421
There are only few changes between Camel 2.15.1 and Camel 2.15.0. I’m not sure if CAMEL-7565[1] is related to issue that you faced. [1]https://issues.apache.org/jira/browse/CAMEL-7565 -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 3, 2015 at 9:21:02 PM, alexey-s (alex...@mail.ru) wrote: Imagine that your FTP directory shows the C:\Program Files on Windows or /usr/lib on Linux. There is a very large number of files. Files can not be deleted. Process periodically scans all files in all folders, filters, and sorts. Uses a database table to store the names of files previously treated (IdempotentReposiotry). It is understood that when preprocessing is large. Here then is manifested error with ftp server. He believes that his overloaded work and an error 421. -- View this message in context: http://camel.465427.n5.nabble.com/camel-ftp-2-15-1-return-ftp-error-code-421-tp5765272p5765276.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: XMPP 2.15.0 vs. 2.15.1 failing
I just find the recent change[1] by using the gitk components/camel-xmpp” command. The work around could be change the smack version to 4.0.6. [1]https://issues.apache.org/jira/browse/CAMEL-8520 -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 3, 2015 at 6:48:24 PM, Christopher Piggott (cpigg...@gmail.com) wrote: No, I haven't, and you're right - I should have. I'm an easily distracted type though and I'm trying to get some ZCL stuff pushed to maven central asap. I use camel for a ton of testing of that kind of thing, and shortly I'll be pushing out an xbee camel component I wrote (and am now testing). Sorry for the lame answer. If nobody knows what's going on here off the top of their heads I'll dig into it in a little bit and report back. On Fri, Apr 3, 2015 at 6:40 AM, Claus Ibsen wrote: Hi Have you looked at the source code changes in camel-xmpp 2.15.0 and 2.15.1 and also about any JAR upgrades. The best clue would be in any of those changes. On Fri, Apr 3, 2015 at 12:18 PM, Christopher Piggott wrote: Hi, Earlier this evening I upgraded my camel project from 2.15.0 to 2.15.1 with no other code changes, and suddenly I was unable to connect to my XMPP server. The error I got was roughly this: SASLauthentication failed using mechanism DIGEST-MD5: I did some brief troubleshooting but was not able to solve the problem, so I just dropped back to 2.15.0. Searching various mailing lists I found a number of people complaining of the same problem; a ton of bad/unhelpful advice; and a good amount of skepticism that it's even really a problem. It certainly appears to be one to me. Permissions, keys, etc. dealing with this kind of stuff (including self-signed certificates on openfire servers) has always been pretty ugly in Java anyway. Most of the time I can fix things by adding various trust providers, or screwing around with keytool - but it's pretty hideous. I am following advice from the camel xmpp page and posting this to the mailing list rather than filing a bug. If someone believes this really is a bug let me know and I'll be happy to fill out the ticket. Or, of course, if you have some workaround that will allow this to continue working, that's great too. Despite the fact that it's trying to use digest, it's still inside of an SSL so I'm not overly concerned about it. (I just don't want to spend my life screwing around working around openfire). -- 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: GenericFileMessage creates body from file multiples times
It’s hard for the Camel to know if the null body is intend of just a lazy value. I think you can work around it by setting the message body to be an empty String instead of null if you don’t want to Camel to process the message any more. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 1, 2015 at 5:02:58 PM, A.Light (angelo.leg...@axiossystems.com) wrote: Hi all, using the file component I encountered a behaviour that doesn't seem right to me... but maybe it's an intended behaviour. Basically the issue shows when I have a route that reads the contents of a file using the file component and then the message body goes to null. At this point, any subsequent call to getBody (for instance a log(${body}) will cause the file to be read again, and put in the body. This behaviour is caused by the GenericFileMessage method createBody() (invoked by the MessageSupport.getBody() when the body is null) that, for the sake of lazy file loading, loads the file again every time it is invoked. This means that I cannot have an empty body, for any reason, in a route initiated by a file component. This seems wrong to me as null body can have valid meaning in a camel route. It this an intended behaviour? I created a test class for this issue that you can get here: TestGhostFileBody.java . Let me know if you have problems getting it. Thanks, A. -- View this message in context: http://camel.465427.n5.nabble.com/GenericFileMessage-creates-body-from-file-multiples-times-tp5765116.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Apache Camel-Mina2 ExchangePattern
If you just want to do the proxy, it could be quit simple to use the mina API dirtily, you just need to tell the response handler to send the message to channel which receive the request. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 2, 2015 at 1:59:32 PM, itsavvy.ankur (iamtheone.an...@gmail.com) wrote: Hi Willem, Thanks for your response. I can check the message body for the two command headers that just need to be written out but not expect a reply. I think the underlying implementation for Mina2Producer will block my use case. I cannot do sync=false and with sync=true the Mina2Producer implementation always checks for a response within a specific timeout. May be need to write my own implementation? Any ideas of doing this out of the box ? Thanks. On 2 Apr 2015 11:24, Willem.Jiang [via Camel] ml-node+s465427n5765186...@n5.nabble.com wrote: Current Camel-Mina2 producer just wait for the response when the endpoint sync option is true, it doesn’t support to set the reply mode dynamically. BTW, can you tell if Message exchange pattern by just looking up the message content? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 2, 2015 at 1:03:58 PM, itsavvy.ankur ([hidden email] ) wrote: I am trying to build a prototype using Apache Camel-Mina2 component. We have our own protocol implementation on TCP and I need to intercept Client - Server messages using a proxy Component. Existing - TCP Client TCP Server New - TCP Client Proxy Server - TCP Server One of the issue in our protocol is that each Request is not guaranteed a reply from the server, so some requests will be sent on the channel with an optional response. However some requests will also get back a response. Protocol Semantics : Hi Hello How Are You -- Are You okay - -Yes As you can see messages with are from client to server and are responses from Server ( on a single stream /line). Now given the above problem, Camel-Mina2 works on a InOut message exchange pattern. The ExchangePattern Enumeration also has an InOptionalOut use case. Any suggestions how I can configure my endpoints? I would like to know if it is possible to make use of an InOptionalOut exchange pattern. So essentially not worry about the response for certain types of messages. Can I handle this programmatically - Read the Message Body and decide if a Request needs a Response or just needs to be written out ? Sample implementation is as below: SimpleRegistry reg = new SimpleRegistry(); reg.put(ProtocolCodec, new ProtocolCodec()); CamelContext context = new DefaultCamelContext(reg); context.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { // TODO Auto-generated method stub from(mina2:tcp://localhost:9888?sync=truecodec=#ProtocolCodecdisconnectOnNoReply=false). to(mina2:tcp://localhost:9889?sync=truecodec=#ProtocolCodecdisconnectOnNoReply=falseclientMode=true); } }); context.start(); -- View this message in context: http://camel.465427.n5.nabble.com/Apache-Camel-Mina2-ExchangePattern-tp5765184.html Sent from the Camel - Users mailing list archive at Nabble.com. -- If you reply to this email, your message will be added to the discussion below: http://camel.465427.n5.nabble.com/Apache-Camel-Mina2-ExchangePattern-tp5765184p5765186.html To unsubscribe from Apache Camel-Mina2 ExchangePattern, click here . NAML -- View this message in context: http://camel.465427.n5.nabble.com/Apache-Camel-Mina2-ExchangePattern-tp5765184p5765187.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: How to handle two dimensional arrays
double split? or you can just turn the Object[][] into a list then use spliter to do the job for you. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 1, 2015 at 9:56:05 PM, Divan Mostert (divan.most...@c24.biz) wrote: Hi everyone, We have a Camel Processor which can return an Object[][], but how do one deal with the result if each of the Objects is a message you want to further handle downstream? Any help is greatly appreciated. Regards Divan Mostert | Head of iO Development C24.biz M: +264 81 383 2924 E: divan.most...@c24.biz
Re: In project camel-example-cxf unable to resolve resource location : /camel-eclipse-checkstyle
If you want to setup the eclipse project by using mvn eclipse, you need to do it from the root intend of doing it from camel-example-cxf directory. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 2, 2015 at 10:29:31 PM, Vivek Modi (vi...@net4nuts.com) wrote: Hi All, I am currently trying to set up the example camel-example-cxf from the list of examples provided with the camel binaries. The example builds fine but when I execute mvn eclipse:eclipse I get the below error : *C:\apache-camel-2.14.2\examples\camel-example-cxfmvn eclipse:clean eclipse:ecli* *pse* *[INFO] Scanning for projects...* *[INFO]* *[INFO] * *[INFO] Building Camel :: Example :: CXF 2.14.2* *[INFO] * *[INFO]* *[INFO] --- maven-eclipse-plugin:2.9:clean (default-cli) @ camel-example-cxf ---* *[INFO] Deleting file: .project* *[INFO] Deleting file: .classpath* *[INFO] Deleting file: .wtpmodules* *[INFO] Deleting file: .checkstyle* *[INFO]* *[INFO] maven-eclipse-plugin:2.9:eclipse (default-cli) @ camel-example-cxf * ** *[INFO]* *[INFO] --- maven-bundle-plugin:2.3.7:cleanVersions (versions) @ camel-example-cx* *f ---* *[INFO]* *[INFO] --- cxf-codegen-plugin:3.0.4:wsdl2java (generate-sources) @ camel-example* *-cxf ---* *[INFO]* *[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ camel-example-c* *xf ---* *[INFO]* *[INFO] maven-eclipse-plugin:2.9:eclipse (default-cli) @ camel-example-cxf * ** *[INFO]* *[INFO] --- maven-eclipse-plugin:2.9:eclipse (default-cli) @ camel-example-cxf --* *-* *[INFO] Using Eclipse Workspace: null* *[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAIN* *ER* *[INFO] excluded: javax.xml.bind:jsr173_api* *[INFO] * *[INFO] BUILD FAILURE* *[INFO] * *[INFO] Total time: 7.546s* *[INFO] Finished at: Thu Apr 02 17:51:00 IST 2015* *[INFO] Final Memory: 30M/375M* *[INFO] * *[ERROR] Failed to execute goal org.apache.maven.plugins:maven-eclipse-plugin:2.9* *:eclipse (default-cli) on project camel-example-cxf: Unable to resolve resource* *location: /camel-eclipse-checkstyle - [Help 1]* *[ERROR]* *[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit* *ch.* *[ERROR] Re-run Maven using the -X switch to enable full debug logging.* *[ERROR]* *[ERROR] For more information about the errors and possible solutions, please rea* *d the following articles:* *[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE * *xception* *Can someone please point me in the right direction ?* *Thanks * * Vivek*
Apache Camel 2.15.1 released
The Camel community announces the immediate availability of the new patch release Camel 2.15.1. This release contains a total of 55 fixes applied in the few weeks by the community on the Camel master branch. The artifacts are published and ready for you to download[1] either from the Apache mirrors or from the Central Maven repository. For more details please take a look at the release notes[2][3]. Many thanks to all who made this release possible. [1]http://camel.apache.org/download.html [2]https://cwiki.apache.org/confluence/display/CAMEL/Camel+2.15.1+Release [3]https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12329441styleName=HtmlprojectId=12311211 On behalf of the Camel PMC, -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem
Re: Apache Camel-Mina2 ExchangePattern
Current Camel-Mina2 producer just wait for the response when the endpoint sync option is true, it doesn’t support to set the reply mode dynamically. BTW, can you tell if Message exchange pattern by just looking up the message content? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 2, 2015 at 1:03:58 PM, itsavvy.ankur (iamtheone.an...@gmail.com) wrote: I am trying to build a prototype using Apache Camel-Mina2 component. We have our own protocol implementation on TCP and I need to intercept Client - Server messages using a proxy Component. Existing - TCP Client TCP Server New - TCP Client Proxy Server - TCP Server One of the issue in our protocol is that each Request is not guaranteed a reply from the server, so some requests will be sent on the channel with an optional response. However some requests will also get back a response. Protocol Semantics : Hi Hello How Are You -- Are You okay - -Yes As you can see messages with are from client to server and are responses from Server ( on a single stream /line). Now given the above problem, Camel-Mina2 works on a InOut message exchange pattern. The ExchangePattern Enumeration also has an InOptionalOut use case. Any suggestions how I can configure my endpoints? I would like to know if it is possible to make use of an InOptionalOut exchange pattern. So essentially not worry about the response for certain types of messages. Can I handle this programmatically - Read the Message Body and decide if a Request needs a Response or just needs to be written out ? Sample implementation is as below: SimpleRegistry reg = new SimpleRegistry(); reg.put(ProtocolCodec, new ProtocolCodec()); CamelContext context = new DefaultCamelContext(reg); context.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { // TODO Auto-generated method stub from(mina2:tcp://localhost:9888?sync=truecodec=#ProtocolCodecdisconnectOnNoReply=false). to(mina2:tcp://localhost:9889?sync=truecodec=#ProtocolCodecdisconnectOnNoReply=falseclientMode=true); } }); context.start(); -- View this message in context: http://camel.465427.n5.nabble.com/Apache-Camel-Mina2-ExchangePattern-tp5765184.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem Adding ActiveMQ Broker URL to Camel Context Using Java DSL Type Project
Hi, You should call the bind method instead of main.getOrCreateCamelContext() to add the configured the ActiveMQComponent like this. main.bind( activemq, amq.activeMQComponent(tcp://ourbrokerserver.workplace.com:61616)); main.getOrCreateCamelContext() just create a new camel map per call. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On April 1, 2015 at 11:55:49 PM, Wilkerson, Daniel (dwilker...@fullsail.com) wrote: I'm trying to add the correct tcp:// connection url to the camel context in a standalone/Java DSL camel app and am using a boot() method that was pulled from example code on the camel site. In my boot() method I'm trying to add the correct URL to the camel context but it's not getting added. When the code runs its still looking for a broker on localhost instead of the broker server I passed. How do I get the URL to be picked up in the context so my Java DSL route can connect to the correct server? @SuppressWarnings(static-access) public void boot() throws Exception { // create a Main instance main = new Main(); // enable hangup support so you can press ctrl + c to terminate the JVM main.enableHangupSupport(); ActiveMQComponent amq = new ActiveMQComponent(); main.getOrCreateCamelContext().addComponent( activemq, amq.activeMQComponent(tcp://ourbrokerserver.workplace.com:61616)); //ActiveMQComponent amq = new ActiveMQComponent(); // add routes main.addRouteBuilder(new EtlProducerRouteBuilder()); // run until you terminate the JVM System.out.println(Starting Camel. Use ctrl + c to terminate the JVM.\n); main.run(); }
Re: Apache Camel and web services
It looks there are more than one version of CXF in your class patch, can you double check it? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 30, 2015 at 7:16:36 PM, Willian Antunes (willian.lima.antu...@gmail.com) wrote: I am trying to understand how to integrate Apache Camel with any web service that provides a WSDL. I've studied a little about camel-spring-ws and camel-cxf packages. As I can see Spring Web Services Component does not support the use of WSDL but CXF does, however it only supports connections with JAX-WS services hosted in CXF. If I receive a WSDL from a customer, could I use CXF? Or would I need to create a custom component to use his methods? As far as I can see the simplest way to implement it would be creating a Process or a Bean to invokes the remote web service or to configure the CXF before the task. I've tried to implement a producer to set the CXF call to a remove web service . My beans.xml: xmlns=http://www.springframework.org/schema/beans; xmlns:camel=http://camel.apache.org/schema/spring; xmlns:cxf=http://camel.apache.org/schema/cxf; 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://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd; id=osvEndpoint address=http://10.193.1.90:8767/; serviceClass=siemens_hiq8000.SiemensHiq8000PortType/ class=br.com.willianantunes.logger.DownloadLogger / class=br.com.willianantunes.logger.MessageFromQueueLogger / class=br.com.willianantunes.processor.OsvWebServiceProcessor / My route: xmlns=http://www.springframework.org/schema/beans; xmlns:camel=http://camel.apache.org/schema/spring; 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; xmlns=http://camel.apache.org/schema/spring; And my processor: public class OsvWebServiceProcessor implements Processor{ @Override public void process(Exchange exchange) throws Exception { Message inMessage = exchange.getIn(); // The method to be called inMessage.setHeader(CxfConstants.OPERATION_NAME, getVersion); // Parameters to be passed into the web service List params = new ArrayList(); ResultCodeStructHolder resultCodeStructHolder = new ResultCodeStructHolder(); VersionDataHolder versionDataHolder = new VersionDataHolder(); params.add(resultCodeStructHolder); params.add(versionDataHolder); inMessage.setBody(params); }} The method getVersion needs some parameters as followed: public void getVersion(siemens_hiq8000.holders.ResultCodeStructHolder result, siemens_hiq8000.holders.VersionDataHolder versionData) throws java.rmi.RemoteException; How can I pass them? These holders must be filled with the response of the web service. When I run my project I get the following error: [main] INFO org.apache.cxf.service.factory.ReflectionServiceFactoryBean - Creating Service {http://siemens_hiq8000/}SiemensHiq8000PortType from class siemens_hiq8000.SiemensHiq8000PortTypeException in thread main java.lang.NoSuchMethodError: org.apache.cxf.wsdl11.WSDLEndpointFactory.createEndpointInfo(Lorg/apache/cxf/service/model/ServiceInfo;Lorg/apache/cxf/service/model/BindingInfo;Ljava/util/List;)Lorg/apache/cxf/service/model/EndpointInfo; at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:287) at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:144) at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:91) at org.apache.camel.component.cxf.CxfSpringEndpoint.createClient(CxfSpringEndpoint.java:116) at org.apache.camel.component.cxf.CxfProducer.doStart(CxfProducer.java:76) at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:2869) at org.apache.camel.impl.DefaultCamelContext.doAddService(DefaultCamelContext.java:1097) at org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:1058) at org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:405) at org.apache.camel.impl.ProducerCache.acquireProducer(ProducerCache.java:123) at org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:219
Re: Apache Camel and web services
Thanks for the information, it’s time to polish the CXF related example to help user speed up with camel-cxf :) -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 31, 2015 at 8:35:35 PM, Willian Antunes (willian.lima.antu...@gmail.com) wrote: Jiang, this is not the case. I had posted my doubt in Stackoverflow and I updated with the solution. http://stackoverflow.com/questions/29276308/apache-camel-and-web-services There are no examples portraying this situation in the Apache Camel project website. It was difficult a little for a starter! Regards. On Tue, Mar 31, 2015 at 9:10 AM, Willem Jiang wrote: It looks there are more than one version of CXF in your class patch, can you double check it? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 30, 2015 at 7:16:36 PM, Willian Antunes ( willian.lima.antu...@gmail.com) wrote: I am trying to understand how to integrate Apache Camel with any web service that provides a WSDL. I've studied a little about camel-spring-ws and camel-cxf packages. As I can see Spring Web Services Component does not support the use of WSDL but CXF does, however it only supports connections with JAX-WS services hosted in CXF. If I receive a WSDL from a customer, could I use CXF? Or would I need to create a custom component to use his methods? As far as I can see the simplest way to implement it would be creating a Process or a Bean to invokes the remote web service or to configure the CXF before the task. I've tried to implement a producer to set the CXF call to a remove web service . My beans.xml: xmlns=http://www.springframework.org/schema/beans; xmlns:camel=http://camel.apache.org/schema/spring; xmlns:cxf=http://camel.apache.org/schema/cxf; 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://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd; id=osvEndpoint address=http://10.193.1.90:8767/; serviceClass=siemens_hiq8000.SiemensHiq8000PortType/ class=br.com.willianantunes.logger.DownloadLogger / class=br.com.willianantunes.logger.MessageFromQueueLogger / class=br.com.willianantunes.processor.OsvWebServiceProcessor / My route: xmlns=http://www.springframework.org/schema/beans; xmlns:camel=http://camel.apache.org/schema/spring; 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; xmlns=http://camel.apache.org/schema/spring; And my processor: public class OsvWebServiceProcessor implements Processor{ @Override public void process(Exchange exchange) throws Exception { Message inMessage = exchange.getIn(); // The method to be called inMessage.setHeader(CxfConstants.OPERATION_NAME, getVersion); // Parameters to be passed into the web service List params = new ArrayList(); ResultCodeStructHolder resultCodeStructHolder = new ResultCodeStructHolder(); VersionDataHolder versionDataHolder = new VersionDataHolder(); params.add(resultCodeStructHolder); params.add(versionDataHolder); inMessage.setBody(params); }} The method getVersion needs some parameters as followed: public void getVersion(siemens_hiq8000.holders.ResultCodeStructHolder result, siemens_hiq8000.holders.VersionDataHolder versionData) throws java.rmi.RemoteException; How can I pass them? These holders must be filled with the response of the web service. When I run my project I get the following error: [main] INFO org.apache.cxf.service.factory.ReflectionServiceFactoryBean - Creating Service {http://siemens_hiq8000/}SiemensHiq8000PortType from class siemens_hiq8000.SiemensHiq8000PortTypeException in thread main java.lang.NoSuchMethodError: org.apache.cxf.wsdl11.WSDLEndpointFactory.createEndpointInfo(Lorg/apache/cxf/service/model/ServiceInfo;Lorg/apache/cxf/service/model/BindingInfo;Ljava/util/List;)Lorg/apache/cxf/service/model/EndpointInfo; at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:287
Re: Annotations are not working in RouteBuilder
As your camel context is created by yourself, it make sense that the Blueprint annotations don’t work as you expected. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 29, 2015 at 12:03:36 PM, alexey-s (alex...@mail.ru) wrote: Hi Strange error. How to test BlueprintPropertyInjectRoute use @PropertyInject. If you are using OSGi Blueprint, annotations work. Write SimpleRegistry registry = new SimpleRegistry(); registry.put(serviceProperties, properties); CamelContext camelContext = new OsgiDefaultCamelContext(bundleContext, registry); PropertiesComponent pc = camelContext.getComponent(properties, PropertiesComponent.class); pc.setLocation(ref:serviceProperties); camelContext.addRoutes(builder); camelContext.start(); Annotations do not work. Aleksey In the old works. String propVal = CamelContextHelper.parseText(getContext(), {{ + propName + }})); -- View this message in context: http://camel.465427.n5.nabble.com/Annotations-are-not-working-in-RouteBuilder-tp5764966.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Web Service Proxy to track incoming and outcoming messages
I think you can use CXF Interceptors[1][2] to trace the message[3], then you don’t need to build a proxy to interceptor all the message. You can do some addition work base on CXF Logging Interceptor. [1]https://cxf.apache.org/javadoc/latest/org/apache/cxf/interceptor/LoggingInInterceptor.html [2]https://cxf.apache.org/javadoc/latest/org/apache/cxf/interceptor/LoggingOutInterceptor.html [3]http://cxf.apache.org/docs/debugging-and-logging.html#DebuggingandLogging-LoggingMessages -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 26, 2015 at 10:29:09 PM, ercan.canlier (ercan.canl...@gmail.com) wrote: Hi Jiang, Actually, there is a web application where you will have possibility to publish web services. Client will load wsdl file and then i will be generating it via maven with help of camel. This step is clear and i have already finished it but i also want to track incoming and outgoing messages and log them to database. In order to do that, i think the only way is to proxy the real services and define endpoint consumers for them. Do you have any idea? Thanks for your interest. Best regards. Ercan -- View this message in context: http://camel.465427.n5.nabble.com/Web-Service-Proxy-to-track-incoming-and-outcoming-messages-tp5764824p5764837.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Apache Camel decodes HTTP query params and httpclient fails with Invalid query exception
Hi, Did you try to setup the query parameter with the header name of Exchange.HTTP_QUERY? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 26, 2015 at 2:28:41 PM, Liliana.Neagul (liliana.iovanov...@gmail.com) wrote: Hi, I'm trying to send from a camel route an HTTP request using an encoded query parameter (for symbol euro €), and it seems that camel decode the parameter and sent it to httpclient decoded. Httpclient fails then with 'Invalid query' exception. My route is: from(jetty:http://localhost:5443/getCurrency;) .setHeader(Exchange.HTTP_METHOD, constant(GET)) .setHeader(Exchange.HTTP_URI, simple(Constants.PATH+ /code=EURsymbol=%E2%82%ACplaces=2)) .to(http://host;); When Camel constructs the URI object, from Exchange, the query parameter 'symbol' is decoded in '€'. Did someone succeed to pass encoded params? should I set some new headers to camel route? Thanks for your help, Liliana -- View this message in context: http://camel.465427.n5.nabble.com/Apache-Camel-decodes-HTTP-query-params-and-httpclient-fails-with-Invalid-query-exception-tp5764794.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Web Service Proxy to track incoming and outcoming messages
Hi, I guess you just want to create the proxy dynamically, maybe it is based on the request url or content, Am I right? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 26, 2015 at 9:27:57 PM, ercan.canlier (ercan.canl...@gmail.com) wrote: Hi to everybody, First of all, many thanks for such a great framework that you implemented so far. It is extremely powerful and very fast. The documentation is quite in detail. I am implementing a web application for our integration tests. I need to track incoming / outcoming messages to database. For this, i can handle it via routing to bean and then show at my web page. I have already read tutorials about cxf proxy, also read some camel's book but things are not very clear. I implemented one example, seems i am close to the solution but it is not finished yet. From my point of view, if the client sends request to the frontend service which is proxy here, it should be forwarded to backend real service. For instance: When user sends request to http://localhost:8080/real-web-service, it must be forwarded to http://localhost:8081/backend-web-service, isnt proxy working like that? By forwarding the request, i must be able to track the messages. On the other hand, i will publish web services dynamically when the user load wsdl, how can i proxy them as well? Should i use jetty at front and match them according to forwarding properties? But like this, how can i proxy dynamically? I hope you do understand the scenario and might give me some tips. Thanks in advance. Ercan -- View this message in context: http://camel.465427.n5.nabble.com/Web-Service-Proxy-to-track-incoming-and-outcoming-messages-tp5764824.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Setting up CamelContext with Guice
When you call the new InitialContext(); the camel context is started and it already loads the camel route, so it’s useless when setup the camel context after the camel context is started. You can extend the GuiceCamelContext to apply some setting on the CamelContext inside the start method. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 25, 2015 at 2:30:40 AM, Jakub Kotowski (ja...@sindicetech.com) wrote: Hi, how do I setup CamelContext when I use Guice with the guiceyfruit JNDI provider? I followed this guide: http://blog.timmattison.com/archives/2014/10/27/building-apache-camel-applications-with-guice/ Doing for example this: InitialContext context = new InitialContext(); CamelContext camelContext = (CamelContext) context.lookup(CamelContext.class.getName()); camelContext.setTracing(true); // no effect camelContext.addInterceptStrategy(new Tracer()); // no effect either has no effect. What is the proper way to do it? There was a similar question recently: http://camel.465427.n5.nabble.com/Where-to-do-context-setup-stuff-in-a-guice-enabled-camel-app-td5759574.html Thanks, Jakub
Re: IncompatibleClassChangeError
Camel 2.14.x is built with Spring 3.2.x, I think you may need to upgrade the Spring version for it. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 25, 2015 at 6:10:39 AM, jburford (jburf...@solekai.com) wrote: Hello. I have an application which uses Camel 2.14.0, ActiveMQ 5.10.0 and Spring 3.1.2. When the application is shutdown, I get this exception which prevents many of my PreDestroy methods on my beans from getting called: Exception in thread Thread-1 java.lang.IncompatibleClassChangeError at org.apache.camel.util.IOHelper.close(IOHelper.java:326) at org.apache.camel.util.IOHelper.close(IOHelper.java:390) at org.apache.camel.spring.Main.doStop(Main.java:182) at org.apache.camel.support.ServiceSupport.stop(ServiceSupport.java:102) at org.apache.camel.main.MainSupport$HangupInterceptor.run(MainSupport.java:84) I saw this post regarding the issue: http://camel.465427.n5.nabble.com/IncompatibleClassChangeError-td5752456.html#a5752459 I know of no classes of our own that have been compiled against one version yet run against another JAR version (we do the compile and deployment all from the same set of dependencies). Also by the stack trace it seems to indicate the problem is in Camel. When I use Camel 2.12.2, the problem goes away. Is there a known issue in Camel with the version of Spring or ActiveMQ (or any other JAR - I can provide a list) that I am using? Is there a way to get a more descriptive message as to which class is incompatible? Thanks! -- View this message in context: http://camel.465427.n5.nabble.com/IncompatibleClassChangeError-tp5764721.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: blueprint + myBatis + transactions
camel-mybatis component is out of date, if you still want to use it, you may consider to submit a patch for it. We are always welcome the contribution. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 24, 2015 at 8:53:49 AM, alapaka (alap...@rocketmail.com) wrote: Has anyone successfully used the mybatis component in a transaction? -- View this message in context: http://camel.465427.n5.nabble.com/blueprint-myBatis-transactions-tp5764629p5764668.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Authorization with Camel REST DSL?
How about implementing the AuthorizationPolicy instead of RoutePolicy? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 21, 2015 at 10:33:15 PM, Ed Welch (e...@edjusted.com) wrote: I hadn't really seen this covered anywhere, so I was curious how people are handling this? I'm using camel's REST dsl within the java dsl, running in Karaf. Java EE and Spring both have concepts of annotation based authorization to specific endpoints, and it seemed like it would be nice to incorporate this into the REST dsl. Having found nothing off the shelf, I attempted to solve this myself by implementing my own RoutePolicy. In the onExchangeBegin method I look for the Authorization header on the camel Mesage, if it exists, I jump through some hoops with LoginContext to validate the user/password and also the Role. If something is wrong, I set an exception on the exchange In practice it works like this: in the configure() block I setup a couple route policies, one for admins, one for viewers (these map to JAAS roles, karaf is the realm) RoleAuthPolicy admin = new RoleAuthPolicy(karaf, admin); RoleAuthPolicy viewer = new RoleAuthPolicy(karaf, viewer); And then in use, you append the routePolicy in the builder: rest(servers) .get().produces(application/json).route().routeId(get-servers).routePolicy(viewer).to(bean:serverManager?method=getServers()).endRest() .get(/{id}).produces(application/json).route().routeId(get-server).routePolicy(viewer).to(bean:serverManager?method=getServer(${headers.id})).endRest() .post().route().routeId(post-server).routePolicy(admin).to(bean:serverManager?method=postServer(${body})).endRest(); Pros of this method: you can have very granular authorization it fits nicely with the builder patterns Cons: I created custom exceptions to handle authentication, and authorization errors and those have to be defined on the route so the user is prompted with what to do: onException(UnauthenticatedException.class) .handled(true) .log(LoggingLevel.WARN, log, ${exception.message}) .process(exchange - { exchange.getIn().setHeader(WWW-Authenticate, Basic); exchange.getIn().setBody(Unauthenticated); exchange.getIn().setHeader(Exchange.CONTENT_TYPE, text/plain); exchange.getIn().setHeader(Exchange.HTTP_RESPONSE_CODE, HttpServletResponse.SC_UNAUTHORIZED); }); onException(UnauthorizedException.class) .handled(true) .log(LoggingLevel.WARN, log, ${exception.message}) .process(exchange - { exchange.getIn().setBody(Unauthorized); exchange.getIn().setHeader(Exchange.CONTENT_TYPE, text/plain); exchange.getIn().setHeader(Exchange.HTTP_RESPONSE_CODE, HttpServletResponse.SC_FORBIDDEN); }); If someone forgets to do this, you get no authentication or authorization I also didn't love working inside the onExchangeBegin method, because exceptions thrown in there are swallowed with a warning message. So any kind of implementation mistake or unexpected situation that throws an exception in the onExchangeBegin method leads too open access!!! to defend against this I wrap the entire thing in a try catch Exception and then set this exception on the exchange. So i'm curious, how are other people solving this problem? Thanks, Ed
Re: How to set decrypted db password for camel quartz component
It should be easy to use EncryptableProperties[1] to decrypt the password and you can setup the properties instance to QuartzComponent directly. [1]http://www.jasypt.org/encrypting-configuration.html -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 23, 2015 at 3:07:36 PM, richardgroote (richard.gro...@gmail.com) wrote: Hello, I'am not sure if this is possible on the QuartzComponent by default. But you could override the quartzcomponent it self and override the method createSchedulerFactory. Kind regards, Richard -- View this message in context: http://camel.465427.n5.nabble.com/How-to-set-decrypted-db-password-for-camel-quartz-component-tp5764559p5764628.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: blueprint + myBatis + transactions
I don’t think camel-mybatis supports Mybatis-spring 1.2.2 as it uses mybatis 3.2.8 which uses the org.apache.iabtis package. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 23, 2015 at 3:21:58 PM, alapaka (alap...@rocketmail.com) wrote: Hi all; I am using ServiceMix 5.1.1 with its default Camel version 2.13.2; Mybatis-spring 1.2.2 I am trying to implement transactional DB access using MyBatis and blueprint. I have followed the directions in the camel documentation (http://camel.apache.org/mybatis.html). I'm stuck with the following error: java.lang.Exception: Unable to convert value org.mybatis.spring.SqlSessionFactoryBean to type org.apache.ibatis.session.SqlSessionFactory I realize that the documentation is using Spring as configuration - has anyone gotten this to work in Blueprint? -- View this message in context: http://camel.465427.n5.nabble.com/blueprint-myBatis-transactions-tp5764629.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: StackOverflowException for route (using cxf component) sending to soap endpoint
Are you sending 1000 requests per file? Maybe you can consider to disable the error handler processing if there are too much errors are thrown. Camel cannot get the stack size, but it should be able to get the inflight exchange size from the management consoler, but I don’t think it helps you to resolve the issue. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 23, 2015 at 5:44:33 PM, dermoritz (tantea...@hotmail.com) wrote: Thanks for the hints, you are right here are the cxf part/ to-part of route: rtdmProcess.to(rtdmEndpoint).to(tpLoggerToRtdm).process(handleRtdmAnswer).to(tpLoggerFromRtdm) rtdmEndpoint is cxf it is created this way: CxfEndpoint endpoint = new CxfEndpoint(rtdmUrl, new CxfComponent(context)); endpoint.setServiceClass(EventPortType.class); My guess is that the cause of stackoverflow could be, that on the one hand we take zipped/jsoned file with 1000 object in each and send this to soap, and on the other hand for some reason (problem on soap server side) we get an Fault for every message. This combination - 1000 in a row and Fault (handled by custom error handler) fills up the stack. -Xss256 could be a solution. But i want to be sure or at least need some evidence that stack size correlates to our file size/ messages per file and the faults (we never saw this problem even with much bigger files) Are there any hints you can give on how to monitor (probably with some jmx metrics camel/cxf/errorhandlers offers) stack size or work load? -- View this message in context: http://camel.465427.n5.nabble.com/StackOverflowException-for-route-using-cxf-component-sending-to-soap-endpoint-tp5764460p5764630.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Http Component Post Parameters
Hi, When you use the content-type of application/x-www-form-urlencoded”, you are supposed to send the parameters in message body instead of using URL options. You can find more information here[1] Please put paramters into the message body by using setBody DSL setBody(serviceType=getNextIDFromDBserviceID=1dataElementID=814dataSourceID=50”) [1]http://stackoverflow.com/questions/14551194/how-are-parameters-sent-in-an-http-post-request -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 20, 2015 at 6:56:38 AM, Alden, John (john.al...@libertymutual.com) wrote: Hi all, I'm having some trouble making a REST service call with POST parameters. I saw a similar post but I didn't understand the solution and I need some more direction. http://camel.465427.n5.nabble.com/Http-Component-Sending-Post-Parameters-td5740321.html#a5740409 The following is my route configuration. from(timer://runOnce?repeatCount=1) .onException(Exception.class) .handled(true) .process(new GenericExceptionProcessor()) .end() .setHeader(Exchange.HTTP_METHOD, simple(POST)) .setHeader(Exchange.CONTENT_TYPE, simple(application/x-www-form-urlencoded)) .to(https://dev-sdsservices-was8/IMSDSWebService/servlet/SDSClientRequestServlet; + ?proxyHost=VDDP03C-EDB4ED9proxyPort=httpClient.authenticationPreemptive=true + authMethod=BasicauthUsername=authPassword=) + serviceType=getNextIDFromDBserviceID=1dataElementID=814dataSourceID=50 .to(file:{{sf.archive.dir}}?fileName=sds-response.xml) .end(); The request is made using the POST method -- verified with Fiddler. However, the parameters are being sent as a query string on the URL. I am successfully calling the service, however, an error is returned because the service requires POST parameters. I would appreciate any help with POSTing the parameters (serviceType=getNextIDFromDBserviceID=1dataElementID=814dataSourceID=50) to the service.
Re: StackOverflowException for route (using cxf component) sending to soap endpoint
How did you use the camel-cxf endpoint? I didn’t see any route about it. From the stack trace I can tell CXF wants to create a new HttpClient for sending the message and then the StackOverflowException is thrown. I just did quick search about this kind of StackOverflowException, I got these[1][2]. In a world can you try to add “-Xss256k” option when you start the JVM which runs camel application? [1]http://www.onkarjoshi.com/blog/209/using-xss-to-adjust-java-default-thread-stack-size-to-save-memory-and-prevent-stackoverflowerror/ [2]https://issues.apache.org/jira/browse/CASSANDRA-4275 -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 20, 2015 at 12:48:56 AM, dermoritz (tantea...@hotmail.com) wrote: Today we got an StackoverflowException for an route that worked some month in production. The route does (pseudo code): from(file).unmarshal().gzip().unmarshal().split().tokenize(\r\n|\n|\r).unmarshal().json() .process(rtdmProcessor) .process(rtdmSetNameFactory.get(rtdmTargetEvents)).id(RTDM_EVENT_PROCESSOR_PREFIX+rtdmTargetEvents) We send buffered objects (gz, json) from hard drive to a soap endpoint (commercial software). Before the exception occurs we get many (some thousand, 2,3 per second) Faults from Soap but we ignore them (custom ErrorHandler and only log them) Please see here for those errors (first few lines) and exception: https://gist.github.com/dermoritz/209e7158e41e02849843 The only hints to our code are: [bufferToRtdm file:] [process18 ] [com.example.cep.beans.GenerateInputForRtdm@2d16aa9e ] [ 0] [bufferToRtdm file:] [process19 ] [com.example.cep.beans.RtdmSetEventName@662ec6a8 Those processors were not touched for some month. The first creates an xml object (bases on generated code from wsdl) the 2nd only sets one attribute in this xml. My idea is that this exception somehow is related to the many many Faults handled before?! Since there is no reals hint to lines in our code i hope someone of you can help. thanks in advance -- View this message in context: http://camel.465427.n5.nabble.com/StackOverflowException-for-route-using-cxf-component-sending-to-soap-endpoint-tp5764460.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel Hazelcast Component creating multiple instances of Hazelcast
Hi, Camel Hazelcast endpoint supports to set the Hazelcast instance with the option of hazelcastInstance=#INSTANCE_NAME. You may need to write a hazelcastInstance service for it if you want to share some hazelcastInstance across the JVM. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 17, 2015 at 11:27:07 PM, Ayache Khettar (ayache.khet...@googlemail.com) wrote: Hi I have started using Camel Hazelcast for distributed caching but realised that all the bundles using the Camel hazelcast component create a new instance of Hazelcast. So 11bundles will result in 11 members joined in in one single JVM and the list is growing. Is this a healthy thing - see below hazelcast log? Hazelcast documentation doesn't explicitly says how many members you should have per JVM. I am inclined to think it should be limited to small number or even to one member per JVM. Camel Hazelcast component does not have support for joining an already running instance of Hazelcast, I think it should. Any ideas how best to set up hazelcast/camel in one single JVM would be very much appreciated. Ayache Members [11] { Member [xxx.168.xxx.221]:5701 Member [xxx.168.xxx.221]:5702 Member [xxx.168.xxx.221]:5703 Member [xxx.168.xxx.221]:5705 Member [xxx.168.xxx.221]:5706 Member [xxx.168.xxx.221]:5707 Member [xxx.168.xxx.221]:5708 this Member [xxx.168.xxx.221]:5709 Member [xxx.168.xxx.221]:5710 Member [xxx.168.xxx.221]:5704 Member [xxx.168.xxx.221]:5711 }
Re: DynamicRouter Question...
I just want to ask how did you create the Eclipse project? Please take a look at the maven dependency tree if you use maven the manage the dependencies. Can you check if you put the camel-jaxb dependency into the pom? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 18, 2015 at 5:29:51 AM, Affenhauer (joseph.bolav...@solers.com) wrote: Hey, all - Disclaimer: I'm brand-spanking-new to Camel, so any questions I have can be assumed to be based in utter cluelessness. I'm learning, though... So, I have a scenario here where I'm using the Camel CXF component (with jetty) to provide a SOAP endpoint; we get the CxfPayload and do some processing on the data from the exchange. One of the things that can happen is that we'll need to construct a call to another Webservice from the data we get (never seen it before, may never see it again). I'm developing all this using Eclipse; if I run my piece *in Eclipse* it works like a champ: correct call to the correct service with good data back, otherwise it fails spectacularly if something goes wrong with the call (still working on that part). Now - the weird part is when I deploy it (Maven Shade plugin to capture all the dependencies), it just stops dead at the DynamicRouter. No error, no Exception -- no nothing. Logs show a good URI and SOAP message, just like I see in Eclipse. Any assistance would be *huge*... Thanks... -- View this message in context: http://camel.465427.n5.nabble.com/DynamicRouter-Question-tp5764302.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Why camel put the post request's form body into request header?
When the content-type is application/x-www-form-urlencoded, it means the POST message body is form, so camel try to parser the message body into a value set and put them into a message header. Can you check why the post body is huge? If you are using camel-jetty and camel-netty4-http to build a proxy, you need to setup the bridgeEndpoint option to be true. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 18, 2015 at 10:13:00 AM, Yuffie (yuffie.pa...@gmail.com) wrote: Hey, I'm a newbie in camel. When I use camel-jetty and camel-netty4-http, I find the component will put the body into header when the content-type is application/x-www-form-urlencoded. It cause the OutOfBoundException when the post body is huge. Is this an issue? Or there is any reason that camel must put post body into header? Thank you for help! -- View this message in context: http://camel.465427.n5.nabble.com/Why-camel-put-the-post-request-s-form-body-into-request-header-tp5764312.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel exec component tokenizer in Spring XML DSL removing plus sign in arguments
Camel just replace the “+” with “ “ by default. You can use the RAW() to wrap the args parameter just like this. exec:test?args=RAW(arg1+arg2 arg3) -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 17, 2015 at 11:06:05 PM, Davis, Daniel (davi...@si.edu) wrote: I have been unable to find an encoding or approach to include the ImageMagick argument +profile in the argument list for exec in Spring XML DSL as show below. With each experiment Trace clearly shows that the + sign in the arguments being stripped out. I tried plaintext, HTML and decimal encoding plus some dynamic character substitutions. I assume the tokenizer and/or the encoder for the arguments is eating the +. Other than the problem argument this exec is working fine. Does anyone know a good approach, a workaround or an error I made in Spring DSL before I move to the Java DSL for this one? exec:convert?args=${header.CamelFileNameProduced} -thumbnail 200x150 -colorspace RGB +profile * ${header.CamelFileNameProduced}.jpg -- Daniel Davis
Re: Slow FTP
Can you try to setup the FtpClient with a big buffer just like this ? from(ftp://foo@myserver?password=secretftpClient.bufferSize=1000;).to(bean:foo); -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 16, 2015 at 9:08:44 PM, ulsa (ulrik.sandb...@jayway.com) wrote: One of the files on my FTP server is ~200MB. I'm using Camel FTP from an EC2 instance (Ubuntu 14), and I get a connection reset error on that file after 25 minutes. However, when using command line ftp on the same machine, the same file takes 38 seconds to download. I have set option localWorkDirectory=/var/tmp/camel. Is there any other configuration trick that I have missed? -- View this message in context: http://camel.465427.n5.nabble.com/Slow-FTP-tp5764223.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Concurrent Consumers creating duplicates
The route looks good to me. Can you double check the JMS acknowledge setting of JMS connection? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 16, 2015 at 5:56:36 PM, kishore (kishoredevarase...@gmail.com) wrote: Here is the WMQRouter. The Ack queue is for a different purpose. we have to change the message adding some more data and send the Ack back. /public class WMQRouter extends RouteBuilder { public static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(WMQRouter.class); public String incomingQueue; public String outgoingQueue; public String backupFolder; public String ackQueue; public String getIncomingQueue() { return incomingQueue; } public void setIncomingQueue(String incomingQueue) { this.incomingQueue = incomingQueue; } public String getOutgoingQueue() { return outgoingQueue; } public void setOutgoingQueue(String outgoingQueue) { this.outgoingQueue = outgoingQueue; } public String getBackupFolder() { return backupFolder; } public void setBackupFolder(String backupFolder) { this.backupFolder = backupFolder; } public String getAckQueue() { return ackQueue; } public void setAckQueue(String ackQueue) { this.ackQueue = ackQueue; } /** * The configure method is invoked by the Camel to process the message * exchanges from the incoming queue and place the processed transaction xml * to corresponding queues This method also processes the on Exception * scenario wherein invoking the Error Handler and places the failure * message to the Failure Queue */ @Override public void configure() throws Exception { String incomingQueue = websphere:queue: + getIncomingQueue(); String outgoingQueue = websphere:queue: + getOutgoingQueue(); String failureQueue = websphere:queue: + getAckQueue(); String backupFolder = file: + getBackupFolder(); FixParseValidator.init(); FixProcessor fixProcessor = new FixProcessor(); FIXAckProcessor fixAckProcessor = new FIXAckProcessor(); FIXErrorHandler fixErrorHandler = new FIXErrorHandler(); fixAckProcessor.setFixProcessor(fixProcessor); fixErrorHandler.setFixProcessor(fixProcessor); onException(Exception.class).process(fixErrorHandler); onCompletion().process(fixAckProcessor).to(failureQueue); from(incomingQueue).to(backupFolder).process(fixProcessor) .to(outgoingQueue); } } / -- View this message in context: http://camel.465427.n5.nabble.com/Concurrent-Consumers-creating-duplicates-tp5764158p5764209.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Names of custom MBeans contain hex-number at the end
The hex-number is the instanceId to avoid the name conflict. If you want to get ride of it, you need to make sure the service is a StaticService which means you have only one instance per Camel Context. You can find the below code in the DefaultManagementNamingStrategy. public ObjectName getObjectNameForService(CamelContext context, Service service) throws MalformedObjectNameException { StringBuilder buffer = new StringBuilder(); buffer.append(domainName).append(:); buffer.append(KEY_CONTEXT + =).append(getContextId(context)).append(,); buffer.append(KEY_TYPE + = + TYPE_SERVICE + ,); buffer.append(KEY_NAME + =).append(service.getClass().getSimpleName()); if (!(service instanceof StaticService)) { buffer.append(().append(ObjectHelper.getIdentityHashCode(service)).append()); } return createObjectName(buffer); } -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 17, 2015 at 12:31:06 AM, dermoritz (tantea...@hotmail.com) wrote: I created some custom MBeans (implementing Service). they work as they should but for some reason their names have some hexadecimal number at the end e.g. JmxController (0x32e652b6). Is there a way to get rid of this number? What does this number mean - only my custom Services have such a number? -- View this message in context: http://camel.465427.n5.nabble.com/Names-of-custom-MBeans-contain-hex-number-at-the-end-tp5764226.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Quartz Component quartz.properties in Karaf
I think you can put the quartz.properties file into your application bundle or karaf etc directory. You can specify quartz.properties file with relative path or absolute path (if you like) by calling QuartzComponent.setPropertiesFile() method just like this context.getComponent(quartz, QuartzComponent.class).setPropertiesFile(org/apache/camel/routepolicy/quartz/myquartz.properties); -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 13, 2015 at 11:05:58 PM, Thomas Weinschenk (thomas.weinsch...@infoserve.endress.com) wrote: Hi all, I am trying to configure the quartz scheduler of the Quartz Component via the quarzt.properties in Karaf, but I have no glue where to put the file in Karaf? Regards, Thomas -- View this message in context: http://camel.465427.n5.nabble.com/Quartz-Component-quartz-properties-in-Karaf-tp5764099.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Concurrent Consumers creating duplicates
I didn’t find the Route definition of wmqRoute, you may need to show us the code of com.broadridge.adapters.fixadapter.router.WMQRouter. BWT, why do your route need to specify the “ackQueue”? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 16, 2015 at 2:01:59 PM, kishore (kishoredevarase...@gmail.com) wrote: Here is my camel-context.xml file xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:context=http://www.springframework.org/schema/context; xmlns:camel=http://camel.apache.org/schema/spring; xsi:schemaLocation= http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd 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; class=com.broadridge.adapters.fixadapter.router.WMQRouter class=org.springframework.beans.factory.config.PropertyPlaceholderConfigurer class=com.ibm.mq.jms.MQConnectionFactory class=org.apache.camel.component.jms.JmsConfiguration -- View this message in context: http://camel.465427.n5.nabble.com/Concurrent-Consumers-creating-duplicates-tp5764158p5764201.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-catalog 2.15.0 and karaf 2.4.1
It sounds good for me. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 14, 2015 at 2:50:35 PM, Claus Ibsen (claus.ib...@gmail.com) wrote: On Fri, Mar 13, 2015 at 11:06 AM, Willem Jiang wrote: +1 for releasing Camel 2.15.1 in a month. A month in IMHO too long time. All the Karaf users wont be able to use Camel easily out of the box without hitting this issue. IMHO we gather more feedback next week, and then the following week cut a new release. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 13, 2015 at 6:03:19 PM, Claus Ibsen (claus.ib...@gmail.com) wrote: Hi I think we should for a couple of weeks gather other issues reported with the new 2.15.0 release, and then cut a 2.15.1 release so the Karaf people easily can install and use Camel without having to download the patched JAR etc. On Fri, Mar 13, 2015 at 10:41 AM, Willem Jiang wrote: Hi, You can check out the camel-2.15.0 source[1] and build the camel-catalog code yourself to fix the issue with below commands: cd platforms/catalog mvn clean install -Dtest=false I also put the fixed camel-catalog.jar here[2] in case you don’t want run the build. You need to replace your local maven repo camel-catalog.jar with this one. [1]https://github.com/apache/camel.git [2]https://www.dropbox.com/s/jzvy36i0dnurvbt/camel-catalog-2.15.0.jar?dl=0 -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 12, 2015 at 11:28:47 PM, sykomaniac (ashleysyke...@gmail.com) wrote: Hi, Thanks for the response - Only thing is that when I try installing anything I get this message e.g. feature:install camel-ftp/2.15.0 Results in the same error. -- View this message in context: http://camel.465427.n5.nabble.com/camel-catalog-2-15-0-and-karaf-2-4-1-tp5764038p5764049.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/ -- 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: Concurrent Consumers creating duplicates
You may need to check the acknowledge module setting of your JMS connection. BTW, can you show us the JMS endpoint setting that you have? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 15, 2015 at 3:09:28 PM, kishore (kishoredevarase...@gmail.com) wrote: If I set the concurrentConsumers to 1 ,all the input messages are processed fine and there are no duplicates. If I set concurrentConsumers to 5, some messages are lost and some messages are duplicated. Can someone please suggest a solution. -- View this message in context: http://camel.465427.n5.nabble.com/Concurrent-Consumers-creating-duplicates-tp5764158p5764168.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel stop routes and start
Camel Context holds the reference of components, languages, data formats. You cannot share the direct:endpoint across the camel context. I don’t think it’s not a good choice to create 100 camel contexts in a single JVM. Can you try to create a new route instead restart the one route? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 11, 2015 at 11:24:34 PM, majid (mohamed.elgabbo...@peerius.com) wrote: I finally stopping the whole camel context. I am wondering how costly is the operation of creation many camel contexts (one per customer) ? I will have around 100 camel context in my JVM, is it expensive ? or should I use only one ? -- View this message in context: http://camel.465427.n5.nabble.com/Camel-stop-routes-and-start-tp5763950p5764011.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-catalog 2.15.0 and karaf 2.4.1
+1 for releasing Camel 2.15.1 in a month. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 13, 2015 at 6:03:19 PM, Claus Ibsen (claus.ib...@gmail.com) wrote: Hi I think we should for a couple of weeks gather other issues reported with the new 2.15.0 release, and then cut a 2.15.1 release so the Karaf people easily can install and use Camel without having to download the patched JAR etc. On Fri, Mar 13, 2015 at 10:41 AM, Willem Jiang wrote: Hi, You can check out the camel-2.15.0 source[1] and build the camel-catalog code yourself to fix the issue with below commands: cd platforms/catalog mvn clean install -Dtest=false I also put the fixed camel-catalog.jar here[2] in case you don’t want run the build. You need to replace your local maven repo camel-catalog.jar with this one. [1]https://github.com/apache/camel.git [2]https://www.dropbox.com/s/jzvy36i0dnurvbt/camel-catalog-2.15.0.jar?dl=0 -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 12, 2015 at 11:28:47 PM, sykomaniac (ashleysyke...@gmail.com) wrote: Hi, Thanks for the response - Only thing is that when I try installing anything I get this message e.g. feature:install camel-ftp/2.15.0 Results in the same error. -- View this message in context: http://camel.465427.n5.nabble.com/camel-catalog-2-15-0-and-karaf-2-4-1-tp5764038p5764049.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: camel-catalog 2.15.0 and karaf 2.4.1
Hi, You can check out the camel-2.15.0 source[1] and build the camel-catalog code yourself to fix the issue with below commands: cd platforms/catalog mvn clean install -Dtest=false I also put the fixed camel-catalog.jar here[2] in case you don’t want run the build. You need to replace your local maven repo camel-catalog.jar with this one. [1]https://github.com/apache/camel.git [2]https://www.dropbox.com/s/jzvy36i0dnurvbt/camel-catalog-2.15.0.jar?dl=0 -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 12, 2015 at 11:28:47 PM, sykomaniac (ashleysyke...@gmail.com) wrote: Hi, Thanks for the response - Only thing is that when I try installing anything I get this message e.g. feature:install camel-ftp/2.15.0 Results in the same error. -- View this message in context: http://camel.465427.n5.nabble.com/camel-catalog-2-15-0-and-karaf-2-4-1-tp5764038p5764049.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: LoggingOutInterceptor only info mode, the smartest way ?
If you take a look at the LoggingOutInterceptor[1] and LoggingInInterceptor[2] you can it is hardcoded. So you may need to write your own logging interceptor or it. [1]https://github.com/apache/cxf/blob/master/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java [2]https://github.com/apache/cxf/blob/master/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 11, 2015 at 8:17:27 PM, Frankiboy (mail.to.fra...@gmail.com) wrote: I have a camel.xml where i log the request - response, i using cxf. Works fine :-) But what is the smartes way, if i only want to show when im in info mode. Can i handle this in my camel.xml, how to do this smartest ? in my programs im using org.apache.commons.logging. I have a log4j.properties, log4j.rootLogger=info, console, can i change that on the fly ? wsdlURL=WEB-INF/bankconnect.wsdl -- View this message in context: http://camel.465427.n5.nabble.com/LoggingOutInterceptor-only-info-mode-the-smartest-way-tp5764009.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Are transactions useful in these use-cases?
There are too many resources need to be managed, I’m not sure if it is worth to put all the options into one transactions. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 10, 2015 at 5:04:14 PM, James Green (james.mk.gr...@gmail.com) wrote: We have a number of routes: from(HTTP POST).to(JMS) from(JMS).to(SOAP Endpoint).to(JMS) from(JMS).to(MongoDB) from(MongoDB).to(JMS) Hugely simplified and these are across various JAR services. Are transactions actually useful in the above? Actually understanding the behaviour of code routes is one challenge, understanding with transactional management adds some cognitive overhead which may not be necessary. I'm unsure given the use-cases we have whether it is usual to drop them in favour of client-acking of JMS messages for instance. Thanks, James
Re: camel-snmp TrapReceiveTest fails
I can reproduce the error and just created a JIRA[1] for it. [1]https://issues.apache.org/jira/browse/CAMEL-8479 -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 10, 2015 at 5:31:03 PM, gmanev (gma...@jjinterna.com) wrote: Hello The TrapReceiveTest test case from camel-snmp component passes with 2.14.1 and fails with 2.15-SNAPSHOT. Are there any additional requirements using the trap receiver? I am sending the stack trace below. org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: snmp://127.0.0.1:1662?protocol=udptype=TRAP due to: There are 15 parameters that couldn't be set on the endpoint consumer. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown consumer parameters=[{sendEmptyMessageWhenIdle=false, scheduler=null, greedy=false, initialDelay=1000, startScheduler=true, pollStrategy=org.apache.camel.impl.DefaultPollingConsumerPollStrategy@692ccbba, backoffErrorThreshold=0, timeUnit=MILLISECONDS, scheduledExecutorService=null, schedulerProperties=null, useFixedDelay=true, delay=6, backoffMultiplier=0, runLoggingLevel=TRACE, backoffIdleThreshold=0}] at org.apache.camel.impl.DefaultEndpoint.configureConsumer(DefaultEndpoint.java:439) at org.apache.camel.component.snmp.SnmpEndpoint.createConsumer(SnmpEndpoint.java:100) at org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:65) at org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:85) at org.apache.camel.impl.RouteService.warmUp(RouteService.java:158) at org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:3090) at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3020) at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:2797) at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:2653) at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:167) at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2467) at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2463) at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2486) at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2463) at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2432) at org.apache.camel.test.junit4.CamelTestSupport.startCamelContext(CamelTestSupport.java:477) at org.apache.camel.test.junit4.CamelTestSupport.doSetUp(CamelTestSupport.java:311) at org.apache.camel.test.junit4.CamelTestSupport.setUp(CamelTestSupport.java:217) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203
Apache Camel 2.15.0 released
The Camel community announces the immediate availability of the new major release Camel 2.15.0. This release contains a total of 500+ fixes applied in the past 6 months by the community on the Camel master branch. The artifacts are published and ready for you to download[1] either from the Apache mirrors or from the Central Maven repository. For more details please take a look at the release notes[2][3]. Many thanks to all who made this release possible. [1]http://camel.apache.org/download.html [2]https://cwiki.apache.org/confluence/display/CAMEL/Camel+2.15.0+Release [3]https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12327940styleName=projectId=12311211 On behalf of the Camel PMC, -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem
Apache Camel 2.14.2 released
The Camel community announces the immediate availability of the new patch release Camel 2.14.2. This release contains a total of 101 fixes applied in the past 3 months by the community on the Camel master branch. The artifacts are published and ready for you to download[1] either from the Apache mirrors or from the Central Maven repository. For more details please take a look at the release notes[2][3]. Many thanks to all who made this release possible. [1]http://camel.apache.org/download.html [2]https://cwiki.apache.org/confluence/display/CAMEL/Camel+2.14.2+Release [3]https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12329070styleName=HtmlprojectId=12311211 On behalf of the Camel PMC, -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem
Apache Camel 2.13.4 released
The Camel community announces the immediate availability of the new patch release Camel 2.13.4. This release contains a total of 81 fixes applied in the past 3 months by the community on the Camel master branch. The artifacts are published and ready for you to download[1] either from the Apache mirrors or from the Central Maven repository. For more details please take a look at the release notes[2][3]. Many thanks to all who made this release possible. [1]http://camel.apache.org/download.html [2]https://cwiki.apache.org/confluence/display/CAMEL/Camel+2.13.4+Release [3] https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12328899styleName=projectId=12311211 On behalf of the Camel PMC, -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem
Re: How to setHeader reponse code ?
Hi, You can setup the response from the SOAPFault setStatusCode method. Just like this: SoapFault sf = new SoapFault(Central svarer ikke hos + central, SoapFault.FAULT_CODE_SERVER); sf.setStatusCode(504); -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 9, 2015 at 5:59:56 PM, Frankiboy (mail.to.fra...@gmail.com) wrote: When my endpoint is down, i want to create a soap fault, and set the reponse code to 504. What you cant see, is that on the endpoint have a: ?throwExceptionOnFailure=false My Route: from(direct:channel2).onException(Exception.class).handled(true). process(new LogError(HubConstants.CHANNEL2.getValue())).end() .recipientList() .method(Util.class, getEndpoint); When the endpoint is down, i come into my exception.class, where i have this code: exchange.removeProperty(Exchange.EXCEPTION_CAUGHT); exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE, 504); exchange.getOut().setFault(true); SoapFault sf = new SoapFault(Central svarer ikke hos + central, SoapFault.FAULT_CODE_SERVER); The client get the soap fault , but the reponse code is 500, and NOT 504... Can anyone tell me whats wrong here ? Frank -- View this message in context: http://camel.465427.n5.nabble.com/How-to-setHeader-reponse-code-tp5763820.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Why GenericFile is a generic type?
Hi, I think the main reason is we have other File related components such Ftp, Sftp extends the GenericFileComponent and has different File type which doesn’t share the same File parent. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 8, 2015 at 11:55:20 PM, Christian Eugster (c.eugs...@docuteam.ch) wrote: Hi, maybe it is a thumb question, but I could not resolive it by myself using google and documentation: Why is GenericFile a generic type? Or, what are the benefits of this? I did not find any explanations about it. Thank you! Christian Christian Eugster Docuteam GmbH Langacker 16 Postfach CH-5405 Baden-Dättwil +41 (0)56 470 03 37 c.eugs...@docuteam.ch
Re: Context level intercept/filter layers
You can do it by implement your custom security policy[1]. Please take a look at the camel-sprint-security[2], you can find some code example such as SpringSecurityAuthorizationPolicy.java[3] [1]http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/Policy.html [2]https://github.com/apache/camel/tree/master/components/camel-spring-security [3]https://github.com/apache/camel/blob/master/components/camel-spring-security/src/main/java/org/apache/camel/component/spring/security/SpringSecurityAuthorizationPolicy.java -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 8, 2015 at 2:52:59 PM, Milli (gowrishankar.mi...@gmail.com) wrote: Hi everyone, In our web application, we are using camel as the central piece to orchestrate/route the webservices, which will be connecting to several other local resources. Can some one suggest, what is the best way to write context level (global / one-time) layers. For example, we want to write a global security layer, which does a basic signature based auth check, which is going to be the first step for any route in the application. We want this logic to be configured at camel context level, so that we don't need to write this in every route we build. Also, in case of multiple such layers ( say security, validation, etc.. ), is it possible to set the order in which they need to be executed. Any sort of examples or reading pointers are very appreciated. Thanks in advance. -Gowri Shankar
Re: Camel Cxf: How can I change the namespace of my incoming message?
Hi, It should should work, I’m not sure if it relates to the PropertyPlaceholderDelegateRegistry that you use. Here is the unit test[1] about it in camel-cxf. [1]https://github.com/apache/camel/blob/master/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfTimeoutTest.java#L76 -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 5, 2015 at 4:41:46 PM, cgiera (christoph.gi...@mic-cust.com) wrote: I think it should work with the cxfEndpointConfigurer-parameter: RouteBuilder configure method: {raw} JndiRegistry registry = (JndiRegistry) ( (PropertyPlaceholderDelegateRegistry)this.getContext().getRegistry()).getRegistry(); MyEndpointConfigurer myConf= new MyEndpointConfigurer (); //and here, it is bound to the registry registry.bind(myConf, myConf); from(cxf:/myService?serviceClass=myServiceClasscxfEndpointConfigurer=#myConf {raw} But I don't get this work because I get the following error when starting the application: Failed to resolve endpoint: cxf:///myService?cxfEndpointConfigurer=%23myConfloggingFeatureEnabled=trueserviceClass=myServiceClass due to: Could not find a suitable setter for property: cxfEndpointConfigurer as there isn't a setter method with same type: java.lang.String nor type conversion possible: No type converter available to convert from type: java.lang.String to the required type: org.apache.camel.component.cxf.CxfEndpointConfigurer with value #myConf How can I configure the cxfEndpointConfigurer parameter in a RouteBuilder? kind regards, Christoph -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Cxf-How-can-I-change-the-namespace-of-my-incoming-message-tp5763634p5763635.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel Cxf: How can I change the namespace of my incoming message?
Can you show me how did you create the camel context and setup the route builder? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 5, 2015 at 7:35:53 PM, cgiera (christoph.gi...@mic-cust.com) wrote: How can I configure this endpoint correctly so that I don't loose any parameter of my normal URI? I've tried this: But then the service is not available. kind regards, Christoph yogu13 wrote I am assuming you are using java dsl.. in that case you create instance as below CxfEndpoint inboundCxf = new CxfEndpoint(); inboundCxf.setAddress(...); inboundCxf.setCamelContext(camelContext); inboundCxf.setDataFormat(DataFormat.RAW); inboundCxf.SetCxfEndpointConfigurer and finally use this instance from(inboundCxf).routeId(routeId).to(...) Hope this helps! Regards, -Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Cxf-How-can-I-change-the-namespace-of-my-incoming-message-tp5763634p5763660.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel Cxf: How can I change the namespace of my incoming message?
You can define instance of CxfEndpointConfigurer the in the camel-context.xml just like this. !-- setup the CxfEndpointConfigurer bean here -- bean id=myConfigurer class=org.apache.camel.component.cxf.CxfTimeoutTest$MyCxfEndpointConfigurer / -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 5, 2015 at 8:12:16 PM, cgiera (christoph.gi...@mic-cust.com) wrote: It's an web application, context is started via a subclass of the ContextLoaderListener. camel-context.xml The masterRoutesBuilder adds all routes to the context. Each route class is a sub class of RouteBuilder. So our routes are configured in the configure method. Additional Information: If I use and I look to the created endpoint the camelContext of it is of type DefaultCamelContext. If I use and I look to the created endpoint the camelContext of it is of type SpringCamelContext. Could this be the problem, and if so how can i solve it? kind regards, Christoph -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Cxf-How-can-I-change-the-namespace-of-my-incoming-message-tp5763634p5763665.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel Cxf: How can I change the namespace of my incoming message?
It looks the camel context you set to CxfEndpoint is not the one that camel-context.xml creates. You may ned to some work on the route builder that you extend. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 5, 2015 at 10:06:55 PM, cgiera (christoph.gi...@mic-cust.com) wrote: Hello, this ist the CxfEndpoint configuration I use in from(endpoint) CxfEndpoint endpoint = new CxfEndpoint(); endpoint.setServiceClass(myServiceClass); endpoint.setAddress(/myService); endpoint.setCxfEndpointConfigurer(new MyEndpointConfigurer()); endpoint.setCamelContext(this.getContext()); I've found something strange: We use a custom ManagementNameStrategy where we use hostname/nodeId as fixed name. When I take a look into the jconsole and the mbeans all other routes appear under myhost/mynode. The route that I have to configure with the seperate CxfEndpoint appers under camel-3. Can this help? kind regards, Christoph yogu13 wrote Hello.. Please let us know the exact parameters being set.. Code from your dsl will help.. Just cipher out sensitiveinformation Regards, -Yogesh On Thursday, March 5, 2015, cgiera [via Camel] ml-node+s465427n5763673h92@.nabble wrote: There I have the same problem that the route is started, but the endpoint is not callable via soapui or smthg. The route is also not shown in our jmx monitoring screen. yogu13 wrote Hello Christoph, Please check the CxfEndpoint API in camel first! I would say you shouldnt be calling .createEndpoint() and instead call the set methods CxfEndpoint instance for eg. setAddress() ,.setCxfEndpointConfigurer() and then pass the enpoint instance to... from(inputEndpoint) Hope this helps! Regards, -Yogesh -- If you reply to this email, your message will be added to the discussion below: http://camel.465427.n5.nabble.com/Camel-Cxf-How-can-I-change-the-namespace-of-my-incoming-message-tp5763634p5763673.html To unsubscribe from Camel Cxf: How can I change the namespace of my incoming message?, click here http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=5763634code=eW9ndTEzQGdtYWlsLmNvbXw1NzYzNjM0fC04ODQzODQxMjM= . NAML http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Cxf-How-can-I-change-the-namespace-of-my-incoming-message-tp5763634p5763676.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Problem with Message Order using Camel, JMS, and CXF
Thanks for sharing this with us, I just updated the camel-cxf wiki page for it. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 5, 2015 at 12:05:43 AM, g8torPaul (paul.mann...@ventyx.abb.com) wrote: All, I fixed the issue. After digging through the CXF code, I found the following property: org.apache.cxf.interceptor.OneWayProcessorInterceptor.USE_ORIGINAL_THREAD I set this property on the CXF endpoint that is consuming from the JMS Queue via Camel Transport. This property does not appear to be well documented, but it ensures that CXF processes the message on the same Camel JMS Consumer thread which is what I want to happen in this case. This also solves the issue of propagating a local transaction across the endpoints since they now exist on the same thread. Hope this helps someone else out there, g8torPaul -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-Message-Order-using-Camel-JMS-and-CXF-tp5763503p5763594.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Exchange timeout Mina2 issues
I think the server just close the connection when there is no further conversion for a long time. It’s hard for the client or server to tell if the connection is still open until write the message to the socket. Can you introduce some ping message to keep the TCP connection alive? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On March 4, 2015 at 12:45:07 AM, sykomaniac (ashleysyke...@gmail.com) wrote: Hi, I'm using Camel to pull a message from a queue and send it to a remote server using MINA2. I've configured the endpoint like so: String endpoint = baseEndpoint.copy() .setQueue(entry.Route + . + entry.Party + .#) .setRoutingKey(entry.Route + . + entry.Party + .#) .setExclusive(true) .build(); //Build outgoing TCP settings minaComp.setCamelContext(getContext()); Mina2Configuration minaCfg = new Mina2Configuration(); minaCfg.setProtocol(tcp); minaCfg.setCodec(new HL7MLLPCodec()); minaCfg.setHost(entry.IP); minaCfg.setPort(entry.Port); minaCfg.setSync(true); minaCfg.setLazySessionCreation(true); from(endpoint) .autoStartup(entry.ConnectionStatus == InterfaceStatus.Up) .routeId(String.format(%s.%s, entry.Party, entry.Description)) .to(minaComp.createEndpoint(minaCfg)) .process(new Processor() { @Override public void process(Exchange exchange) throws Exception { StatusUpdate.Instance.send( entry.IP, String.valueOf(entry.Port), InterfaceStatus.Up); } }); To summarise the above code, the message is picked up off of a RabbitMQ queue, sent to a MINA2 endpoint and then post a status update to a web service queue. The issue is that the code above will send one HL7 message on a clean connection. If I then leave the connection for an indeterminate amount of time e.g. 30 minutes, then attempt to send a further message I get the following error: org.apache.camel.ExchangeTimedOutException: The OUT message was not received within: 3 millis. If I run Wireshark I can see that the message attempted to be sent but no ACK came back. However, when I run a netstat -a on the client I can see one connection open and established. When I run a netstat -a on the server I can see 2 connections. One is established, the second is a FIN_WAIT_2 state. Does anyone know how to fix this? The server has other application connecting and doesn't have this issue. All documentation on FIN_WAIT_2 indicates a buggy client but I can't see what's wrong. Any help would be greatly appreciated. -- View this message in context: http://camel.465427.n5.nabble.com/Exchange-timeout-Mina2-issues-tp5763509.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-blueprint.xsd is not updated
Hi Yogesh, I just checked size of camel-blueprint.xsd of camel blueprint schema[1], it is same with the one of camel-blueprint-2.14.1.xsd. [1]http://camel.apache.org/schema/blueprint/ -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On February 28, 2015 at 2:55:43 PM, yogu13 (yog...@gmail.com) wrote: Hi Willem! Looks like the camel-blueprint.xsd is updated with camel-blueprint-2.13.3.xsd and not with the current stable version 2.14.1 Regards, -Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/camel-blueprint-xsd-is-not-updated-tp5763118p5763240.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Failover with Camel CXF
The camel route that you have just redirect the request to 3 different service endpoints with a distribution ratio. If you wants the client to access other service endpoint if it cannot access the service endpoint, you need to use the failover instead of roundRobin. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On February 26, 2015 at 8:16:59 PM, sayed_india (sayed.abdulis...@gmail.com) wrote: Hi, Thanks for the response. I am able to resolve the compilation issue with below code but unable to test ,when I kill the process with 9000 expecting that 9001-2 should be up and running which is not, please suggest . distributionRatioDelimiter=- / Please let me know how to test ensure that it works. Thanks Sayed -- View this message in context: http://camel.465427.n5.nabble.com/Failover-with-Camel-CXF-tp5723454p5763216.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-blueprint.xsd is not updated
It’s done. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On February 26, 2015 at 7:52:40 AM, Willem Jiang (willem.ji...@gmail.com) wrote: We need to do it manually, I will take care of it today. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On February 24, 2015 at 9:53:43 PM, yogu13 (yog...@gmail.com) wrote: Hi, I see that the camel-blueprint.xsd available @ http://camel.apache.org/schema/blueprint/ is not updated with the blueprint changes for recent released for camel (2.14.1). It was last synched with the version 2.13.0. Any specific reason for this or can i raise a JIRA and provide a patch for the same if it has to be done manually? Regards, -Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/camel-blueprint-xsd-is-not-updated-tp5763118.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Failover with Camel CXF
Hi, You need to specify the LoadBalanceType such as Failover or roundRobin. You can find more information here[1] [1]https://camel.apache.org/load-balancer.html -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On February 25, 2015 at 7:57:00 PM, sayed_india (sayed.abdulis...@gmail.com) wrote: Hi, I followed the instructions provided but unable to implement shows the error: [LoadBalanceType[ref:null... because of ref or loadBalancer must be specified. Please find below code snippet and correct me where I go wrong with this. WSDL -- -- Endpoint config: serviceClass=camelinaction.order.OrderEndpoint wsdlURL=wsdl/order.wsdl serviceClass=camelinaction.order.OrderEndpoint wsdlURL=wsdl/order.wsdl serviceClass=camelinaction.order.OrderEndpoint wsdlURL=wsdl/order.wsdl Camel Route: OK Appreciate a quick response. Thanks and Regards, Sayed -- View this message in context: http://camel.465427.n5.nabble.com/Failover-with-Camel-CXF-tp5723454p5763151.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-blueprint.xsd is not updated
We need to do it manually, I will take care of it today. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On February 24, 2015 at 9:53:43 PM, yogu13 (yog...@gmail.com) wrote: Hi, I see that the camel-blueprint.xsd available @ http://camel.apache.org/schema/blueprint/ is not updated with the blueprint changes for recent released for camel (2.14.1). It was last synched with the version 2.13.0. Any specific reason for this or can i raise a JIRA and provide a patch for the same if it has to be done manually? Regards, -Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/camel-blueprint-xsd-is-not-updated-tp5763118.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: CamelBlueprintTest randomly failing tests
Hi, Does your QA box have the internet access? -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On February 6, 2015 at 6:35:47 PM, Ayache Khettar (ayache.khet...@googlemail.com) wrote: Hi I am seeing random Unit tests failures - see below. These failures are happening randomly on QA box (bit slower than dev machines). Looks like the test hangs waiting for namespace handlers - see below. I am testing camel blueprint using CamelBlueprintTests. Has anyone experienced such issue? Regards, Ayache Blueprint Extender: 1] BlueprintContainerImpl INFO Bundle BlueprintTest is waiting for namespace handlers [http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0] java.lang.RuntimeException: Gave up waiting for service (objectClass=org.apache.camel.CamelContext) at org.apache.camel.test.blueprint.CamelBlueprintHelper.getOsgiService(CamelBlueprintHelper.java:240) at org.apache.camel.test.blueprint.CamelBlueprintHelper.getOsgiService(CamelBlueprintHelper.java:202) at org.apache.camel.test.blueprint.CamelBlueprintTestSupport.createCamelContext(CamelBlueprintTestSupport.java:352) at org.apache.camel.test.junit4.CamelTestSupport.doSetUp(CamelTestSupport.java:247) at org.apache.camel.test.junit4.CamelTestSupport.setUp(CamelTestSupport.java:217) at org.apache.camel.test.blueprint.CamelBlueprintTestSupport.setUp(CamelBlueprintTestSupport.java:183) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Re: camel jetty form data not working
camel jetty is using org.eclipse.jetty.servlets.MultiPartFilter to handle the multi part message, you may need to extend MultiPartFilter for it. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On February 1, 2015 at 3:04:21 PM, vvsh (vvs...@gmail.com) wrote: After several hours of debugging and investigation camel-jetty code, i figure out, that: 1) it does not accept multipart requests from Postman client (different form of boundary, exception: IOException: Missing initial multi part boundary) 2) it does not work over https (only http) 3) it does not work when URI contains some parameters, for example: /upload/item/{categoryId} Works only with URI /upload/item and without https, but it is not acceptable to me due to security. I guess it need to send to camel-jetty developers to fix this issues. -- View this message in context: http://camel.465427.n5.nabble.com/camel-jetty-form-data-not-working-tp5760662p5762281.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: REST DSL - including documents
When you specify the option value which is start with “#”, camel always looks up the instance from the registry with the rest of string. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On February 2, 2015 at 1:58:31 AM, Tim Dudgeon (tdudgeon...@gmail.com) wrote: Taariq Thanks so much! Works nicely. I don't get the hash bit. The only mention in the docs is like this: from(jetty:http://0.0.0.0:9080/myservice?handlers=securityHandler;) which doesn't use a #. What's the # doing? Tim On 01/02/2015 15:47, Taariq Levack wrote: Tim you missed the hash in the context handler, should be #contextHandler I also had to redefine that handler, you'll find the working code in your gist. Taariq On Sat, Jan 31, 2015 at 8:56 PM, Tim Dudgeon wrote: Pinging again on this. I looked over my attempts to add a ContextHandler to Jetty to serve up static content and can't find what's wrong. Here's the gist again: https://gist.github.com/tdudgeon/2f242578fd0742e713a7 The mechanism for adding a ContextHandler does work in standalone Jetty though I can't get it to work in my example. Could it be a difference in the Jetty version (the one used by Camel is quite old). And I did get other handlers (authentication) to work in camel. Thanks Tim -- View this message in context: http://camel.465427.n5.nabble.com/REST-DSL-including-documents-tp5762034p5762283.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Exposing request/response Web Service that would interact with legacy system
Camel Jms[1] provides request/reply implementation, you need to specify the Message Exchange pattern to InOut, and make sure you setup replyTo message header. Using ProducerTemplate[2] in the WS implementation, you can just redirect the request into the JMS queue and handler the response there. [1]https://camel.apache.org/jms [2]http://camel.apache.org/producertemplate.html -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On January 29, 2015 at 9:41:14 PM, saiya-jin001 (martin.franci...@barclays.com) wrote: Hi, as title says, I will have to expose concurrent WS, that would expose request/response behavior to our legacy system. This legacy system has a JMS-like access API, meaning when request is inserted into system, communication ends (ie there is no response to this request other than return code) and asynchronously via Listeners I can receive actual response. This response would need to be paired to original request (still hanging until timeout happens) and sent back as WS response. Since there might be multiple requests at +- same time, there will be a pool of incoming connections waiting to be served (I would expect accessible via Camel API somehow). I hope I described the topic in understandable way, feel free to ask as much as necessary. Can anybody please point me to right direction where to look for solution/proper approach? Thank you -- View this message in context: http://camel.465427.n5.nabble.com/Exposing-request-response-Web-Service-that-would-interact-with-legacy-system-tp5762229.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Periodic queue consumer
I think the polling consumer[1] can meet your needs. Now you may need to implement the polling consumer for your queue. [1]http://camel.apache.org/polling-consumer.html -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On January 31, 2015 at 7:32:08 AM, James Green (james.mk.gr...@gmail.com) wrote: We have a need to route message to a temporary location and to re-submit them every n seconds. We're thinking of sending the message to a queue if a later re-try is needed. A separate process would then be required to read from the queue and re-submit. This is fine but clearly listening on a queue is normally a constant process, so out of the box we'd get the message intended for re-try immediately and send it onwards for re-trying without any delay. It would be nice therefore to wake up a queue consumer after some sleep interval. Lets the background processes run that caused the need for a re-try. Any good way of achieving this? [ We have tried pushing them into a database and periodically pulling them back out into the main process again, but we're hitting ConcurrentModificationExceptions which are proving difficult to understand. ] Thanks, James
Re: camel-ahc issue
It’s not a good idea to send the multiple requests through a single channel, as it could confuse the async handler when it receive the response. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On January 31, 2015 at 7:12:34 AM, Elvio Caruana (ecaruana) (ecaru...@cisco.com) wrote: Hi, I think I may have run into a potential issue with camel-ahc. I've narrowed it down to a very specific scenario - a combination of re-using the same ahc component in combination with using split().parallelProcessing() EIP. Tested with camel 2.14.1 and 2.14.0. I'll try and demonstrate in a simple route: List list = Arrays.asList(alice, bob, charles, david, edward); from(timer://foo?repeatCount=1) .setBody(constant(someMainRouteContent)) .to(direct:fetch) // [1] .setBody(constant(list)) .split(body()).parallelProcessing() // [2] .log(processing ${body}) .to(direct:fetch) // [3] .end() .log(and back to main processing) .end(); from(direct:fetch) .log(making http request for ${body}) .to(ahc:http://localhost:8765/rest/test;) .log(returned from http request for ${body}) .end(); Note: 1. The routes share the same AHC component [1, 3] (i.e. common set of ahc worker threads). 2. The ahc worker thread will continue processing synchronously between [1] and [2],until the point the split() parallel thread pool takes over. On an http response, the ahc worker thread will continue processing synchronouslyas expected. 3. The above will result in a timeout exception for one of the split exchanges (irrespective of the size of the list), and the route never completes. java.util.concurrent.TimeoutException: Request timeout of 6 ms at com.ning.http.client.providers.netty.timeout.TimeoutTimerTask.expire(TimeoutTimerTask.java:43) at com.ning.http.client.providers.netty.timeout.RequestTimeoutTimerTask.run(RequestTimeoutTimerTask.java:41) at org.jboss.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:556) at org.jboss.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:632) at org.jboss.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:369) at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) at java.lang.Thread.run(Thread.java:722) Trace of the above route is attached. Having two separate ahc endpoints (i.e. with separate thread pools), or without parallel processing in the split EIP, then the above works fine. Any thoughts? Kind Regards, Elvio
Re: Spring Camel Quartz cluster configuration
Hi, org.springframework.scheduling.quartz.SchedulerFactoryBean is a FactoryBean, you can get the scheduler instance by calling the getObject() method. you need to put the camel context instance into the schedulerContextAsMap. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On January 18, 2015 at 2:12:09 PM, Paul Dailly (pauldaill...@gmail.com) wrote: Hi there, I have a Spring application which defines Camel routes triggered using camel-quartz2 (v2.14.0). The Quartz Camel routes I have configured successfully trigger when I run a single instance of the app (i.e non-clustered, in-memory quartz scheduler). However, I now want to set this up in a clustered environment, where I can have multiple instances of my application and a single mySQL database to store the scheduled jobs for the Camel routes. I want only a single instance of my app to run when a triggered route fires. I started to follow this example from Camel's GitHub repo in order hook my Camel routes into my clustered Quartz scheduler. However I am confused by 2 parts of the bean declarations given in this example. The first source of confusion is the bean declaration below: class=org.apache.camel.component.quartz2.QuartzComponent The reference above to the scheduler bean is an instance of org.springframework.scheduling.quartz.SchedulerFactoryBean. However the QuartzComponent class's scheduler property is of type org.quartz.Scheduler. Therefore, I receive a ClassCastException when trying to set scheduler property to an instance of org.springframework.scheduling.quartz.SchedulerFactoryBean. My second source of confusion is the declaration of schedulerContextAsMap map shown below: value-ref=camelContext2/ I am using Java configuration rather than XML for my bean declarations. Therefore, should I be setting the value of the CamelQuartzCamelContext-camelContext key to be an autowired instance of my CamelContext? I am new to Camel/Quartz so apologies if my question is difficult to reason about. Please let me know if you need me to provide any further information in order to clarify my issue. Thanks, Paul -- View this message in context: http://camel.465427.n5.nabble.com/Spring-Camel-Quartz-cluster-configuration-tp5761825.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel 2.14.2 version
Camel 2.14.2 will be release at the end of Q1 2015. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On January 20, 2015 at 6:55:41 AM, Kranti Parisa (kranti.par...@gmail.com) wrote: Hi, When is Camel 2.14.2 is due for release? Thanks, KP
Re: question about mod sec parameters
I don’t think this question is related Apache Camel. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On January 16, 2015 at 8:41:35 PM, sterngre (stern...@gmail.com) wrote: Hello I tried to look for parameter descriptions in google but I can`t find anythin relevant. I have following rule SecRule REQUEST_HEADERS:User-Agent @pmFromFile badbots.txt id:350001,rev:1,severity:2,log,msg:'BAD BOT - Detected and Blocked. ' and my questions are : what is ID ? what is rev ? what is severity ? Cheers Greg -- View this message in context: http://camel.465427.n5.nabble.com/question-about-mod-sec-parameters-tp5761792.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: CamelContextLifecycle causes ClassNotFoundException when compiled with java 1.7
Can you check if you build source target is java 1.6? Camel starts to support Java 1.7 since camel-2.14.x. You can find more information here[1] [1]http://camel.apache.org/building.html -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On January 27, 2015 at 6:00:05 PM, yuncil (jonas.stei...@hotmail.de) wrote: Hi, I'm using camel 2.13.0 and WebLogicServer 10.3.6 for my application. Also I use the CamelContextLifecycle and there is where the exception occurs. Everything works well if I compile with Java 1.6, but if I use Java 1.7 this Exception occurs during the startup process of the ManagedServer: java.lang.RuntimeException: Error creating CamelContextLifecycle class with name foo.bar.ContextLifecycle at org.apache.camel.component.servletlistener.CamelServletContextListener.contextInitialized(CamelServletContextListener.java:114) at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181) at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1870) at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3163) at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1522) at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:486) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119) at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200) at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119) at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27) at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:671) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212) at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:44) at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161) at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80) at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:187) at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:379) at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51) at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200) at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30) at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:261) at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:246) at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169) at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123) at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180) at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96) at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256) at weblogic.work.ExecuteThread.run(ExecuteThread.java:221) Caused By: java.lang.ClassNotFoundException: foo.bar.ContextLifecycle at org.apache.camel.impl.DefaultClassResolver.resolveMandatoryClass(DefaultClassResolver.java:61) at org.apache.camel.component.servletlistener.CamelServletContextListener.contextInitialized(CamelServletContextListener.java:111) at weblogic.servlet.internal.EventsManager
Re: Issue setting property on the object which in the exchange body
You can use the bean method return the message body just like this public class Bar { @Handler public Foo doSomething(@Header(age)Integer age, @Body Foo foo) { foo.setAge(age); return foo; } from(activemq:someQueue). bean(Bar.class); You can find more information about Bean Binding here[1] [1]https://camel.apache.org/bean-binding.html -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On January 21, 2015 at 4:27:37 AM, gilboy (josephoto...@gmail.com) wrote: Hi In my route, I have a header property on the exchange called age. In the body of the exchange I have a person object. I want to set the age property on the person object. If I do something like the following in my route and have the setAge property on the Person bean use the header annotation(e.g. setAge(@Header(age)Integer age)) the property will get correctly set. However, the setter message is void, hence the body on the exchange gets wiped. I can have the setter method return *this* but it feels wrong ${body.setAge} Any other solution? Thanks Joe -- View this message in context: http://camel.465427.n5.nabble.com/Issue-setting-property-on-the-object-which-in-the-exchange-body-tp5761960.html Sent from the Camel - Users mailing list archive at Nabble.com.