Re: MINA Serial - what route syntax and how to install ?

2012-11-13 Thread c031917
This is very bad news. I had asked about mina2 availability in Dec. 2011 and
May 2012.
In May Claus Ibsen stated that mina2 would be in camel 2.10.

In the meantime I had to use an ugly python workaround to get serial data
and post it via STOMP.

I was happy that mina2 was mentionend in version 2.10 release notes.

Now there is suddenly a hint : "camel-mina2 - camel-mina2 is expected to be
refactored in Camel 2.11, so use on own risk of having to migrate".

It is really difficult to plan a real world camel pilot project when
deadlines on component availability are changed so short-noticed.

I would like to contribute but I'm probably not in a position to do that
beyond perhaps trying and testing things.
   
There is a big grey area between using Camel (thus understanding all the
details of "Camel in Action") and
really contributing. In my role as architect and technology scout the depth
of the programming facette is not strong enough. I'm always wondering how
people in all those Open Source projects got this incredible deep knowledge,
this is really admirable.

I will rais a Jira (my first one...) and enter the hold pattern.

Peter 



Christian Mueller wrote
> The camel-mina2 component will be official released in Camel 2.11.0. At
> present, we do not support the serial connector as described at [1] (as
> far
> as I know).
> Feel free to rais a JIRA at [2] so that we don't forget this. And as you
> may know, we love contributions. You can find more about how to contribute
> at [3] and [4].
> 
> The camel-mina component is using Mina 1.x and it's not what you are
> looking for.
> 
> [1] http://mina.apache.org/serial-tutorial.html
> [2] https://issues.apache.org/jira/browse/CAMEL
> [3] http://camel.apache.org/contributing.html
> [4] http://camel.apache.org/building.html
> 
> Best,
> Christian
> 
> On Wed, Nov 7, 2012 at 11:09 AM, c031917 <

> peter.marx@

> >wrote:
> 
>> I want to use the long awaited Camel + MINA 2 capability to get serial
>> data
>> onto the message bus.
>>
>> I can't find any documentation or example how to do that.
>>
>> What is the syntax ?  something like
>>
>> from ("mina:*/dev/ttyUSB0*:")
>>.to("jms:operations");
>>
>> ?
>>
>> 2. question: how do i install
>>
>> camel-mina
>> mina-transport-serial-2.0.2.jar
>> RXTXcomm.jar
>> librxtxSerial.so
>>
>> correctly without maven so that Camel is happy ?
>>
>> I put the last two into jre/lib/i386 and jre/lib/ext according and hope
>> this
>> is also right for camel-mina.
>>
>>
>> Peter
>>
>>
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/MINA-Serial-what-route-syntax-and-how-to-install-tp5722293.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
> 
> 
> 
> --





--
View this message in context: 
http://camel.465427.n5.nabble.com/MINA-Serial-what-route-syntax-and-how-to-install-tp5722293p5722640.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: MINA Serial - what route syntax and how to install ?

2012-11-13 Thread Claus Ibsen
On Tue, Nov 13, 2012 at 9:52 AM, c031917  wrote:
> This is very bad news. I had asked about mina2 availability in Dec. 2011 and
> May 2012.
> In May Claus Ibsen stated that mina2 would be in camel 2.10.
>
> In the meantime I had to use an ugly python workaround to get serial data
> and post it via STOMP.
>
> I was happy that mina2 was mentionend in version 2.10 release notes.
>
> Now there is suddenly a hint : "camel-mina2 - camel-mina2 is expected to be
> refactored in Camel 2.11, so use on own risk of having to migrate".
>

You can use camel-mina component. Its stable and works.

The camel-mina2 component is in development. The current code is a
replica of camel-mina.
However we want to refactor the code to allow higher scalability and
make the component ready
for new functionality The old code is not ready for that. And hence
why we mentioned that camel-mina2 is in "development".

I would anticipate the common usage of camel-mina2 would not change.
It's more the edge cases and advanced stuff that may need some
migration in a future release. Most of the work would be under the
hood, to tap better in
the async routing engine in Camel. All this work has been done in
camel-netty. So it's more a question of having time to do this work
again in camel-mina2.

As an alternative you can use camel-netty which is using the Netty
library. Netty is very much like Mina2.
And created by past Apache Mina core committers.


> It is really difficult to plan a real world camel pilot project when
> deadlines on component availability are changed so short-noticed.
>

Use what's already released and not labeled as "in development".


> I would like to contribute but I'm probably not in a position to do that
> beyond perhaps trying and testing things.
>

Well that's the problem. There is only 24 hours per day. And even the
people from the Camel team have day time jobs, and all sorts of things
to work on. So some community tasks like refactor camel-mina2 may give
us time
to work on this as often as we would like.


> There is a big grey area between using Camel (thus understanding all the
> details of "Camel in Action") and
> really contributing. In my role as architect and technology scout the depth
> of the programming facette is not strong enough. I'm always wondering how
> people in all those Open Source projects got this incredible deep knowledge,
> this is really admirable.
>

Well there is a lot of people contributing to Apache Camel.
http://camel.apache.org/contributing.html

You can do this in any way. Help with docs, help people on mailing lists.
Write blogs, write new examples. Fix bugs and submit patches. Or write
new components etc.
You work don't have to be contributed to Apache. There is plenty of
stuff at 3rd party sites at github, or where else.




> I will rais a Jira (my first one...) and enter the hold pattern.
>
> Peter
>
>
>
> Christian Mueller wrote
>> The camel-mina2 component will be official released in Camel 2.11.0. At
>> present, we do not support the serial connector as described at [1] (as
>> far
>> as I know).
>> Feel free to rais a JIRA at [2] so that we don't forget this. And as you
>> may know, we love contributions. You can find more about how to contribute
>> at [3] and [4].
>>
>> The camel-mina component is using Mina 1.x and it's not what you are
>> looking for.
>>
>> [1] http://mina.apache.org/serial-tutorial.html
>> [2] https://issues.apache.org/jira/browse/CAMEL
>> [3] http://camel.apache.org/contributing.html
>> [4] http://camel.apache.org/building.html
>>
>> Best,
>> Christian
>>
>> On Wed, Nov 7, 2012 at 11:09 AM, c031917 <
>
>> peter.marx@
>
>> >wrote:
>>
>>> I want to use the long awaited Camel + MINA 2 capability to get serial
>>> data
>>> onto the message bus.
>>>
>>> I can't find any documentation or example how to do that.
>>>
>>> What is the syntax ?  something like
>>>
>>> from ("mina:*/dev/ttyUSB0*:")
>>>.to("jms:operations");
>>>
>>> ?
>>>
>>> 2. question: how do i install
>>>
>>> camel-mina
>>> mina-transport-serial-2.0.2.jar
>>> RXTXcomm.jar
>>> librxtxSerial.so
>>>
>>> correctly without maven so that Camel is happy ?
>>>
>>> I put the last two into jre/lib/i386 and jre/lib/ext according and hope
>>> this
>>> is also right for camel-mina.
>>>
>>>
>>> Peter
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://camel.465427.n5.nabble.com/MINA-Serial-what-route-syntax-and-how-to-install-tp5722293.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>
>>
>>
>> --
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/MINA-Serial-what-route-syntax-and-how-to-install-tp5722293p5722640.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Setup of JMS message listener failed Exception JmsComponent

2012-11-13 Thread Charles Moulliard
Seems that the JTA Tx Manager is not there.


On Mon, Nov 12, 2012 at 9:07 PM, javaxmlsoapdev wrote:

> yeah. Queue definitely exists, i am able to connect through other tool.
>
> I am using camel version 2.10.0. As such there is no stack trace since
> camel/spring reports that as a WARN
>
> 2012-11-12 14:54:34.231 [Camel (camelContext) thread #1 - JmsConsumer[]
> [WARN ] org.apache.camel.component.jms.DefaultJmsMessageListenerContainer -
> Setup of JMS message listener invoker failed for destination 'queueName' -
> trying to recover. Cause: javax/transaction/TransactionManager
>
> Any idea?
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Setup-of-JMS-message-listener-failed-Exception-JmsComponent-tp5722452p5722624.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com


Re: JMS - Shared fixed reply queue doesn´t consume all the messages

2012-11-13 Thread Claus Ibsen
Hi

I suspect its because you use Spring's Caching ConnectionFactory as
connection pool.
So even if camel-jms has CACHE_NONE, then because the consumer is not
cached on the reply listener (because you configured it to cache
none), it would have to get a new consumer from the connection
factory, which is using the Spring Caching ConnectionFactory, that
would not create a new consumer, but return a previous used consumer
from its caching pool, because you configured it with
cacheConsumers=true.

But I haven't had time to look into this. Just a thought.

On Mon, Nov 12, 2012 at 2:52 PM, anaCortes  wrote:
> I´ve changed the unit test. Now i´m using the CamelJmsTestHelper for the
> JmsComponent (now there´s no external broker) and i´ve added setAssertPeriod
> to the mock.
>
> /**
>  * @author anacortes
>  */
> public class JmsReplyToCacheLevelNameTest extends CamelTestSupport {
>
> protected CamelContext createCamelContext() throws Exception {
> CamelContext camelContext = super.createCamelContext();
>
> ConnectionFactory connectionFactory =
> CamelJmsTestHelper.createPersistentConnectionFactory();
> ActiveMQComponent activemqComponent = new ActiveMQComponent();
> activemqComponent.setReplyToCacheLevelName("CACHE_NONE");
> activemqComponent.setConnectionFactory(connectionFactory);
> camelContext.addComponent("activemq", activemqComponent);
>
> return camelContext;
> }
>
> @Test
> public void testStuckMessagesWithFixedReplyQueue() throws Exception {
> getMockEndpoint("mock:result").expectedMessageCount(1);
> getMockEndpoint("mock:result").setAssertPeriod(200);
>
> new MyThread().start();
> new MyThread().start();
> new MyThread().start();
>
> assertMockEndpointsSatisfied();
> }
>
> @Override
> protected RouteBuilder createRouteBuilder() throws Exception {
> return new RouteBuilder() {
> public void configure() throws Exception {
> from("direct:start")
> .inOut("activemq:queue:foo?replyTo=queue:bar")
> .to("mock:result");
>
> from("activemq:queue:foo").transform(body().prepend("Bye
> "));
> }
> };
> }
>
> class MyThread extends Thread {
> public void run() {
> template.requestBody("direct:start", "Camel"+getName(),
> String.class);
> }
> }
>
> }
>
> Here we can see that the mock only receives one message (and not the three
> messages).
>
> If we add to the CachingConnectionFactory, cacheConsumer to false, then the
> mock will receive the three messages (the stuck messages are gone).
>
> cached.setCacheConsumers(false);
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/JMS-Shared-fixed-reply-queue-doesn-t-consume-all-the-messages-tp5721700p5722598.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Setting root folder as endpoint - Could not poll endpoint NPE

2012-11-13 Thread Claus Ibsen
See the ticket that was logged, it has fix-versions with the details.

On Tue, Nov 13, 2012 at 10:58 AM, tonyperrin  wrote:
> Has this issue been fixed in the latest Camel release does anyone know?
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Setting-root-folder-as-endpoint-Could-not-poll-endpoint-NPE-tp5717845p5722646.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Saxon and saxon9he

2012-11-13 Thread Bengt Rodehav
I'm using Camel 2.10.2 on Karaf 2.3.0.

I'm trying to use xpath but I get the following exception:

*2012-11-13 13:20:38,307 | ERROR | rfaces/fundorder | DefaultErrorHandler
   | rg.apache.camel.util.CamelLogger  215 | Failed delivery for
(MessageId: ID-IT-D-FQR815J-56524-1352809143728-0-1 on ExchangeId:
ID-IT-D-FQR815J-56524-1352809143728-0-2). Exhausted after delivery attempt:
1 caught: org.apache.camel.RuntimeExpressionException: Cannot create xpath
expression. Processed by failure processor:
FatalFallbackErrorHandler[Channel[Wrap[se.digia.connect.service.fundorder.FundOrderService$NotificationProcessor@7a587427]
->
se.digia.connect.service.fundorder.FundOrderService$NotificationProcessor@7a587427
]]*
*org.apache.camel.RuntimeExpressionException: Cannot create xpath expression
*
* at
org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:689)[114:org.apache.camel.camel-core:2.10.2]
*
*...*
* at java.lang.Thread.run(Thread.java:662)[:1.6.0_32]*
*Caused by: java.lang.RuntimeException: XPathFactory#newInstance() failed
to create an XPathFactory for the default object model:
http://java.sun.com/jaxp/xpath/dom with the
XPathFactoryConfigurationException:
javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory
implementation found for the object model:
http://java.sun.com/jaxp/xpath/dom*
* at javax.xml.xpath.XPathFactory.newInstance(Unknown Source)[:2.1.0]*
* at
org.apache.camel.builder.xml.XPathBuilder.initDefaultXPathFactory(XPathBuilder.java:1046)[114:org.apache.camel.camel-core:2.10.2]
*
* at
org.apache.camel.builder.xml.XPathBuilder.getXPathFactory(XPathBuilder.java:424)[114:org.apache.camel.camel-core:2.10.2]
*
* at
org.apache.camel.builder.xml.XPathBuilder.createXPathExpression(XPathBuilder.java:829)[114:org.apache.camel.camel-core:2.10.2]
*
* at
org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:685)[114:org.apache.camel.camel-core:2.10.2]
*
* ... 44 more*

I have also posted a question regarding this on the Karaf mailing list to
find out what xpath implementation should be used on Karaf (and how).

However, looking at the Camel documentation, it seems like I can choose to
use the Saxon implementation of xpath. So, I added camel-saxon as a
dependency to my project.

But, then I can't build because maven cannot find the artifact
net.sf.saxon/saxon9he/9.3.0.11. I've searched maven central and it's not
there. Do I have to configure any other repositories than maven central?
*
*
*/Bengt*


Re: Saxon and saxon9he

2012-11-13 Thread Claus Ibsen
The JAR is in SMX repo at
http://svn.apache.org/repos/asf/servicemix/m2-repo

On Tue, Nov 13, 2012 at 2:39 PM, Bengt Rodehav  wrote:
> I'm using Camel 2.10.2 on Karaf 2.3.0.
>
> I'm trying to use xpath but I get the following exception:
>
> *2012-11-13 13:20:38,307 | ERROR | rfaces/fundorder | DefaultErrorHandler
>| rg.apache.camel.util.CamelLogger  215 | Failed delivery for
> (MessageId: ID-IT-D-FQR815J-56524-1352809143728-0-1 on ExchangeId:
> ID-IT-D-FQR815J-56524-1352809143728-0-2). Exhausted after delivery attempt:
> 1 caught: org.apache.camel.RuntimeExpressionException: Cannot create xpath
> expression. Processed by failure processor:
> FatalFallbackErrorHandler[Channel[Wrap[se.digia.connect.service.fundorder.FundOrderService$NotificationProcessor@7a587427]
> ->
> se.digia.connect.service.fundorder.FundOrderService$NotificationProcessor@7a587427
> ]]*
> *org.apache.camel.RuntimeExpressionException: Cannot create xpath expression
> *
> * at
> org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:689)[114:org.apache.camel.camel-core:2.10.2]
> *
> *...*
> * at java.lang.Thread.run(Thread.java:662)[:1.6.0_32]*
> *Caused by: java.lang.RuntimeException: XPathFactory#newInstance() failed
> to create an XPathFactory for the default object model:
> http://java.sun.com/jaxp/xpath/dom with the
> XPathFactoryConfigurationException:
> javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory
> implementation found for the object model:
> http://java.sun.com/jaxp/xpath/dom*
> * at javax.xml.xpath.XPathFactory.newInstance(Unknown Source)[:2.1.0]*
> * at
> org.apache.camel.builder.xml.XPathBuilder.initDefaultXPathFactory(XPathBuilder.java:1046)[114:org.apache.camel.camel-core:2.10.2]
> *
> * at
> org.apache.camel.builder.xml.XPathBuilder.getXPathFactory(XPathBuilder.java:424)[114:org.apache.camel.camel-core:2.10.2]
> *
> * at
> org.apache.camel.builder.xml.XPathBuilder.createXPathExpression(XPathBuilder.java:829)[114:org.apache.camel.camel-core:2.10.2]
> *
> * at
> org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:685)[114:org.apache.camel.camel-core:2.10.2]
> *
> * ... 44 more*
>
> I have also posted a question regarding this on the Karaf mailing list to
> find out what xpath implementation should be used on Karaf (and how).
>
> However, looking at the Camel documentation, it seems like I can choose to
> use the Saxon implementation of xpath. So, I added camel-saxon as a
> dependency to my project.
>
> But, then I can't build because maven cannot find the artifact
> net.sf.saxon/saxon9he/9.3.0.11. I've searched maven central and it's not
> there. Do I have to configure any other repositories than maven central?
> *
> *
> */Bengt*



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Saxon and saxon9he

2012-11-13 Thread Claus Ibsen
Though there is a SMX bundle as well
http://repo2.maven.org/maven2/org/apache/servicemix/bundles/org.apache.servicemix.bundles.saxon/9.4.0.4_1/

The problem is that the SMX bundle doesn't contain all the files that
the official JAR has. Its approx 9mb and the SMX bundle is much
smaller.

Though don't know what may or may not work in OSGi land then due the
left out stuff.


On Tue, Nov 13, 2012 at 3:02 PM, Claus Ibsen  wrote:
> The JAR is in SMX repo at
> http://svn.apache.org/repos/asf/servicemix/m2-repo
>
> On Tue, Nov 13, 2012 at 2:39 PM, Bengt Rodehav  wrote:
>> I'm using Camel 2.10.2 on Karaf 2.3.0.
>>
>> I'm trying to use xpath but I get the following exception:
>>
>> *2012-11-13 13:20:38,307 | ERROR | rfaces/fundorder | DefaultErrorHandler
>>| rg.apache.camel.util.CamelLogger  215 | Failed delivery for
>> (MessageId: ID-IT-D-FQR815J-56524-1352809143728-0-1 on ExchangeId:
>> ID-IT-D-FQR815J-56524-1352809143728-0-2). Exhausted after delivery attempt:
>> 1 caught: org.apache.camel.RuntimeExpressionException: Cannot create xpath
>> expression. Processed by failure processor:
>> FatalFallbackErrorHandler[Channel[Wrap[se.digia.connect.service.fundorder.FundOrderService$NotificationProcessor@7a587427]
>> ->
>> se.digia.connect.service.fundorder.FundOrderService$NotificationProcessor@7a587427
>> ]]*
>> *org.apache.camel.RuntimeExpressionException: Cannot create xpath expression
>> *
>> * at
>> org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:689)[114:org.apache.camel.camel-core:2.10.2]
>> *
>> *...*
>> * at java.lang.Thread.run(Thread.java:662)[:1.6.0_32]*
>> *Caused by: java.lang.RuntimeException: XPathFactory#newInstance() failed
>> to create an XPathFactory for the default object model:
>> http://java.sun.com/jaxp/xpath/dom with the
>> XPathFactoryConfigurationException:
>> javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory
>> implementation found for the object model:
>> http://java.sun.com/jaxp/xpath/dom*
>> * at javax.xml.xpath.XPathFactory.newInstance(Unknown Source)[:2.1.0]*
>> * at
>> org.apache.camel.builder.xml.XPathBuilder.initDefaultXPathFactory(XPathBuilder.java:1046)[114:org.apache.camel.camel-core:2.10.2]
>> *
>> * at
>> org.apache.camel.builder.xml.XPathBuilder.getXPathFactory(XPathBuilder.java:424)[114:org.apache.camel.camel-core:2.10.2]
>> *
>> * at
>> org.apache.camel.builder.xml.XPathBuilder.createXPathExpression(XPathBuilder.java:829)[114:org.apache.camel.camel-core:2.10.2]
>> *
>> * at
>> org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:685)[114:org.apache.camel.camel-core:2.10.2]
>> *
>> * ... 44 more*
>>
>> I have also posted a question regarding this on the Karaf mailing list to
>> find out what xpath implementation should be used on Karaf (and how).
>>
>> However, looking at the Camel documentation, it seems like I can choose to
>> use the Saxon implementation of xpath. So, I added camel-saxon as a
>> dependency to my project.
>>
>> But, then I can't build because maven cannot find the artifact
>> net.sf.saxon/saxon9he/9.3.0.11. I've searched maven central and it's not
>> there. Do I have to configure any other repositories than maven central?
>> *
>> *
>> */Bengt*
>
>
>
> --
> Claus Ibsen
> -
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cib...@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Saxon and saxon9he

2012-11-13 Thread Bengt Rodehav
Thanks Claus.

You don't happen to know anything about using Camel's xpath language within
Karaf? Should it be possible without resorting to Saxon? I couldn't see any
osgi tests regarding this.

/Bengt


2012/11/13 Claus Ibsen 

> Though there is a SMX bundle as well
>
> http://repo2.maven.org/maven2/org/apache/servicemix/bundles/org.apache.servicemix.bundles.saxon/9.4.0.4_1/
>
> The problem is that the SMX bundle doesn't contain all the files that
> the official JAR has. Its approx 9mb and the SMX bundle is much
> smaller.
>
> Though don't know what may or may not work in OSGi land then due the
> left out stuff.
>
>
> On Tue, Nov 13, 2012 at 3:02 PM, Claus Ibsen 
> wrote:
> > The JAR is in SMX repo at
> > http://svn.apache.org/repos/asf/servicemix/m2-repo
> >
> > On Tue, Nov 13, 2012 at 2:39 PM, Bengt Rodehav 
> wrote:
> >> I'm using Camel 2.10.2 on Karaf 2.3.0.
> >>
> >> I'm trying to use xpath but I get the following exception:
> >>
> >> *2012-11-13 13:20:38,307 | ERROR | rfaces/fundorder |
> DefaultErrorHandler
> >>| rg.apache.camel.util.CamelLogger  215 | Failed delivery for
> >> (MessageId: ID-IT-D-FQR815J-56524-1352809143728-0-1 on ExchangeId:
> >> ID-IT-D-FQR815J-56524-1352809143728-0-2). Exhausted after delivery
> attempt:
> >> 1 caught: org.apache.camel.RuntimeExpressionException: Cannot create
> xpath
> >> expression. Processed by failure processor:
> >>
> FatalFallbackErrorHandler[Channel[Wrap[se.digia.connect.service.fundorder.FundOrderService$NotificationProcessor@7a587427
> ]
> >> ->
> >>
> se.digia.connect.service.fundorder.FundOrderService$NotificationProcessor@7a587427
> >> ]]*
> >> *org.apache.camel.RuntimeExpressionException: Cannot create xpath
> expression
> >> *
> >> * at
> >>
> org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:689)[114:org.apache.camel.camel-core:2.10.2]
> >> *
> >> *...*
> >> * at java.lang.Thread.run(Thread.java:662)[:1.6.0_32]*
> >> *Caused by: java.lang.RuntimeException: XPathFactory#newInstance()
> failed
> >> to create an XPathFactory for the default object model:
> >> http://java.sun.com/jaxp/xpath/dom with the
> >> XPathFactoryConfigurationException:
> >> javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory
> >> implementation found for the object model:
> >> http://java.sun.com/jaxp/xpath/dom*
> >> * at javax.xml.xpath.XPathFactory.newInstance(Unknown Source)[:2.1.0]*
> >> * at
> >>
> org.apache.camel.builder.xml.XPathBuilder.initDefaultXPathFactory(XPathBuilder.java:1046)[114:org.apache.camel.camel-core:2.10.2]
> >> *
> >> * at
> >>
> org.apache.camel.builder.xml.XPathBuilder.getXPathFactory(XPathBuilder.java:424)[114:org.apache.camel.camel-core:2.10.2]
> >> *
> >> * at
> >>
> org.apache.camel.builder.xml.XPathBuilder.createXPathExpression(XPathBuilder.java:829)[114:org.apache.camel.camel-core:2.10.2]
> >> *
> >> * at
> >>
> org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:685)[114:org.apache.camel.camel-core:2.10.2]
> >> *
> >> * ... 44 more*
> >>
> >> I have also posted a question regarding this on the Karaf mailing list
> to
> >> find out what xpath implementation should be used on Karaf (and how).
> >>
> >> However, looking at the Camel documentation, it seems like I can choose
> to
> >> use the Saxon implementation of xpath. So, I added camel-saxon as a
> >> dependency to my project.
> >>
> >> But, then I can't build because maven cannot find the artifact
> >> net.sf.saxon/saxon9he/9.3.0.11. I've searched maven central and it's
> not
> >> there. Do I have to configure any other repositories than maven central?
> >> *
> >> *
> >> */Bengt*
> >
> >
> >
> > --
> > Claus Ibsen
> > -
> > Red Hat, Inc.
> > FuseSource is now part of Red Hat
> > Email: cib...@redhat.com
> > Web: http://fusesource.com
> > Twitter: davsclaus
> > Blog: http://davsclaus.com
> > Author of Camel in Action: http://www.manning.com/ibsen
>
>
>
> --
> Claus Ibsen
> -
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cib...@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>


Re: Saxon and saxon9he

2012-11-13 Thread Claus Ibsen
On Tue, Nov 13, 2012 at 3:22 PM, Bengt Rodehav  wrote:
> Thanks Claus.
>
> You don't happen to know anything about using Camel's xpath language within
> Karaf? Should it be possible without resorting to Saxon? I couldn't see any
> osgi tests regarding this.
>

Maybe try using the cxf.jre.properties from the 2.2.x Karaf releases,
or the one from SMX.
They have been prepared for XML stuff.

Its usually something with those packages which should either be
exporter or not.


> /Bengt
>
>
> 2012/11/13 Claus Ibsen 
>
>> Though there is a SMX bundle as well
>>
>> http://repo2.maven.org/maven2/org/apache/servicemix/bundles/org.apache.servicemix.bundles.saxon/9.4.0.4_1/
>>
>> The problem is that the SMX bundle doesn't contain all the files that
>> the official JAR has. Its approx 9mb and the SMX bundle is much
>> smaller.
>>
>> Though don't know what may or may not work in OSGi land then due the
>> left out stuff.
>>
>>
>> On Tue, Nov 13, 2012 at 3:02 PM, Claus Ibsen 
>> wrote:
>> > The JAR is in SMX repo at
>> > http://svn.apache.org/repos/asf/servicemix/m2-repo
>> >
>> > On Tue, Nov 13, 2012 at 2:39 PM, Bengt Rodehav 
>> wrote:
>> >> I'm using Camel 2.10.2 on Karaf 2.3.0.
>> >>
>> >> I'm trying to use xpath but I get the following exception:
>> >>
>> >> *2012-11-13 13:20:38,307 | ERROR | rfaces/fundorder |
>> DefaultErrorHandler
>> >>| rg.apache.camel.util.CamelLogger  215 | Failed delivery for
>> >> (MessageId: ID-IT-D-FQR815J-56524-1352809143728-0-1 on ExchangeId:
>> >> ID-IT-D-FQR815J-56524-1352809143728-0-2). Exhausted after delivery
>> attempt:
>> >> 1 caught: org.apache.camel.RuntimeExpressionException: Cannot create
>> xpath
>> >> expression. Processed by failure processor:
>> >>
>> FatalFallbackErrorHandler[Channel[Wrap[se.digia.connect.service.fundorder.FundOrderService$NotificationProcessor@7a587427
>> ]
>> >> ->
>> >>
>> se.digia.connect.service.fundorder.FundOrderService$NotificationProcessor@7a587427
>> >> ]]*
>> >> *org.apache.camel.RuntimeExpressionException: Cannot create xpath
>> expression
>> >> *
>> >> * at
>> >>
>> org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:689)[114:org.apache.camel.camel-core:2.10.2]
>> >> *
>> >> *...*
>> >> * at java.lang.Thread.run(Thread.java:662)[:1.6.0_32]*
>> >> *Caused by: java.lang.RuntimeException: XPathFactory#newInstance()
>> failed
>> >> to create an XPathFactory for the default object model:
>> >> http://java.sun.com/jaxp/xpath/dom with the
>> >> XPathFactoryConfigurationException:
>> >> javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory
>> >> implementation found for the object model:
>> >> http://java.sun.com/jaxp/xpath/dom*
>> >> * at javax.xml.xpath.XPathFactory.newInstance(Unknown Source)[:2.1.0]*
>> >> * at
>> >>
>> org.apache.camel.builder.xml.XPathBuilder.initDefaultXPathFactory(XPathBuilder.java:1046)[114:org.apache.camel.camel-core:2.10.2]
>> >> *
>> >> * at
>> >>
>> org.apache.camel.builder.xml.XPathBuilder.getXPathFactory(XPathBuilder.java:424)[114:org.apache.camel.camel-core:2.10.2]
>> >> *
>> >> * at
>> >>
>> org.apache.camel.builder.xml.XPathBuilder.createXPathExpression(XPathBuilder.java:829)[114:org.apache.camel.camel-core:2.10.2]
>> >> *
>> >> * at
>> >>
>> org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:685)[114:org.apache.camel.camel-core:2.10.2]
>> >> *
>> >> * ... 44 more*
>> >>
>> >> I have also posted a question regarding this on the Karaf mailing list
>> to
>> >> find out what xpath implementation should be used on Karaf (and how).
>> >>
>> >> However, looking at the Camel documentation, it seems like I can choose
>> to
>> >> use the Saxon implementation of xpath. So, I added camel-saxon as a
>> >> dependency to my project.
>> >>
>> >> But, then I can't build because maven cannot find the artifact
>> >> net.sf.saxon/saxon9he/9.3.0.11. I've searched maven central and it's
>> not
>> >> there. Do I have to configure any other repositories than maven central?
>> >> *
>> >> *
>> >> */Bengt*
>> >
>> >
>> >
>> > --
>> > Claus Ibsen
>> > -
>> > Red Hat, Inc.
>> > FuseSource is now part of Red Hat
>> > Email: cib...@redhat.com
>> > Web: http://fusesource.com
>> > Twitter: davsclaus
>> > Blog: http://davsclaus.com
>> > Author of Camel in Action: http://www.manning.com/ibsen
>>
>>
>>
>> --
>> Claus Ibsen
>> -
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Email: cib...@redhat.com
>> Web: http://fusesource.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>



-- 
Claus Ibsen
-
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Saxon and saxon9he

2012-11-13 Thread Bengt Rodehav
OK - thanks for the hint,

/Bengt


2012/11/13 Claus Ibsen 

> On Tue, Nov 13, 2012 at 3:22 PM, Bengt Rodehav  wrote:
> > Thanks Claus.
> >
> > You don't happen to know anything about using Camel's xpath language
> within
> > Karaf? Should it be possible without resorting to Saxon? I couldn't see
> any
> > osgi tests regarding this.
> >
>
> Maybe try using the cxf.jre.properties from the 2.2.x Karaf releases,
> or the one from SMX.
> They have been prepared for XML stuff.
>
> Its usually something with those packages which should either be
> exporter or not.
>
>
> > /Bengt
> >
> >
> > 2012/11/13 Claus Ibsen 
> >
> >> Though there is a SMX bundle as well
> >>
> >>
> http://repo2.maven.org/maven2/org/apache/servicemix/bundles/org.apache.servicemix.bundles.saxon/9.4.0.4_1/
> >>
> >> The problem is that the SMX bundle doesn't contain all the files that
> >> the official JAR has. Its approx 9mb and the SMX bundle is much
> >> smaller.
> >>
> >> Though don't know what may or may not work in OSGi land then due the
> >> left out stuff.
> >>
> >>
> >> On Tue, Nov 13, 2012 at 3:02 PM, Claus Ibsen 
> >> wrote:
> >> > The JAR is in SMX repo at
> >> > http://svn.apache.org/repos/asf/servicemix/m2-repo
> >> >
> >> > On Tue, Nov 13, 2012 at 2:39 PM, Bengt Rodehav 
> >> wrote:
> >> >> I'm using Camel 2.10.2 on Karaf 2.3.0.
> >> >>
> >> >> I'm trying to use xpath but I get the following exception:
> >> >>
> >> >> *2012-11-13 13:20:38,307 | ERROR | rfaces/fundorder |
> >> DefaultErrorHandler
> >> >>| rg.apache.camel.util.CamelLogger  215 | Failed delivery
> for
> >> >> (MessageId: ID-IT-D-FQR815J-56524-1352809143728-0-1 on ExchangeId:
> >> >> ID-IT-D-FQR815J-56524-1352809143728-0-2). Exhausted after delivery
> >> attempt:
> >> >> 1 caught: org.apache.camel.RuntimeExpressionException: Cannot create
> >> xpath
> >> >> expression. Processed by failure processor:
> >> >>
> >>
> FatalFallbackErrorHandler[Channel[Wrap[se.digia.connect.service.fundorder.FundOrderService$NotificationProcessor@7a587427
> >> ]
> >> >> ->
> >> >>
> >>
> se.digia.connect.service.fundorder.FundOrderService$NotificationProcessor@7a587427
> >> >> ]]*
> >> >> *org.apache.camel.RuntimeExpressionException: Cannot create xpath
> >> expression
> >> >> *
> >> >> * at
> >> >>
> >>
> org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:689)[114:org.apache.camel.camel-core:2.10.2]
> >> >> *
> >> >> *...*
> >> >> * at java.lang.Thread.run(Thread.java:662)[:1.6.0_32]*
> >> >> *Caused by: java.lang.RuntimeException: XPathFactory#newInstance()
> >> failed
> >> >> to create an XPathFactory for the default object model:
> >> >> http://java.sun.com/jaxp/xpath/dom with the
> >> >> XPathFactoryConfigurationException:
> >> >> javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory
> >> >> implementation found for the object model:
> >> >> http://java.sun.com/jaxp/xpath/dom*
> >> >> * at javax.xml.xpath.XPathFactory.newInstance(Unknown
> Source)[:2.1.0]*
> >> >> * at
> >> >>
> >>
> org.apache.camel.builder.xml.XPathBuilder.initDefaultXPathFactory(XPathBuilder.java:1046)[114:org.apache.camel.camel-core:2.10.2]
> >> >> *
> >> >> * at
> >> >>
> >>
> org.apache.camel.builder.xml.XPathBuilder.getXPathFactory(XPathBuilder.java:424)[114:org.apache.camel.camel-core:2.10.2]
> >> >> *
> >> >> * at
> >> >>
> >>
> org.apache.camel.builder.xml.XPathBuilder.createXPathExpression(XPathBuilder.java:829)[114:org.apache.camel.camel-core:2.10.2]
> >> >> *
> >> >> * at
> >> >>
> >>
> org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:685)[114:org.apache.camel.camel-core:2.10.2]
> >> >> *
> >> >> * ... 44 more*
> >> >>
> >> >> I have also posted a question regarding this on the Karaf mailing
> list
> >> to
> >> >> find out what xpath implementation should be used on Karaf (and how).
> >> >>
> >> >> However, looking at the Camel documentation, it seems like I can
> choose
> >> to
> >> >> use the Saxon implementation of xpath. So, I added camel-saxon as a
> >> >> dependency to my project.
> >> >>
> >> >> But, then I can't build because maven cannot find the artifact
> >> >> net.sf.saxon/saxon9he/9.3.0.11. I've searched maven central and it's
> >> not
> >> >> there. Do I have to configure any other repositories than maven
> central?
> >> >> *
> >> >> *
> >> >> */Bengt*
> >> >
> >> >
> >> >
> >> > --
> >> > Claus Ibsen
> >> > -
> >> > Red Hat, Inc.
> >> > FuseSource is now part of Red Hat
> >> > Email: cib...@redhat.com
> >> > Web: http://fusesource.com
> >> > Twitter: davsclaus
> >> > Blog: http://davsclaus.com
> >> > Author of Camel in Action: http://www.manning.com/ibsen
> >>
> >>
> >>
> >> --
> >> Claus Ibsen
> >> -
> >> Red Hat, Inc.
> >> FuseSource is now part of Red Hat
> >> Email: cib...@redhat.com
> >> Web: http://fusesource.com
> >> Twitter: davsclaus
> >> Blog: http://davsclaus.com
> >> Author of Camel in Action: http://www.manning.com/ibsen
> >>
>
>
>
> --
> Claus Ibsen
> -
> Red 

Re: Saxon and saxon9he

2012-11-13 Thread Claus Ibsen
Hi Bengt

Please keep us posted with your findings. There may be something we
need to fix / do / document to make this easier / work.

On Tue, Nov 13, 2012 at 3:38 PM, Bengt Rodehav  wrote:
> OK - thanks for the hint,
>
> /Bengt
>
>
> 2012/11/13 Claus Ibsen 
>
>> On Tue, Nov 13, 2012 at 3:22 PM, Bengt Rodehav  wrote:
>> > Thanks Claus.
>> >
>> > You don't happen to know anything about using Camel's xpath language
>> within
>> > Karaf? Should it be possible without resorting to Saxon? I couldn't see
>> any
>> > osgi tests regarding this.
>> >
>>
>> Maybe try using the cxf.jre.properties from the 2.2.x Karaf releases,
>> or the one from SMX.
>> They have been prepared for XML stuff.
>>
>> Its usually something with those packages which should either be
>> exporter or not.
>>
>>
>> > /Bengt
>> >
>> >
>> > 2012/11/13 Claus Ibsen 
>> >
>> >> Though there is a SMX bundle as well
>> >>
>> >>
>> http://repo2.maven.org/maven2/org/apache/servicemix/bundles/org.apache.servicemix.bundles.saxon/9.4.0.4_1/
>> >>
>> >> The problem is that the SMX bundle doesn't contain all the files that
>> >> the official JAR has. Its approx 9mb and the SMX bundle is much
>> >> smaller.
>> >>
>> >> Though don't know what may or may not work in OSGi land then due the
>> >> left out stuff.
>> >>
>> >>
>> >> On Tue, Nov 13, 2012 at 3:02 PM, Claus Ibsen 
>> >> wrote:
>> >> > The JAR is in SMX repo at
>> >> > http://svn.apache.org/repos/asf/servicemix/m2-repo
>> >> >
>> >> > On Tue, Nov 13, 2012 at 2:39 PM, Bengt Rodehav 
>> >> wrote:
>> >> >> I'm using Camel 2.10.2 on Karaf 2.3.0.
>> >> >>
>> >> >> I'm trying to use xpath but I get the following exception:
>> >> >>
>> >> >> *2012-11-13 13:20:38,307 | ERROR | rfaces/fundorder |
>> >> DefaultErrorHandler
>> >> >>| rg.apache.camel.util.CamelLogger  215 | Failed delivery
>> for
>> >> >> (MessageId: ID-IT-D-FQR815J-56524-1352809143728-0-1 on ExchangeId:
>> >> >> ID-IT-D-FQR815J-56524-1352809143728-0-2). Exhausted after delivery
>> >> attempt:
>> >> >> 1 caught: org.apache.camel.RuntimeExpressionException: Cannot create
>> >> xpath
>> >> >> expression. Processed by failure processor:
>> >> >>
>> >>
>> FatalFallbackErrorHandler[Channel[Wrap[se.digia.connect.service.fundorder.FundOrderService$NotificationProcessor@7a587427
>> >> ]
>> >> >> ->
>> >> >>
>> >>
>> se.digia.connect.service.fundorder.FundOrderService$NotificationProcessor@7a587427
>> >> >> ]]*
>> >> >> *org.apache.camel.RuntimeExpressionException: Cannot create xpath
>> >> expression
>> >> >> *
>> >> >> * at
>> >> >>
>> >>
>> org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:689)[114:org.apache.camel.camel-core:2.10.2]
>> >> >> *
>> >> >> *...*
>> >> >> * at java.lang.Thread.run(Thread.java:662)[:1.6.0_32]*
>> >> >> *Caused by: java.lang.RuntimeException: XPathFactory#newInstance()
>> >> failed
>> >> >> to create an XPathFactory for the default object model:
>> >> >> http://java.sun.com/jaxp/xpath/dom with the
>> >> >> XPathFactoryConfigurationException:
>> >> >> javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory
>> >> >> implementation found for the object model:
>> >> >> http://java.sun.com/jaxp/xpath/dom*
>> >> >> * at javax.xml.xpath.XPathFactory.newInstance(Unknown
>> Source)[:2.1.0]*
>> >> >> * at
>> >> >>
>> >>
>> org.apache.camel.builder.xml.XPathBuilder.initDefaultXPathFactory(XPathBuilder.java:1046)[114:org.apache.camel.camel-core:2.10.2]
>> >> >> *
>> >> >> * at
>> >> >>
>> >>
>> org.apache.camel.builder.xml.XPathBuilder.getXPathFactory(XPathBuilder.java:424)[114:org.apache.camel.camel-core:2.10.2]
>> >> >> *
>> >> >> * at
>> >> >>
>> >>
>> org.apache.camel.builder.xml.XPathBuilder.createXPathExpression(XPathBuilder.java:829)[114:org.apache.camel.camel-core:2.10.2]
>> >> >> *
>> >> >> * at
>> >> >>
>> >>
>> org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:685)[114:org.apache.camel.camel-core:2.10.2]
>> >> >> *
>> >> >> * ... 44 more*
>> >> >>
>> >> >> I have also posted a question regarding this on the Karaf mailing
>> list
>> >> to
>> >> >> find out what xpath implementation should be used on Karaf (and how).
>> >> >>
>> >> >> However, looking at the Camel documentation, it seems like I can
>> choose
>> >> to
>> >> >> use the Saxon implementation of xpath. So, I added camel-saxon as a
>> >> >> dependency to my project.
>> >> >>
>> >> >> But, then I can't build because maven cannot find the artifact
>> >> >> net.sf.saxon/saxon9he/9.3.0.11. I've searched maven central and it's
>> >> not
>> >> >> there. Do I have to configure any other repositories than maven
>> central?
>> >> >> *
>> >> >> *
>> >> >> */Bengt*
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Claus Ibsen
>> >> > -
>> >> > Red Hat, Inc.
>> >> > FuseSource is now part of Red Hat
>> >> > Email: cib...@redhat.com
>> >> > Web: http://fusesource.com
>> >> > Twitter: davsclaus
>> >> > Blog: http://davsclaus.com
>> >> > Author of Camel in Action: http://www.manning.com/ibsen
>> >>
>> >>
>> >

Transacting two web services - EIP?

2012-11-13 Thread dunnlow
Hello, I am using camel 2.9 and Spring 3.  I have a transacted route in which
I am pulling messages from a queue (activemq) and sending messages to two
web services (via multicast).  The web services are notification services
that send messages to users (there is no real roll back strategy - once the
notification is sent, it is sent).  When I only needed to send to one
service, things worked fine; if the service couldn't be reached for some
reason, then the transacted route would keep resending until successful.  

The problem came up once I added a second web service.  Now if one web
service fails, the retry goes back to both services so the working services
keeps sending out notifications until the one that isn't working gets fixed. 
Obviously, I'd like ONLY the broken service to keep retrying (pulling the
one that worked out of the transaction).

Is there a good/standard way to handle this in camel?  (Obviously I can
handle it myself outside camel, but am hoping for a camel/spring specific
solution)

Thanks for any ideas,
-J



--
View this message in context: 
http://camel.465427.n5.nabble.com/Transacting-two-web-services-EIP-tp5722673.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Saxon and saxon9he

2012-11-13 Thread Bengt Rodehav
Will do.


2012/11/13 Claus Ibsen 

> Hi Bengt
>
> Please keep us posted with your findings. There may be something we
> need to fix / do / document to make this easier / work.
>
> On Tue, Nov 13, 2012 at 3:38 PM, Bengt Rodehav  wrote:
> > OK - thanks for the hint,
> >
> > /Bengt
> >
> >
> > 2012/11/13 Claus Ibsen 
> >
> >> On Tue, Nov 13, 2012 at 3:22 PM, Bengt Rodehav 
> wrote:
> >> > Thanks Claus.
> >> >
> >> > You don't happen to know anything about using Camel's xpath language
> >> within
> >> > Karaf? Should it be possible without resorting to Saxon? I couldn't
> see
> >> any
> >> > osgi tests regarding this.
> >> >
> >>
> >> Maybe try using the cxf.jre.properties from the 2.2.x Karaf releases,
> >> or the one from SMX.
> >> They have been prepared for XML stuff.
> >>
> >> Its usually something with those packages which should either be
> >> exporter or not.
> >>
> >>
> >> > /Bengt
> >> >
> >> >
> >> > 2012/11/13 Claus Ibsen 
> >> >
> >> >> Though there is a SMX bundle as well
> >> >>
> >> >>
> >>
> http://repo2.maven.org/maven2/org/apache/servicemix/bundles/org.apache.servicemix.bundles.saxon/9.4.0.4_1/
> >> >>
> >> >> The problem is that the SMX bundle doesn't contain all the files that
> >> >> the official JAR has. Its approx 9mb and the SMX bundle is much
> >> >> smaller.
> >> >>
> >> >> Though don't know what may or may not work in OSGi land then due the
> >> >> left out stuff.
> >> >>
> >> >>
> >> >> On Tue, Nov 13, 2012 at 3:02 PM, Claus Ibsen 
> >> >> wrote:
> >> >> > The JAR is in SMX repo at
> >> >> > http://svn.apache.org/repos/asf/servicemix/m2-repo
> >> >> >
> >> >> > On Tue, Nov 13, 2012 at 2:39 PM, Bengt Rodehav 
> >> >> wrote:
> >> >> >> I'm using Camel 2.10.2 on Karaf 2.3.0.
> >> >> >>
> >> >> >> I'm trying to use xpath but I get the following exception:
> >> >> >>
> >> >> >> *2012-11-13 13:20:38,307 | ERROR | rfaces/fundorder |
> >> >> DefaultErrorHandler
> >> >> >>| rg.apache.camel.util.CamelLogger  215 | Failed
> delivery
> >> for
> >> >> >> (MessageId: ID-IT-D-FQR815J-56524-1352809143728-0-1 on ExchangeId:
> >> >> >> ID-IT-D-FQR815J-56524-1352809143728-0-2). Exhausted after delivery
> >> >> attempt:
> >> >> >> 1 caught: org.apache.camel.RuntimeExpressionException: Cannot
> create
> >> >> xpath
> >> >> >> expression. Processed by failure processor:
> >> >> >>
> >> >>
> >>
> FatalFallbackErrorHandler[Channel[Wrap[se.digia.connect.service.fundorder.FundOrderService$NotificationProcessor@7a587427
> >> >> ]
> >> >> >> ->
> >> >> >>
> >> >>
> >>
> se.digia.connect.service.fundorder.FundOrderService$NotificationProcessor@7a587427
> >> >> >> ]]*
> >> >> >> *org.apache.camel.RuntimeExpressionException: Cannot create xpath
> >> >> expression
> >> >> >> *
> >> >> >> * at
> >> >> >>
> >> >>
> >>
> org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:689)[114:org.apache.camel.camel-core:2.10.2]
> >> >> >> *
> >> >> >> *...*
> >> >> >> * at java.lang.Thread.run(Thread.java:662)[:1.6.0_32]*
> >> >> >> *Caused by: java.lang.RuntimeException: XPathFactory#newInstance()
> >> >> failed
> >> >> >> to create an XPathFactory for the default object model:
> >> >> >> http://java.sun.com/jaxp/xpath/dom with the
> >> >> >> XPathFactoryConfigurationException:
> >> >> >> javax.xml.xpath.XPathFactoryConfigurationException: No XPathFctory
> >> >> >> implementation found for the object model:
> >> >> >> http://java.sun.com/jaxp/xpath/dom*
> >> >> >> * at javax.xml.xpath.XPathFactory.newInstance(Unknown
> >> Source)[:2.1.0]*
> >> >> >> * at
> >> >> >>
> >> >>
> >>
> org.apache.camel.builder.xml.XPathBuilder.initDefaultXPathFactory(XPathBuilder.java:1046)[114:org.apache.camel.camel-core:2.10.2]
> >> >> >> *
> >> >> >> * at
> >> >> >>
> >> >>
> >>
> org.apache.camel.builder.xml.XPathBuilder.getXPathFactory(XPathBuilder.java:424)[114:org.apache.camel.camel-core:2.10.2]
> >> >> >> *
> >> >> >> * at
> >> >> >>
> >> >>
> >>
> org.apache.camel.builder.xml.XPathBuilder.createXPathExpression(XPathBuilder.java:829)[114:org.apache.camel.camel-core:2.10.2]
> >> >> >> *
> >> >> >> * at
> >> >> >>
> >> >>
> >>
> org.apache.camel.builder.xml.XPathBuilder.evaluateAs(XPathBuilder.java:685)[114:org.apache.camel.camel-core:2.10.2]
> >> >> >> *
> >> >> >> * ... 44 more*
> >> >> >>
> >> >> >> I have also posted a question regarding this on the Karaf mailing
> >> list
> >> >> to
> >> >> >> find out what xpath implementation should be used on Karaf (and
> how).
> >> >> >>
> >> >> >> However, looking at the Camel documentation, it seems like I can
> >> choose
> >> >> to
> >> >> >> use the Saxon implementation of xpath. So, I added camel-saxon as
> a
> >> >> >> dependency to my project.
> >> >> >>
> >> >> >> But, then I can't build because maven cannot find the artifact
> >> >> >> net.sf.saxon/saxon9he/9.3.0.11. I've searched maven central and
> it's
> >> >> not
> >> >> >> there. Do I have to configure any other repositories than maven
> >> central?
> >> >> >> *
> >> >> >> *
> >> >> >> */Bengt*
> >> >> >
>

RE: Transacting two web services - EIP?

2012-11-13 Thread Ramkumar.Iyer
I am not getting your question. Are both webservices part of a single 
transaction ? I.e do you have one from clause and two to clauses? I am new to 
Camel. Hope below helps

Have you looked at http://camel.apache.org/transactionerrorhandler.html
And its features?

As the TransactionErrorHandler also supports to let Camel do redeliveries you 
can use both worlds. Letting Camel do some redeliveries and at the end the 
backing transaction manager doing other redeliveries. In fact in the end the 
transaction manager have the final word. That means if Camel cannot process the 
exchange then its thrown back to the transaction manager that will perform the 
rollback, and redelivery

Example with using Camel to do redeliveries:
In the route below we have configured a transaction error handler. It will by 
default do local redeliveries up till 6 times. In Case Camel could not 
redeliver the message it will be thrown back to the transaction manager that 
will do a rollback, and a redelivery if it was configured to do so.
Notice that as we have all the powers from DefaultErrorHandler we can configure 
an onException where we state that in case of this particular exception, an 
IllegalArgumentException we will only do redeliveries up till 4 times. (Yes the 
code is based on an unit test).
And also notice that we mark the routes as transacted using transacted. This is 
always needed to instruct Camel that these routes are transacted.
If you do not provide any Spring TransactionTemplate to either the 
transactionErrorHandler, then Camel will automatic lookup in the Spring 
application context for a transaction manager to use. See more in the 
Convention over configuration section on this page.

-Original Message-
From: dunnlow [mailto:dunn...@yahoo.com]
Sent: Tuesday, November 13, 2012 10:05 PM
To: users@camel.apache.org
Subject: Transacting two web services - EIP?

Hello, I am using camel 2.9 and Spring 3.  I have a transacted route in which
I am pulling messages from a queue (activemq) and sending messages to two
web services (via multicast).  The web services are notification services
that send messages to users (there is no real roll back strategy - once the
notification is sent, it is sent).  When I only needed to send to one
service, things worked fine; if the service couldn't be reached for some
reason, then the transacted route would keep resending until successful.

The problem came up once I added a second web service.  Now if one web
service fails, the retry goes back to both services so the working services
keeps sending out notifications until the one that isn't working gets fixed.
Obviously, I'd like ONLY the broken service to keep retrying (pulling the
one that worked out of the transaction).

Is there a good/standard way to handle this in camel?  (Obviously I can
handle it myself outside camel, but am hoping for a camel/spring specific
solution)

Thanks for any ideas,
-J



--
View this message in context: 
http://camel.465427.n5.nabble.com/Transacting-two-web-services-EIP-tp5722673.html
Sent from the Camel - Users mailing list archive at Nabble.com.
This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
If you are not the intended recipient(s), please reply to the sender and 
destroy all copies of the original message. Any unauthorized review, use, 
disclosure, dissemination, forwarding, printing or copying of this email, 
and/or any action taken in reliance on the contents of this e-mail is strictly 
prohibited and may be unlawful.


Re: Transacting two web services - EIP?

2012-11-13 Thread Christian Müller
If you use the Camel, you can configure the error handler to redeliver your
message. The good is, Camel will only redeliver the failed endpoint. The
bad is, the redelivery is done in memory.
But if you use the TransactionalErrorHandler (which supports redelivery)
you can make sure you will not lose the message, if some one kill your
running process while redelivering.

Best,
Christian

On Tue, Nov 13, 2012 at 5:35 PM, dunnlow  wrote:

> Hello, I am using camel 2.9 and Spring 3.  I have a transacted route in
> which
> I am pulling messages from a queue (activemq) and sending messages to two
> web services (via multicast).  The web services are notification services
> that send messages to users (there is no real roll back strategy - once the
> notification is sent, it is sent).  When I only needed to send to one
> service, things worked fine; if the service couldn't be reached for some
> reason, then the transacted route would keep resending until successful.
>
> The problem came up once I added a second web service.  Now if one web
> service fails, the retry goes back to both services so the working services
> keeps sending out notifications until the one that isn't working gets
> fixed.
> Obviously, I'd like ONLY the broken service to keep retrying (pulling the
> one that worked out of the transaction).
>
> Is there a good/standard way to handle this in camel?  (Obviously I can
> handle it myself outside camel, but am hoping for a camel/spring specific
> solution)
>
> Thanks for any ideas,
> -J
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Transacting-two-web-services-EIP-tp5722673.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--


Re: Transacting two web services - EIP?

2012-11-13 Thread Donald Whytock
On Tue, Nov 13, 2012 at 11:35 AM, dunnlow  wrote:
> Hello, I am using camel 2.9 and Spring 3.  I have a transacted route in which
> I am pulling messages from a queue (activemq) and sending messages to two
> web services (via multicast).  The web services are notification services
> that send messages to users (there is no real roll back strategy - once the
> notification is sent, it is sent).  When I only needed to send to one
> service, things worked fine; if the service couldn't be reached for some
> reason, then the transacted route would keep resending until successful.
>
> The problem came up once I added a second web service.  Now if one web
> service fails, the retry goes back to both services so the working services
> keeps sending out notifications until the one that isn't working gets fixed.
> Obviously, I'd like ONLY the broken service to keep retrying (pulling the
> one that worked out of the transaction).
>
> Is there a good/standard way to handle this in camel?  (Obviously I can
> handle it myself outside camel, but am hoping for a camel/spring specific
> solution)
>
> Thanks for any ideas,
> -J

Since you're resigned to the idea of the message going out to one
endpoint even if the other endpoint is stuck in retry, it doesn't
sound much like a "transaction" situation.  In that case, what if you
multicast the message to the two endpoints independently, or to two
queues, each of which feeds one of the endpoints?  That way at least
the retries aren't needlessly replicating the properly working
endpoint.

Don


Re: MINA Serial - what route syntax and how to install ?

2012-11-13 Thread Christian Müller
Hello Peter!

I regret to see you upset.
Please find my notes inline in your mail.

Best,
Christian

On Tue, Nov 13, 2012 at 9:52 AM, c031917 wrote:

> This is very bad news. I had asked about mina2 availability in Dec. 2011
> and
> May 2012.
> In May Claus Ibsen stated that mina2 would be in camel 2.10.
>
As Claus wrote, the camel-mina2 component is available in Camel 2.10.x, but
we/I prefer to call this version "in development" because:
- there is no documentation at present
- we may change a few things until Camel 2.11.0
- doesn't support all protocols (like serial)
- ...


> In the meantime I had to use an ugly python workaround to get serial data
> and post it via STOMP.
>
What prevents you to use a processor/bean and use the mina 2.x API directly
to achieve your needs? An ugly workaround may is not really necessary.


>
> I was happy that mina2 was mentionend in version 2.10 release notes.
>
It's available - may not as stable as our other Camel components.


>
> Now there is suddenly a hint : "camel-mina2 - camel-mina2 is expected to be
> refactored in Camel 2.11, so use on own risk of having to migrate".
>
> It is really difficult to plan a real world camel pilot project when
> deadlines on component availability are changed so short-noticed.
>
Sorry for this. This happens not really often. Maybe this is the first
time...
And as Claus said, most of the committer work in their spare time on this
project, e.g. from 8:00 PM to 11:00 PM in the evening on some days and at
the weekends. And sometimes we cannot spend as much time as we would like
because of the family, kids, sports, friends, business, ... And there are
other JIRA's we are working on...


>
> I would like to contribute but I'm probably not in a position to do that
> beyond perhaps trying and testing things.
>
http://camel.apache.org/contributing.html
http://camel.apache.org/building.html
http://camel.apache.org/faq.html
http://camel.apache.org/mailing-lists.html
You will get help here if you have a concrete question...


>
> There is a big grey area between using Camel (thus understanding all the
> details of "Camel in Action") and
> really contributing. In my role as architect and technology scout the depth
> of the programming facette is not strong enough. I'm always wondering how
> people in all those Open Source projects got this incredible deep
> knowledge,
> this is really admirable.
>
Maybe because it's Open Source and they can dig into the code...

>
> I will rais a Jira (my first one...) and enter the hold pattern.
>
Try to contribute and open a JIRA to express your need to have a
camel-mina2 component which supports the serial protocol:
https://issues.apache.org/jira/browse/CAMEL

And did you already checked out the code of the camel-mina2 component?
Maybe it's less complicated to provide a patch than you expect...


> Peter
>
>
>
> Christian Mueller wrote
> > The camel-mina2 component will be official released in Camel 2.11.0. At
> > present, we do not support the serial connector as described at [1] (as
> > far
> > as I know).
> > Feel free to rais a JIRA at [2] so that we don't forget this. And as you
> > may know, we love contributions. You can find more about how to
> contribute
> > at [3] and [4].
> >
> > The camel-mina component is using Mina 1.x and it's not what you are
> > looking for.
> >
> > [1] http://mina.apache.org/serial-tutorial.html
> > [2] https://issues.apache.org/jira/browse/CAMEL
> > [3] http://camel.apache.org/contributing.html
> > [4] http://camel.apache.org/building.html
> >
> > Best,
> > Christian
> >
> > On Wed, Nov 7, 2012 at 11:09 AM, c031917 <
>
> > peter.marx@
>
> > >wrote:
> >
> >> I want to use the long awaited Camel + MINA 2 capability to get serial
> >> data
> >> onto the message bus.
> >>
> >> I can't find any documentation or example how to do that.
> >>
> >> What is the syntax ?  something like
> >>
> >> from ("mina:*/dev/ttyUSB0*:")
> >>.to("jms:operations");
> >>
> >> ?
> >>
> >> 2. question: how do i install
> >>
> >> camel-mina
> >> mina-transport-serial-2.0.2.jar
> >> RXTXcomm.jar
> >> librxtxSerial.so
> >>
> >> correctly without maven so that Camel is happy ?
> >>
> >> I put the last two into jre/lib/i386 and jre/lib/ext according and hope
> >> this
> >> is also right for camel-mina.
> >>
> >>
> >> Peter
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://camel.465427.n5.nabble.com/MINA-Serial-what-route-syntax-and-how-to-install-tp5722293.html
> >> Sent from the Camel - Users mailing list archive at Nabble.com.
> >>
> >
> >
> >
> > --
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/MINA-Serial-what-route-syntax-and-how-to-install-tp5722293p5722640.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--


JMS to Secured Spring Method with PreAuthorize annotation

2012-11-13 Thread john.mo...@kronos.com
I have an existing Spring MVC application which has @PreAuthorize annotations
on the business services.  I would like to add the ability for a
client/system to send JMS Messages which, in-turn, calls methods on those
secured spring beans.   /FYI, without the @PreAuthorize annotation the
call's work seamlessly./
 
Reading the Camel Wiki on Spring-Security
(http://camel.apache.org/spring-security.html), it looks like I should be
able to put a spring authentication token wrapped as a Subject principal
into the Exchange.AUTHENTICATION Header and send it over the wire.  
However, I get the error 
"org.springframework.security.authentication.AuthenticationCredentialsNotFoundException:
An Authentication object was not found in the SecurityContext".  

I had implemented an AuthenticationAdapter expecting to see calls to convert
from Subject back to Authentication objects.   Obviously, the Authentication
object is not put back into a security context, nor was any additional
authentication logic called off to.

Since that didn't prove useful, I decided to wrap the "camel:to" with a
"camel:policy" as described in the spring-security section in hopes it would
yield some better results (even though I don't want to apply policies to
routes).   I then received an error from the
SpringSecurityAuthorizationPolicy.  Digging into it, it shows that there is
not an instance of the Subject class in the headers.  

Given that information, I tried adding custom filter header strategies after
observing that the  JMSHeaderFilterStrategy was being used, which  doesn't
look like it will include the needed Subject header; still with no luck.  

After a lot of time putting the strategies on combinations of sending and
receiving ends of  the queue with no success, I decided I had to look for 
help and determine if maybe the concept was flawed or there was even a path
to my solution.

So, I ask, should this concept work?  If so, what's the missing-link that's
needed to make this work?  

Here are the versions from my POM.
3.1.2.RELEASE
3.1.2.RELEASE

2.1.3.RELEASE
2.1.1.RELEASE-SNAPSHOT
4.1.4.Final
1.7.0
5.6.0
2.10.2
3.11.1
1.6.6

And since everyone likes code and configuration...

*INTERFACE*
import org.springframework.security.access.prepost.PreAuthorize;

public interface AMathService {

@PreAuthorize("hasAuthority('ROLE_ADMIN')")
String sayHello(String name);

}

*IMPLEMENTATION*
import org.springframework.stereotype.Service;

@Service("aMathService")
public class AMathServiceImpl implements AMathService {

@Override
public String sayHello(String name) {
return new String("hello " + name);
}
}

*ROUTE(no strategy)*







*ROUTE(with strategy)*








*CLIENT (option a)*
GrantedAuthority> authorities = new ArrayList();
GrantedAuthority a = new SimpleGrantedAuthority("ROLE_ADMIN");
authorities.add(a);
Authentication auth = new
org.springframework.security.authentication.UsernamePasswordAuthenticationToken("abcdefg",
"1234", authorities);

Subject subject = new javax.security.auth.Subject();
subject.getPrincipals().add(auth);

Endpoint endpoint = camel.getEndpoint("jms:queue:hello");
System.out.println(camelTemplate.requestBodyAndHeader(endpoint, "john" ,
Exchange.AUTHENTICATION, subject));

*CLIENT (option b)*
Producer producer = endpoint.createProducer();
producer.start();
Exchange exchange = endpoint.createExchange(ExchangePattern.InOut);
exchange.getIn().setBody("john");
exchange.getIn().getHeaders().put(Exchange.AUTHENTICATION, subject);
producer.process(exchange);
System.out.println(".. the result is " + exchange.getOut().getBody());
producer.stop();




--
View this message in context: 
http://camel.465427.n5.nabble.com/JMS-to-Secured-Spring-Method-with-PreAuthorize-annotation-tp5722696.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: JMS to Secured Spring Method with PreAuthorize annotation

2012-11-13 Thread Willem jiang
It looks like you need to pass the SecurityContext across the JMS endpoint.
when you using the camel-jms component, it will transfer the exchange which 
hold the SecurityContext for you if you set the "transferExchange" option to be 
true.


-- 
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
  http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang 
Weibo: willemjiang





On Wednesday, November 14, 2012 at 6:55 AM, john.mo...@kronos.com wrote:

> I have an existing Spring MVC application which has @PreAuthorize annotations
> on the business services. I would like to add the ability for a
> client/system to send JMS Messages which, in-turn, calls methods on those
> secured spring beans. /FYI, without the @PreAuthorize annotation the
> call's work seamlessly./
> 
> Reading the Camel Wiki on Spring-Security
> (http://camel.apache.org/spring-security.html), it looks like I should be
> able to put a spring authentication token wrapped as a Subject principal
> into the Exchange.AUTHENTICATION Header and send it over the wire. 
> However, I get the error 
> "org.springframework.security.authentication.AuthenticationCredentialsNotFoundException:
> An Authentication object was not found in the SecurityContext". 
> 
> I had implemented an AuthenticationAdapter expecting to see calls to convert
> from Subject back to Authentication objects. Obviously, the Authentication
> object is not put back into a security context, nor was any additional
> authentication logic called off to.
> 
> Since that didn't prove useful, I decided to wrap the "camel:to" with a
> "camel:policy" as described in the spring-security section in hopes it would
> yield some better results (even though I don't want to apply policies to
> routes). I then received an error from the
> SpringSecurityAuthorizationPolicy. Digging into it, it shows that there is
> not an instance of the Subject class in the headers. 
> 
> Given that information, I tried adding custom filter header strategies after
> observing that the JMSHeaderFilterStrategy was being used, which doesn't
> look like it will include the needed Subject header; still with no luck. 
> 
> After a lot of time putting the strategies on combinations of sending and
> receiving ends of the queue with no success, I decided I had to look for 
> help and determine if maybe the concept was flawed or there was even a path
> to my solution.
> 
> So, I ask, should this concept work? If so, what's the missing-link that's
> needed to make this work? 
> 
> Here are the versions from my POM.
> 3.1.2.RELEASE
> 3.1.2.RELEASE
> 2.1.3.RELEASE
> 2.1.1.RELEASE-SNAPSHOT
> 4.1.4.Final
> 1.7.0
> 5.6.0
> 2.10.2
> 3.11.1
> 1.6.6 
> 
> And since everyone likes code and configuration...
> 
> *INTERFACE*
> import org.springframework.security.access.prepost.PreAuthorize;
> 
> public interface AMathService {
> 
> @PreAuthorize("hasAuthority('ROLE_ADMIN')")
> String sayHello(String name);
> 
> }
> 
> *IMPLEMENTATION*
> import org.springframework.stereotype.Service;
> 
> @Service("aMathService")
> public class AMathServiceImpl implements AMathService {
> 
> @Override
> public String sayHello(String name) {
> return new String("hello " + name);
> }
> }
> 
> *ROUTE(no strategy)*
> 
> 
> 
> 
> 
> 
> 
> *ROUTE(with strategy)*
> 
>  uri="jms:queue:hello?headerFilterStrategy=#camelToSpringHeaderFilterStrategy"/>
> 
> 
> 
> 
> 
> 
> *CLIENT (option a)*
> GrantedAuthority> authorities = new ArrayList();
> GrantedAuthority a = new SimpleGrantedAuthority("ROLE_ADMIN");
> authorities.add(a);
> Authentication auth = new
> org.springframework.security.authentication.UsernamePasswordAuthenticationToken("abcdefg",
> "1234", authorities);
> 
> Subject subject = new javax.security.auth.Subject();
> subject.getPrincipals().add(auth);
> 
> Endpoint endpoint = camel.getEndpoint("jms:queue:hello");
> System.out.println(camelTemplate.requestBodyAndHeader(endpoint, "john" ,
> Exchange.AUTHENTICATION, subject));
> 
> *CLIENT (option b)*
> Producer producer = endpoint.createProducer();
> producer.start();
> Exchange exchange = endpoint.createExchange(ExchangePattern.InOut);
> exchange.getIn().setBody("john");
> exchange.getIn().getHeaders().put(Exchange.AUTHENTICATION, subject);
> producer.process(exchange);
> System.out.println(".. the result is " + exchange.getOut().getBody());
> producer.stop();
> 
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/JMS-to-Secured-Spring-Method-with-PreAuthorize-annotation-tp5722696.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).