You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by cd <ch...@mindspring.com> on 2007/11/29 03:43:46 UTC
XPATH selectors?
Hello and i apologise for posting what should be such a simple question but i
have been searching around the ActiveMQ site and the web in general all day
and have failed so far to figure this out.
I am new to both Java and ActiveMQ and decided to use AMQ based largely on
the assertion that it would do XPATH filtering based on message content, but
i do not get any messages from a Q as soon as i put an XML selector on the
MessageConsumer. The messages are on the Q and if i remove the XPATH
selector or use a standard header selector i get the messages.
I would REALLY appreciate any hints anyone might offer toward finding out
why this isn't working. I've been working almost 2 weeks on the assumption
that the web site documentation was accurate and i am not finding a lot of
other people having problems so i am forced to think i must be doing
something stupid.
I suspect i am missing a/some components in classpath but i haven't found
any docs about what that should be. I have added
activemq-optional-4.1.1.jar to the CP with no effect.
more details:
--i am using AMQ on winXP and JDK 1.6.
--i simply downloaded the zip and started the server through the
bin/activemq.bat script.
--i moved the AMQ directory directly to the root in case it was getting
confused by long/spaces file names.
--i am sending the messages as TextMessage.
--custom property selectors work like a champ.
--i started with a well formed xml document and have slowly reduced its
complexity until all i have left is this simple fragment:
<testRoot><testNode1
name="Bart">Bart</testNode1><testNode2>Simpson</testNode2></testRoot>
--i have tried every permutation of quotes, escapes, and syntax i can think
of to try and get it to use the selector.
XPATH '//testNode1[@name=''Bart'']'
XPATH '//testNode1 = ''Bart'']'
XPATH '//testNode1[. = ''Bart'']'
XPATH '/testRoot/testNode1[text() = ''Bart'']'
and probably a million more :)
thank you *very* much for your time reading all of this,
cd
--
View this message in context: http://www.nabble.com/XPATH-selectors--tf4894769s2354.html#a14018321
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: XPATH selectors?
Posted by cd <ch...@mindspring.com>.
Thanks for your response. :)
i do now. :( i found that shortly after that last post and haven't had
time yet to post the resolution which is to download xalan and it's
dependencies. Silly me. i expected any dependencies not part of the jdk
should be included in the package. I strongly reccomend that xalan and
xerces adn whatever other dependencies are necessary either be included in
the packacge or at least listed on the pages that describe the features that
won't work without those files. This has severly hurt my efforts and
reputation to promote open source solutions at my company. My VP happened
to come by and ask how things were going while i was working through this
problem and i had to tell him our deadline was in jeopardy. :(
ttmdev wrote:
>
> Do you have the xalan.jar file in your classpath? That's where you'll find
> the org.apache.xpath.CachedXPathAPI class.
>
> Joe
>
>
>
--
View this message in context: http://www.nabble.com/XPATH-selectors--tf4894769s2354.html#a14106578
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: XPATH selectors?
Posted by ttmdev <jo...@ttmsolutions.com>.
Do you have the xalan.jar file in your classpath? That's where you'll find
the org.apache.xpath.CachedXPathAPI class.
Joe
cd wrote:
>
> more progress: the problem is in the XalanXPathEvaluator class
> evaluate(string) method. The creation of the CachedXPathAPI class is
> failing with a NoClassDefFoundError on org/apache/xpath/CachedXPathAPI
>
--
View this message in context: http://www.nabble.com/XPATH-selectors--tf4894769s2354.html#a14089869
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: XPATH selectors?
Posted by cd <ch...@mindspring.com>.
more progress: the problem is in the XalanXPathEvaluator class
evaluate(string) method. The creation of the CachedXPathAPI class is
failing with a NoClassDefFoundError on org/apache/xpath/CachedXPathAPI
--
View this message in context: http://www.nabble.com/XPATH-selectors--tf4894769s2354.html#a14040206
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: XPATH selectors?
Posted by cd <ch...@mindspring.com>.
ok, think i'm getting somewhere slowly. Just d/l the source package for amq
4.1.1 release and the SelectorParser file is missing. Still trying to
figure out what's up.
--
View this message in context: http://www.nabble.com/XPATH-selectors--tf4894769s2354.html#a14031521
Sent from the ActiveMQ - User mailing list archive at Nabble.com.