You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Bengt Rodehav <be...@rodehav.com> on 2012/11/13 14:39:32 UTC

Saxon and saxon9he

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

Posted by Christian Müller <ch...@gmail.com>.
It works for me. Add a comment to the JIRA.

Best,
Christian

On Sat, Nov 17, 2012 at 9:55 AM, Bengt Rodehav <be...@rodehav.com> wrote:

> https://issues.apache.org/jira/browse/CAMEL-5798
>
> Will try to elaborate a bit more about what combinations of
> Karaf/Servicemix/Camel do not work.
>
> /Bengt
>
>
> 2012/11/16 Claus Ibsen <cl...@gmail.com>
>
> > On Fri, Nov 16, 2012 at 12:33 PM, Bengt Rodehav <be...@rodehav.com>
> wrote:
> > > Do you think I should create a JIRA concerning the camel-saxon feature
> > not
> > > working on a pure Karaf?
> > >
> >
> > Yeah it could be a matter of adding the xmlresolver to the camel-saxon
> > feature as a dependency. Then it may install on a pure karaf.
> > Feel free to work on a patch and log a JIRA.
> >
> > > /Bengt
> > >
> > >
> > > 2012/11/16 Bengt Rodehav <be...@rodehav.com>
> > >
> > >> OK, if that's the case then I'm "already there" since I use Saxon for
> > >> xpath as well.
> > >>
> > >> Thanks,
> > >>
> > >> /Bengt
> > >>
> > >>
> > >> 2012/11/16 Claus Ibsen <cl...@gmail.com>
> > >>
> > >>> On Fri, Nov 16, 2012 at 8:56 AM, Bengt Rodehav <be...@rodehav.com>
> > wrote:
> > >>> > Hello Christian.
> > >>> >
> > >>> > Thanks for your remarks. However, I did try using the camel-saxon
> > >>> feature
> > >>> > (first thing I did) but it doesn't work when running under pure
> > Karaf.
> > >>> It
> > >>> > probably works under ServiceMix (haven't tested that) but I have my
> > own
> > >>> > custom Karaf+Camel distribution.
> > >>> >
> > >>> > I'm not 100% sure what is wrong but first of all an XmlResolver is
> > >>> needed
> > >>> > which is why I need to install
> > >>> org.apache.servicemix.bundles.xmlresolver.
> > >>> > It seems like the camel-saxon features assumes that this is
> present.
> > I
> > >>> > think this bundle should be added to the camel-saxon feature since
> > the
> > >>> > feature shouldn't assume that you are running in ServiceMix. It
> > should
> > >>> only
> > >>> > assume a standard Karaf.
> > >>> >
> > >>> > Also, I can't get it to work with version 9.3.0.11_2
> > >>> > of org.apache.servicemix.bundles.saxon due to "No XPathFctory
> > >>> > implementation found for the object model:
> > >>> http://saxon.sf.net/jaxp/xpath/om".
> > >>> > If I change to version 9.4.0.4_1 it works.
> > >>> >
> > >>> > Perhaps the Camel feature descriptors are not adapted for Karaf
> > 2.3.0?
> > >>> Or
> > >>> > they are not tested in pure Karaf but only in ServiceMix (this is
> > what I
> > >>> > think).
> > >>> >
> > >>> > Regarding xquery vs xpath that's very interesting. My use case
> > doesn't
> > >>> need
> > >>> > anything more advanced than xpath and I (falsely?) assumed that the
> > >>> least
> > >>> > advanced (xpath) would give me the best performance. It seems very
> > >>> > illogical that the more advanced xquery would perform better. I
> will
> > try
> > >>> > your suggestion though.
> > >>> >
> > >>>
> > >>> I doubt that too, its just that xquery is implemented by Saxon. And
> > >>> Saxon is faster than what comes default from the JDK. So when people
> > >>> switch to xquery the get the faster Saxon.
> > >>>
> > >>>
> > >>> > Thanks,
> > >>> >
> > >>> > /Bengt
> > >>> >
> > >>> >
> > >>> >
> > >>> >
> > >>> >
> > >>> >
> > >>> >
> > >>> > 2012/11/15 Christian Müller <ch...@gmail.com>
> > >>> >
> > >>> >> Hi Bengt!
> > >>> >>
> > >>> >> Two remarks:
> > >>> >> You can leverage on the camel-saxon feature [1] to manage all the
> > >>> >> dependencies saxon need.
> > >>> >> And you could try using xquery instead of xpath [2]. It should be
> > >>> faster.
> > >>> >>
> > >>> >> [1]
> > >>> >>
> > >>> >>
> > >>>
> >
> https://svn.apache.org/repos/asf/camel/trunk/platforms/karaf/features/src/main/resources/features.xml
> > >>> >> [2]
> > >>> >>
> > >>> >>
> > >>>
> >
> https://github.com/muellerc/esbperformance/blob/esbperformance-1.1.x/servicemix-osgi/cbr/src/main/resources/META-INF/spring/bundle-context.xml
> > >>> >>
> > >>> >> Best,
> > >>> >> Christian
> > >>> >>
> > >>>
> > >>>
> > >>>
> > >>> --
> > >>> Claus Ibsen
> > >>> -----------------
> > >>> Red Hat, Inc.
> > >>> FuseSource is now part of Red Hat
> > >>> Email: cibsen@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: cibsen@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

Posted by Bengt Rodehav <be...@rodehav.com>.
https://issues.apache.org/jira/browse/CAMEL-5798

Will try to elaborate a bit more about what combinations of
Karaf/Servicemix/Camel do not work.

/Bengt


2012/11/16 Claus Ibsen <cl...@gmail.com>

> On Fri, Nov 16, 2012 at 12:33 PM, Bengt Rodehav <be...@rodehav.com> wrote:
> > Do you think I should create a JIRA concerning the camel-saxon feature
> not
> > working on a pure Karaf?
> >
>
> Yeah it could be a matter of adding the xmlresolver to the camel-saxon
> feature as a dependency. Then it may install on a pure karaf.
> Feel free to work on a patch and log a JIRA.
>
> > /Bengt
> >
> >
> > 2012/11/16 Bengt Rodehav <be...@rodehav.com>
> >
> >> OK, if that's the case then I'm "already there" since I use Saxon for
> >> xpath as well.
> >>
> >> Thanks,
> >>
> >> /Bengt
> >>
> >>
> >> 2012/11/16 Claus Ibsen <cl...@gmail.com>
> >>
> >>> On Fri, Nov 16, 2012 at 8:56 AM, Bengt Rodehav <be...@rodehav.com>
> wrote:
> >>> > Hello Christian.
> >>> >
> >>> > Thanks for your remarks. However, I did try using the camel-saxon
> >>> feature
> >>> > (first thing I did) but it doesn't work when running under pure
> Karaf.
> >>> It
> >>> > probably works under ServiceMix (haven't tested that) but I have my
> own
> >>> > custom Karaf+Camel distribution.
> >>> >
> >>> > I'm not 100% sure what is wrong but first of all an XmlResolver is
> >>> needed
> >>> > which is why I need to install
> >>> org.apache.servicemix.bundles.xmlresolver.
> >>> > It seems like the camel-saxon features assumes that this is present.
> I
> >>> > think this bundle should be added to the camel-saxon feature since
> the
> >>> > feature shouldn't assume that you are running in ServiceMix. It
> should
> >>> only
> >>> > assume a standard Karaf.
> >>> >
> >>> > Also, I can't get it to work with version 9.3.0.11_2
> >>> > of org.apache.servicemix.bundles.saxon due to "No XPathFctory
> >>> > implementation found for the object model:
> >>> http://saxon.sf.net/jaxp/xpath/om".
> >>> > If I change to version 9.4.0.4_1 it works.
> >>> >
> >>> > Perhaps the Camel feature descriptors are not adapted for Karaf
> 2.3.0?
> >>> Or
> >>> > they are not tested in pure Karaf but only in ServiceMix (this is
> what I
> >>> > think).
> >>> >
> >>> > Regarding xquery vs xpath that's very interesting. My use case
> doesn't
> >>> need
> >>> > anything more advanced than xpath and I (falsely?) assumed that the
> >>> least
> >>> > advanced (xpath) would give me the best performance. It seems very
> >>> > illogical that the more advanced xquery would perform better. I will
> try
> >>> > your suggestion though.
> >>> >
> >>>
> >>> I doubt that too, its just that xquery is implemented by Saxon. And
> >>> Saxon is faster than what comes default from the JDK. So when people
> >>> switch to xquery the get the faster Saxon.
> >>>
> >>>
> >>> > Thanks,
> >>> >
> >>> > /Bengt
> >>> >
> >>> >
> >>> >
> >>> >
> >>> >
> >>> >
> >>> >
> >>> > 2012/11/15 Christian Müller <ch...@gmail.com>
> >>> >
> >>> >> Hi Bengt!
> >>> >>
> >>> >> Two remarks:
> >>> >> You can leverage on the camel-saxon feature [1] to manage all the
> >>> >> dependencies saxon need.
> >>> >> And you could try using xquery instead of xpath [2]. It should be
> >>> faster.
> >>> >>
> >>> >> [1]
> >>> >>
> >>> >>
> >>>
> https://svn.apache.org/repos/asf/camel/trunk/platforms/karaf/features/src/main/resources/features.xml
> >>> >> [2]
> >>> >>
> >>> >>
> >>>
> https://github.com/muellerc/esbperformance/blob/esbperformance-1.1.x/servicemix-osgi/cbr/src/main/resources/META-INF/spring/bundle-context.xml
> >>> >>
> >>> >> Best,
> >>> >> Christian
> >>> >>
> >>>
> >>>
> >>>
> >>> --
> >>> Claus Ibsen
> >>> -----------------
> >>> Red Hat, Inc.
> >>> FuseSource is now part of Red Hat
> >>> Email: cibsen@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: cibsen@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

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Nov 16, 2012 at 12:33 PM, Bengt Rodehav <be...@rodehav.com> wrote:
> Do you think I should create a JIRA concerning the camel-saxon feature not
> working on a pure Karaf?
>

Yeah it could be a matter of adding the xmlresolver to the camel-saxon
feature as a dependency. Then it may install on a pure karaf.
Feel free to work on a patch and log a JIRA.

> /Bengt
>
>
> 2012/11/16 Bengt Rodehav <be...@rodehav.com>
>
>> OK, if that's the case then I'm "already there" since I use Saxon for
>> xpath as well.
>>
>> Thanks,
>>
>> /Bengt
>>
>>
>> 2012/11/16 Claus Ibsen <cl...@gmail.com>
>>
>>> On Fri, Nov 16, 2012 at 8:56 AM, Bengt Rodehav <be...@rodehav.com> wrote:
>>> > Hello Christian.
>>> >
>>> > Thanks for your remarks. However, I did try using the camel-saxon
>>> feature
>>> > (first thing I did) but it doesn't work when running under pure Karaf.
>>> It
>>> > probably works under ServiceMix (haven't tested that) but I have my own
>>> > custom Karaf+Camel distribution.
>>> >
>>> > I'm not 100% sure what is wrong but first of all an XmlResolver is
>>> needed
>>> > which is why I need to install
>>> org.apache.servicemix.bundles.xmlresolver.
>>> > It seems like the camel-saxon features assumes that this is present. I
>>> > think this bundle should be added to the camel-saxon feature since the
>>> > feature shouldn't assume that you are running in ServiceMix. It should
>>> only
>>> > assume a standard Karaf.
>>> >
>>> > Also, I can't get it to work with version 9.3.0.11_2
>>> > of org.apache.servicemix.bundles.saxon due to "No XPathFctory
>>> > implementation found for the object model:
>>> http://saxon.sf.net/jaxp/xpath/om".
>>> > If I change to version 9.4.0.4_1 it works.
>>> >
>>> > Perhaps the Camel feature descriptors are not adapted for Karaf 2.3.0?
>>> Or
>>> > they are not tested in pure Karaf but only in ServiceMix (this is what I
>>> > think).
>>> >
>>> > Regarding xquery vs xpath that's very interesting. My use case doesn't
>>> need
>>> > anything more advanced than xpath and I (falsely?) assumed that the
>>> least
>>> > advanced (xpath) would give me the best performance. It seems very
>>> > illogical that the more advanced xquery would perform better. I will try
>>> > your suggestion though.
>>> >
>>>
>>> I doubt that too, its just that xquery is implemented by Saxon. And
>>> Saxon is faster than what comes default from the JDK. So when people
>>> switch to xquery the get the faster Saxon.
>>>
>>>
>>> > Thanks,
>>> >
>>> > /Bengt
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > 2012/11/15 Christian Müller <ch...@gmail.com>
>>> >
>>> >> Hi Bengt!
>>> >>
>>> >> Two remarks:
>>> >> You can leverage on the camel-saxon feature [1] to manage all the
>>> >> dependencies saxon need.
>>> >> And you could try using xquery instead of xpath [2]. It should be
>>> faster.
>>> >>
>>> >> [1]
>>> >>
>>> >>
>>> https://svn.apache.org/repos/asf/camel/trunk/platforms/karaf/features/src/main/resources/features.xml
>>> >> [2]
>>> >>
>>> >>
>>> https://github.com/muellerc/esbperformance/blob/esbperformance-1.1.x/servicemix-osgi/cbr/src/main/resources/META-INF/spring/bundle-context.xml
>>> >>
>>> >> Best,
>>> >> Christian
>>> >>
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> -----------------
>>> Red Hat, Inc.
>>> FuseSource is now part of Red Hat
>>> Email: cibsen@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: cibsen@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

Posted by Bengt Rodehav <be...@rodehav.com>.
Do you think I should create a JIRA concerning the camel-saxon feature not
working on a pure Karaf?

/Bengt


2012/11/16 Bengt Rodehav <be...@rodehav.com>

> OK, if that's the case then I'm "already there" since I use Saxon for
> xpath as well.
>
> Thanks,
>
> /Bengt
>
>
> 2012/11/16 Claus Ibsen <cl...@gmail.com>
>
>> On Fri, Nov 16, 2012 at 8:56 AM, Bengt Rodehav <be...@rodehav.com> wrote:
>> > Hello Christian.
>> >
>> > Thanks for your remarks. However, I did try using the camel-saxon
>> feature
>> > (first thing I did) but it doesn't work when running under pure Karaf.
>> It
>> > probably works under ServiceMix (haven't tested that) but I have my own
>> > custom Karaf+Camel distribution.
>> >
>> > I'm not 100% sure what is wrong but first of all an XmlResolver is
>> needed
>> > which is why I need to install
>> org.apache.servicemix.bundles.xmlresolver.
>> > It seems like the camel-saxon features assumes that this is present. I
>> > think this bundle should be added to the camel-saxon feature since the
>> > feature shouldn't assume that you are running in ServiceMix. It should
>> only
>> > assume a standard Karaf.
>> >
>> > Also, I can't get it to work with version 9.3.0.11_2
>> > of org.apache.servicemix.bundles.saxon due to "No XPathFctory
>> > implementation found for the object model:
>> http://saxon.sf.net/jaxp/xpath/om".
>> > If I change to version 9.4.0.4_1 it works.
>> >
>> > Perhaps the Camel feature descriptors are not adapted for Karaf 2.3.0?
>> Or
>> > they are not tested in pure Karaf but only in ServiceMix (this is what I
>> > think).
>> >
>> > Regarding xquery vs xpath that's very interesting. My use case doesn't
>> need
>> > anything more advanced than xpath and I (falsely?) assumed that the
>> least
>> > advanced (xpath) would give me the best performance. It seems very
>> > illogical that the more advanced xquery would perform better. I will try
>> > your suggestion though.
>> >
>>
>> I doubt that too, its just that xquery is implemented by Saxon. And
>> Saxon is faster than what comes default from the JDK. So when people
>> switch to xquery the get the faster Saxon.
>>
>>
>> > Thanks,
>> >
>> > /Bengt
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > 2012/11/15 Christian Müller <ch...@gmail.com>
>> >
>> >> Hi Bengt!
>> >>
>> >> Two remarks:
>> >> You can leverage on the camel-saxon feature [1] to manage all the
>> >> dependencies saxon need.
>> >> And you could try using xquery instead of xpath [2]. It should be
>> faster.
>> >>
>> >> [1]
>> >>
>> >>
>> https://svn.apache.org/repos/asf/camel/trunk/platforms/karaf/features/src/main/resources/features.xml
>> >> [2]
>> >>
>> >>
>> https://github.com/muellerc/esbperformance/blob/esbperformance-1.1.x/servicemix-osgi/cbr/src/main/resources/META-INF/spring/bundle-context.xml
>> >>
>> >> Best,
>> >> Christian
>> >>
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Email: cibsen@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

Posted by Bengt Rodehav <be...@rodehav.com>.
OK, if that's the case then I'm "already there" since I use Saxon for xpath
as well.

Thanks,

/Bengt


2012/11/16 Claus Ibsen <cl...@gmail.com>

> On Fri, Nov 16, 2012 at 8:56 AM, Bengt Rodehav <be...@rodehav.com> wrote:
> > Hello Christian.
> >
> > Thanks for your remarks. However, I did try using the camel-saxon feature
> > (first thing I did) but it doesn't work when running under pure Karaf. It
> > probably works under ServiceMix (haven't tested that) but I have my own
> > custom Karaf+Camel distribution.
> >
> > I'm not 100% sure what is wrong but first of all an XmlResolver is needed
> > which is why I need to install org.apache.servicemix.bundles.xmlresolver.
> > It seems like the camel-saxon features assumes that this is present. I
> > think this bundle should be added to the camel-saxon feature since the
> > feature shouldn't assume that you are running in ServiceMix. It should
> only
> > assume a standard Karaf.
> >
> > Also, I can't get it to work with version 9.3.0.11_2
> > of org.apache.servicemix.bundles.saxon due to "No XPathFctory
> > implementation found for the object model:
> http://saxon.sf.net/jaxp/xpath/om".
> > If I change to version 9.4.0.4_1 it works.
> >
> > Perhaps the Camel feature descriptors are not adapted for Karaf 2.3.0? Or
> > they are not tested in pure Karaf but only in ServiceMix (this is what I
> > think).
> >
> > Regarding xquery vs xpath that's very interesting. My use case doesn't
> need
> > anything more advanced than xpath and I (falsely?) assumed that the least
> > advanced (xpath) would give me the best performance. It seems very
> > illogical that the more advanced xquery would perform better. I will try
> > your suggestion though.
> >
>
> I doubt that too, its just that xquery is implemented by Saxon. And
> Saxon is faster than what comes default from the JDK. So when people
> switch to xquery the get the faster Saxon.
>
>
> > Thanks,
> >
> > /Bengt
> >
> >
> >
> >
> >
> >
> >
> > 2012/11/15 Christian Müller <ch...@gmail.com>
> >
> >> Hi Bengt!
> >>
> >> Two remarks:
> >> You can leverage on the camel-saxon feature [1] to manage all the
> >> dependencies saxon need.
> >> And you could try using xquery instead of xpath [2]. It should be
> faster.
> >>
> >> [1]
> >>
> >>
> https://svn.apache.org/repos/asf/camel/trunk/platforms/karaf/features/src/main/resources/features.xml
> >> [2]
> >>
> >>
> https://github.com/muellerc/esbperformance/blob/esbperformance-1.1.x/servicemix-osgi/cbr/src/main/resources/META-INF/spring/bundle-context.xml
> >>
> >> Best,
> >> Christian
> >>
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cibsen@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

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Nov 16, 2012 at 8:56 AM, Bengt Rodehav <be...@rodehav.com> wrote:
> Hello Christian.
>
> Thanks for your remarks. However, I did try using the camel-saxon feature
> (first thing I did) but it doesn't work when running under pure Karaf. It
> probably works under ServiceMix (haven't tested that) but I have my own
> custom Karaf+Camel distribution.
>
> I'm not 100% sure what is wrong but first of all an XmlResolver is needed
> which is why I need to install org.apache.servicemix.bundles.xmlresolver.
> It seems like the camel-saxon features assumes that this is present. I
> think this bundle should be added to the camel-saxon feature since the
> feature shouldn't assume that you are running in ServiceMix. It should only
> assume a standard Karaf.
>
> Also, I can't get it to work with version 9.3.0.11_2
> of org.apache.servicemix.bundles.saxon due to "No XPathFctory
> implementation found for the object model: http://saxon.sf.net/jaxp/xpath/om".
> If I change to version 9.4.0.4_1 it works.
>
> Perhaps the Camel feature descriptors are not adapted for Karaf 2.3.0? Or
> they are not tested in pure Karaf but only in ServiceMix (this is what I
> think).
>
> Regarding xquery vs xpath that's very interesting. My use case doesn't need
> anything more advanced than xpath and I (falsely?) assumed that the least
> advanced (xpath) would give me the best performance. It seems very
> illogical that the more advanced xquery would perform better. I will try
> your suggestion though.
>

I doubt that too, its just that xquery is implemented by Saxon. And
Saxon is faster than what comes default from the JDK. So when people
switch to xquery the get the faster Saxon.


> Thanks,
>
> /Bengt
>
>
>
>
>
>
>
> 2012/11/15 Christian Müller <ch...@gmail.com>
>
>> Hi Bengt!
>>
>> Two remarks:
>> You can leverage on the camel-saxon feature [1] to manage all the
>> dependencies saxon need.
>> And you could try using xquery instead of xpath [2]. It should be faster.
>>
>> [1]
>>
>> https://svn.apache.org/repos/asf/camel/trunk/platforms/karaf/features/src/main/resources/features.xml
>> [2]
>>
>> https://github.com/muellerc/esbperformance/blob/esbperformance-1.1.x/servicemix-osgi/cbr/src/main/resources/META-INF/spring/bundle-context.xml
>>
>> Best,
>> Christian
>>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@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

Posted by Bengt Rodehav <be...@rodehav.com>.
Hello Christian.

Thanks for your remarks. However, I did try using the camel-saxon feature
(first thing I did) but it doesn't work when running under pure Karaf. It
probably works under ServiceMix (haven't tested that) but I have my own
custom Karaf+Camel distribution.

I'm not 100% sure what is wrong but first of all an XmlResolver is needed
which is why I need to install org.apache.servicemix.bundles.xmlresolver.
It seems like the camel-saxon features assumes that this is present. I
think this bundle should be added to the camel-saxon feature since the
feature shouldn't assume that you are running in ServiceMix. It should only
assume a standard Karaf.

Also, I can't get it to work with version 9.3.0.11_2
of org.apache.servicemix.bundles.saxon due to "No XPathFctory
implementation found for the object model: http://saxon.sf.net/jaxp/xpath/om".
If I change to version 9.4.0.4_1 it works.

Perhaps the Camel feature descriptors are not adapted for Karaf 2.3.0? Or
they are not tested in pure Karaf but only in ServiceMix (this is what I
think).

Regarding xquery vs xpath that's very interesting. My use case doesn't need
anything more advanced than xpath and I (falsely?) assumed that the least
advanced (xpath) would give me the best performance. It seems very
illogical that the more advanced xquery would perform better. I will try
your suggestion though.

Thanks,

/Bengt







2012/11/15 Christian Müller <ch...@gmail.com>

> Hi Bengt!
>
> Two remarks:
> You can leverage on the camel-saxon feature [1] to manage all the
> dependencies saxon need.
> And you could try using xquery instead of xpath [2]. It should be faster.
>
> [1]
>
> https://svn.apache.org/repos/asf/camel/trunk/platforms/karaf/features/src/main/resources/features.xml
> [2]
>
> https://github.com/muellerc/esbperformance/blob/esbperformance-1.1.x/servicemix-osgi/cbr/src/main/resources/META-INF/spring/bundle-context.xml
>
> Best,
> Christian
>

Re: Saxon and saxon9he

Posted by Christian Müller <ch...@gmail.com>.
Hi Bengt!

Two remarks:
You can leverage on the camel-saxon feature [1] to manage all the
dependencies saxon need.
And you could try using xquery instead of xpath [2]. It should be faster.

[1]
https://svn.apache.org/repos/asf/camel/trunk/platforms/karaf/features/src/main/resources/features.xml
[2]
https://github.com/muellerc/esbperformance/blob/esbperformance-1.1.x/servicemix-osgi/cbr/src/main/resources/META-INF/spring/bundle-context.xml

Best,
Christian

Re: Saxon and saxon9he

Posted by Bengt Rodehav <be...@rodehav.com>.
I've now got things working. This is what I did:

First of all, I decided to use Saxon instead of the XPath implementation
that is part of the JRE. I therefore added  the following dependency to my
POM:

*    <dependency>*
*      <groupId>org.apache.camel</groupId>*
*      <artifactId>camel-saxon</artifactId>*
*      <version>2.10.2</version>*
*    </dependency>*

I then used the following syntax in my route:

  *...choice().when(xpath("Xpath
expression").saxon()).log("match").otherwise().log("No match");*

In order to get this to work in Karaf 2.3.0 I executed the following
commands (in the Karaf console):

*install -s
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xmlresolver/1.2_5
*
*install -s
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon/9.4.0.4_1
*

I then installed my bundle containing the Camel route and everything works.

So the problem was solved by using Saxon and in order to get Saxon to work
I needed the "xmlresolver" as well.

One other thing to note is how to use namespaces. The Camel documentation
says that you can do this:

*  Namespaces ns = new Namespaces("c", "http://acme.com/cheese");*
*  ...xpath("/c:person[@name=''James]", ns)...*

That doesn't compile for me - has the API changed? The xpath() method does
not seem to allow a second argument of type Namespaces.

What I ended up doing was this:

*  Namespaces ns = new Namespaces("c", "http://acme.com/cheese");*
*  ...choice().when(xpath("Xpath
expression").saxon().namespaces(ns)).log("match").otherwise().log("No
match");
*

That worked fine. Hope this post might help someone with similar problems.

/Bengt








2012/11/13 Bengt Rodehav <be...@rodehav.com>

> Will do.
>
>
> 2012/11/13 Claus Ibsen <cl...@gmail.com>
>
>> 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 <be...@rodehav.com> wrote:
>> > OK - thanks for the hint,
>> >
>> > /Bengt
>> >
>> >
>> > 2012/11/13 Claus Ibsen <cl...@gmail.com>
>> >
>> >> On Tue, Nov 13, 2012 at 3:22 PM, Bengt Rodehav <be...@rodehav.com>
>> 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 <cl...@gmail.com>
>> >> >
>> >> >> 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 <claus.ibsen@gmail.com
>> >
>> >> >> 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 <bengt@rodehav.com
>> >
>> >> >> 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: cibsen@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: cibsen@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: cibsen@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: cibsen@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

Posted by Bengt Rodehav <be...@rodehav.com>.
Will do.


2012/11/13 Claus Ibsen <cl...@gmail.com>

> 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 <be...@rodehav.com> wrote:
> > OK - thanks for the hint,
> >
> > /Bengt
> >
> >
> > 2012/11/13 Claus Ibsen <cl...@gmail.com>
> >
> >> On Tue, Nov 13, 2012 at 3:22 PM, Bengt Rodehav <be...@rodehav.com>
> 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 <cl...@gmail.com>
> >> >
> >> >> 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 <cl...@gmail.com>
> >> >> 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 <be...@rodehav.com>
> >> >> 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: cibsen@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: cibsen@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: cibsen@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: cibsen@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

Posted by Claus Ibsen <cl...@gmail.com>.
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 <be...@rodehav.com> wrote:
> OK - thanks for the hint,
>
> /Bengt
>
>
> 2012/11/13 Claus Ibsen <cl...@gmail.com>
>
>> On Tue, Nov 13, 2012 at 3:22 PM, Bengt Rodehav <be...@rodehav.com> 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 <cl...@gmail.com>
>> >
>> >> 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 <cl...@gmail.com>
>> >> 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 <be...@rodehav.com>
>> >> 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: cibsen@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: cibsen@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: cibsen@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: cibsen@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

Posted by Bengt Rodehav <be...@rodehav.com>.
OK - thanks for the hint,

/Bengt


2012/11/13 Claus Ibsen <cl...@gmail.com>

> On Tue, Nov 13, 2012 at 3:22 PM, Bengt Rodehav <be...@rodehav.com> 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 <cl...@gmail.com>
> >
> >> 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 <cl...@gmail.com>
> >> 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 <be...@rodehav.com>
> >> 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: cibsen@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: cibsen@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: cibsen@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

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Nov 13, 2012 at 3:22 PM, Bengt Rodehav <be...@rodehav.com> 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 <cl...@gmail.com>
>
>> 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 <cl...@gmail.com>
>> 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 <be...@rodehav.com>
>> 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: cibsen@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: cibsen@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: cibsen@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

Posted by Bengt Rodehav <be...@rodehav.com>.
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 <cl...@gmail.com>

> 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 <cl...@gmail.com>
> 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 <be...@rodehav.com>
> 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: cibsen@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: cibsen@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

Posted by Claus Ibsen <cl...@gmail.com>.
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 <cl...@gmail.com> 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 <be...@rodehav.com> 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: cibsen@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: cibsen@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

Posted by Claus Ibsen <cl...@gmail.com>.
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 <be...@rodehav.com> 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: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen