Re: Changes in Java 8 generics breaking Camel
I opened a Jira ticket and attached a sample app that replicates the problem. Hopefully it's an easy fix. https://issues.apache.org/jira/browse/CAMEL-8160 -- View this message in context: http://camel.465427.n5.nabble.com/Changes-in-Java-8-generics-breaking-Camel-tp5760638p5760876.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Java DSl XPATH text node
Hi You get a NodeList - are you sure your xpath is only selecting a single node, so it can be returned as plain text? On Thu, Dec 18, 2014 at 8:55 AM, sekaijin jean-yves.terr...@sap.aphp.fr wrote: I've tried to use String.class argument to convert it in string but I get an empty string. Thank to help me I'm running camel 2.8.1 Thank -- View this message in context: http://camel.465427.n5.nabble.com/Java-DSl-XPATH-text-node-tp5760835p5760859.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: Java DSl XPATH text node
yes myXML is And containt only one entete TAG But I've changed my Xpath for And now It work By. -- View this message in context: http://camel.465427.n5.nabble.com/Java-DSl-XPATH-text-node-tp5760835p5760878.html Sent from the Camel - Users mailing list archive at Nabble.com.
accessing suspended exchanges
I'm using the BacklogDebugger but don't see an easy way to access the suspended exchanges. The map is private and the SuspendedExchange class itself is also private. While at the breakpoint, I'd like the user to be able to inspect the Exchange. It would help if there were simple getters for this value. I'm not using JMX in this case so I'm not concerned about having to make the Message and its content accessible via JMX.
Re: accessing suspended exchanges
You can use dumpTracedMessagesAsXml to get the message content in xml. On Thu, Dec 18, 2014 at 5:26 PM, Mark Ford m...@massfords.com wrote: I'm using the BacklogDebugger but don't see an easy way to access the suspended exchanges. The map is private and the SuspendedExchange class itself is also private. While at the breakpoint, I'd like the user to be able to inspect the Exchange. It would help if there were simple getters for this value. I'm not using JMX in this case so I'm not concerned about having to make the Message and its content accessible via JMX. -- 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: accessing suspended exchanges
I saw that option but it's better suited for JMX. In my case, everything is resident locally so dumping to XML and having to provide a string adapter for the payload seems like a lot to do. Also consider that I need to parse everything back from XML to see what the message is. Would you be open to a patch that made made the suspended exchanges easily accessible through the debugger? For now, I'll add this as a custom interceptor in my code. On Thu, Dec 18, 2014 at 12:00 PM, Claus Ibsen claus.ib...@gmail.com wrote: You can use dumpTracedMessagesAsXml to get the message content in xml. On Thu, Dec 18, 2014 at 5:26 PM, Mark Ford m...@massfords.com wrote: I'm using the BacklogDebugger but don't see an easy way to access the suspended exchanges. The map is private and the SuspendedExchange class itself is also private. While at the breakpoint, I'd like the user to be able to inspect the Exchange. It would help if there were simple getters for this value. I'm not using JMX in this case so I'm not concerned about having to make the Message and its content accessible via JMX. -- 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: accessing suspended exchanges
On Thu, Dec 18, 2014 at 6:12 PM, Mark Ford m...@massfords.com wrote: I saw that option but it's better suited for JMX. In my case, everything is resident locally so dumping to XML and having to provide a string adapter for the payload seems like a lot to do. Also consider that I need to parse everything back from XML to see what the message is. Would you be open to a patch that made made the suspended exchanges easily accessible through the debugger? For now, I'll add this as a custom interceptor in my code. Yeah sure we can do that. We love contributions. The debugger api is really for eclipse / other jvms to remote debug. And hence why its as-is now. On Thu, Dec 18, 2014 at 12:00 PM, Claus Ibsen claus.ib...@gmail.com wrote: You can use dumpTracedMessagesAsXml to get the message content in xml. On Thu, Dec 18, 2014 at 5:26 PM, Mark Ford m...@massfords.com wrote: I'm using the BacklogDebugger but don't see an easy way to access the suspended exchanges. The map is private and the SuspendedExchange class itself is also private. While at the breakpoint, I'd like the user to be able to inspect the Exchange. It would help if there were simple getters for this value. I'm not using JMX in this case so I'm not concerned about having to make the Message and its content accessible via JMX. -- 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: AW: camel - xsd
Jan and I had a couple of email exchange on this. It turns out that the compliance check at the beginning of the processing was not working when there is no xml-declaration in the input. Consequently, when your input message has no xml-declaration and you have sjxp parser, you will get incorrectly extracted tokens. I created CAMEL-8164 to fix this. 2014-12-17 19:35 GMT+01:00 Aki Yoshida elak...@gmail.com: @Jan, the failing test itself is expected if you don't have woodstox. The question is how it is failing, whether it stops at the beginning and throws the exception like in the quoted console output in my previous reply or after extracting the bad token and when comparing the token? You mentioned that you observed this second behavior and I would like to know where I can reproduce it. thanks. 2014-12-17 16:40 GMT+01:00 Jan Matèrne (jhm) apa...@materne.de: Java(TM) SE Runtime Environment (build 1.7.0_21-b11) Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode) by Oracle (according to the copyright file) - without woodstox: fail - with woodstox: pass Same for Java(TM) SE Runtime Environment (build 1.6.0_43-b01) Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode) (also Oracle) Same for Java(TM) SE Runtime Environment (build 1.8.0-ea-b87) Java HotSpot(TM) 64-Bit Server VM (build 25.0-b28, mixed mode) (also Oracle) Same for Java(TM) SE Runtime Environment (build 1.9.0-ea-b06) Java HotSpot(TM) 64-Bit Server VM (build 25.0-b62, mixed mode) (also Oracle) All on Win7 64bit. Jan -Ursprüngliche Nachricht- Von: Aki Yoshida [mailto:elak...@gmail.com] Gesendet: Mittwoch, 17. Dezember 2014 15:49 An: users@camel.apache.org Cc: Jan Matèrne (jhm) Betreff: Re: AW: camel - xsd @Jan I just ran the camel-core's unit test XMLTokenExpressionIteratorTest on jdk8 without woodstox (use profile deactivation -P!woodstox to disable woodstox), the tokenizer correctly reports the error at the beginning without proceeding to the tokenizing step. (on both OSX and Ubuntu with Oracle JDK8). testExtractSomeUnqualifiedChild(org.apache.camel.support.XMLTokenExpres sionIteratorTest) Time elapsed: 0.001 sec ERROR! javax.xml.stream.XMLStreamException: reader not supporting Location at org.apache.camel.support.XMLTokenExpressionIterator$XMLTokenIterator.i nit(XMLTokenExpressionIterator.java:219) Can you tell me which JDK you had to get the incorrectly extracted tokens? thanks 2014-12-16 14:27 GMT+01:00 Aki Yoshida elak...@gmail.com: @Jan, I just missed your previous replies. I just saw you also have provided the JDK info already. thanks. 2014-12-16 14:25 GMT+01:00 Aki Yoshida elak...@gmail.com: It's good to hear it is working in your environment. by the way, I saw your camael doc update regarding the concrete error example you saw. We need to formulate that differently. There is a small sanity check before starting the tokenization (not comparing the impl name itself but trying to infer its conformance by its initial behavior). That check was working for Oracle JDK 7 on OSX. I would like to know which JDK that you use. In any case, we can either make the initial sanity check to detect this incompatible behavior and detect it later if it is not detected at the beginning. In either way, we can throw an exception at some point. regards, aki 2014-12-16 10:18 GMT+01:00 Jan Matèrne (jhm) apa...@materne.de: Sorry for my late answer, I was ill :( Thanks for your sample project, I investigated into it now. All tests passed. (Camel 2.14.0) But your test used the XMLTokenExpressionIterator directly I migrated my own test class (using the RouteBuilder) into your project. - added the test class - added the xsd - added the dependency to commons-io + camel-test-spring - changed the paths in my test class to fit your directory layout Now this also passed. It's good to see that there is no bug in Camel. ;) Because my example still fails in my other environment I check that ... Jan -Ursprüngliche Nachricht- Von: Aki Yoshida [mailto:elak...@gmail.com] Gesendet: Mittwoch, 10. Dezember 2014 23:57 An: users@camel.apache.org Betreff: Re: AW: camel - xsd i meant woodstox-core-asl (e.g., woodstox-core-asl-4.4.1.jar). its maven coordinate is mvn:org.codehaus.woodstox/woodstox-core-asl/4.4.1 you need to have woodstox or some other parser that reliably reports the offset location at each parse event. Sjsxp (sun/oracle implementation included in JDK) doesn't do that, so you can't use it. jmtest.tar.gz contains a maven project that can be executed directly by typing mvn test at the console or can be imported into your eclipse IDE. 2014-12-10 13:13 GMT+01:00 Aki Yoshida elak...@gmail.com: i just created a test that uses your data and verified that it is working fine. please take a look at this file at my dropbox.
Creation of a Custom Component with URI parameters
Hi, I am trying to create a custom component with URI parameters. I haven't found an example that shows the full implementation of this kind of component so I modified the example from the Camel in Action book in order to add a URI parameter. To do so, I modified the following classes: HelloWorldEndpoint - added the following lines HelloWorldComponentTest - modified the return new RouteBuilder() method: The thing is that when I try to retrieve the value of param in the Producer (using exchange.getProperties()) it is not there. What am I doing wrong? Thanks, -- View this message in context: http://camel.465427.n5.nabble.com/Creation-of-a-Custom-Component-with-URI-parameters-tp5760889.html Sent from the Camel - Users mailing list archive at Nabble.com.
AW: AW: camel - xsd
Good catch :) Jan -Ursprüngliche Nachricht- Von: Aki Yoshida [mailto:elak...@gmail.com] Gesendet: Donnerstag, 18. Dezember 2014 18:29 An: users@camel.apache.org Betreff: Re: AW: camel - xsd Jan and I had a couple of email exchange on this. It turns out that the compliance check at the beginning of the processing was not working when there is no xml-declaration in the input. Consequently, when your input message has no xml-declaration and you have sjxp parser, you will get incorrectly extracted tokens. I created CAMEL-8164 to fix this. 2014-12-17 19:35 GMT+01:00 Aki Yoshida elak...@gmail.com: @Jan, the failing test itself is expected if you don't have woodstox. The question is how it is failing, whether it stops at the beginning and throws the exception like in the quoted console output in my previous reply or after extracting the bad token and when comparing the token? You mentioned that you observed this second behavior and I would like to know where I can reproduce it. thanks. 2014-12-17 16:40 GMT+01:00 Jan Matèrne (jhm) apa...@materne.de: Java(TM) SE Runtime Environment (build 1.7.0_21-b11) Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode) by Oracle (according to the copyright file) - without woodstox: fail - with woodstox: pass Same for Java(TM) SE Runtime Environment (build 1.6.0_43-b01) Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode) (also Oracle) Same for Java(TM) SE Runtime Environment (build 1.8.0-ea-b87) Java HotSpot(TM) 64-Bit Server VM (build 25.0-b28, mixed mode) (also Oracle) Same for Java(TM) SE Runtime Environment (build 1.9.0-ea-b06) Java HotSpot(TM) 64-Bit Server VM (build 25.0-b62, mixed mode) (also Oracle) All on Win7 64bit. Jan -Ursprüngliche Nachricht- Von: Aki Yoshida [mailto:elak...@gmail.com] Gesendet: Mittwoch, 17. Dezember 2014 15:49 An: users@camel.apache.org Cc: Jan Matèrne (jhm) Betreff: Re: AW: camel - xsd @Jan I just ran the camel-core's unit test XMLTokenExpressionIteratorTest on jdk8 without woodstox (use profile deactivation -P!woodstox to disable woodstox), the tokenizer correctly reports the error at the beginning without proceeding to the tokenizing step. (on both OSX and Ubuntu with Oracle JDK8). testExtractSomeUnqualifiedChild(org.apache.camel.support.XMLTokenExp res sionIteratorTest) Time elapsed: 0.001 sec ERROR! javax.xml.stream.XMLStreamException: reader not supporting Location at org.apache.camel.support.XMLTokenExpressionIterator$XMLTokenIterator .i nit(XMLTokenExpressionIterator.java:219) Can you tell me which JDK you had to get the incorrectly extracted tokens? thanks 2014-12-16 14:27 GMT+01:00 Aki Yoshida elak...@gmail.com: @Jan, I just missed your previous replies. I just saw you also have provided the JDK info already. thanks. 2014-12-16 14:25 GMT+01:00 Aki Yoshida elak...@gmail.com: It's good to hear it is working in your environment. by the way, I saw your camael doc update regarding the concrete error example you saw. We need to formulate that differently. There is a small sanity check before starting the tokenization (not comparing the impl name itself but trying to infer its conformance by its initial behavior). That check was working for Oracle JDK 7 on OSX. I would like to know which JDK that you use. In any case, we can either make the initial sanity check to detect this incompatible behavior and detect it later if it is not detected at the beginning. In either way, we can throw an exception at some point. regards, aki 2014-12-16 10:18 GMT+01:00 Jan Matèrne (jhm) apa...@materne.de: Sorry for my late answer, I was ill :( Thanks for your sample project, I investigated into it now. All tests passed. (Camel 2.14.0) But your test used the XMLTokenExpressionIterator directly I migrated my own test class (using the RouteBuilder) into your project. - added the test class - added the xsd - added the dependency to commons-io + camel-test-spring - changed the paths in my test class to fit your directory layout Now this also passed. It's good to see that there is no bug in Camel. ;) Because my example still fails in my other environment I check that ... Jan -Ursprüngliche Nachricht- Von: Aki Yoshida [mailto:elak...@gmail.com] Gesendet: Mittwoch, 10. Dezember 2014 23:57 An: users@camel.apache.org Betreff: Re: AW: camel - xsd i meant woodstox-core-asl (e.g., woodstox-core-asl-4.4.1.jar). its maven coordinate is mvn:org.codehaus.woodstox/woodstox-core-asl/4.4.1 you need to have woodstox or some other parser that reliably reports the offset location at each parse event. Sjsxp (sun/oracle implementation included in JDK) doesn't do that, so you can't
Re: cxf soap call PhaseInterceptorChain exception (cannot cast to String) when using dataFormat=POJO
Hi! I'm stuck in the same area. Were you able to find out a solution? Thanks! David -- View this message in context: http://camel.465427.n5.nabble.com/cxf-soap-call-PhaseInterceptorChain-exception-cannot-cast-to-String-when-using-dataFormat-POJO-tp5736712p5760898.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Creation of a Custom Component with URI parameters
On Thu, Dec 18, 2014 at 8:25 PM, IgnatiusReilly elpa...@gmail.com wrote: Hi, I am trying to create a custom component with URI parameters. I haven't found an example that shows the full implementation of this kind of component so I modified the example from the Camel in Action book in order to add a URI parameter. To do so, I modified the following classes: HelloWorldEndpoint - added the following lines HelloWorldComponentTest - modified the return new RouteBuilder() method: The thing is that when I try to retrieve the value of param in the Producer (using exchange.getProperties()) it is not there. Those are 2 different things. The value is an option on the endpoint. So you can access the value from the producer, where you can put the value on the exchange, anywhere you like. Though usually as a header. What am I doing wrong? Thanks, -- View this message in context: http://camel.465427.n5.nabble.com/Creation-of-a-Custom-Component-with-URI-parameters-tp5760889.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 application getting down after creating route
Hi See this link http://camel.apache.org/running-camel-standalone-and-have-it-keep-running.html On Fri, Dec 19, 2014 at 8:08 AM, sakchakravarthi ajit.kalyan.chakravar...@gmail.com wrote: Hi I have a file route configured in the spring camel context. I am bringing up camel context from my java main method using ClassPathXmlApplicationContext. After creating routes my application is getting down. There is no error or exception in log. But when I added jetty route application is running continuously. How can I achieve this with out using jetty route. -- View this message in context: http://camel.465427.n5.nabble.com/Camel-application-getting-down-after-creating-route-tp5760902.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/