[jdom-interest] JDOM XPath error...help needed.
Jason Long
jason at supernovasoftware.com
Mon Mar 17 18:58:47 PST 2003
I still have not been able to fix this problem.
<!DOCTYPE inventory SYSTEM "inventory.dtd">
<inventory>
<item id="0" size="4.500" weight="11.60" grade="K-55" endFin="LTC"
status="IN STOCK" footage="53505.9" yard="A-A">
<mill>New API Seamless Baoshan</mill>
<location>Houston, TX</location>
</item>
<item id="141" size="5.500" weight="17.00" grade="N-80" endFin="LTC"
status="IN STOCK" footage="22467.9" yard="A-A" price="2.09" image="">
<mill>New API Seamless Baoshan</mill>
<location>Houston, TX</location>
</item>
</inventory>
****************************************************************************
*******
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE inventory SYSTEM "inventory.dtd">
<inventory>
<item id="0" size="4.500" weight="11.60" grade="K-55" endFin="LTC"
status="IN STOCK" footage="53505.9" yard="A-A">
<mill>New API Seamless Baoshan</mill>
<location>Houston, TX</location>
</item>
</inventory>
I am trying to match elements in two different document like the ones given
below using the following xpath.
//item[@size='4.500' and @weight='11.60' and @grade='K-55' and @endFin='LTC'
and @yard='A-A' and mill='New API Seamless Baoshan' and location='Houston,
TX' and @status='IN STOCK']
This was working, but something went wrong.
Any advice?
Jason Long - CEO and Chief Software Engineer
Supernova Software - supernovasoftware.com
BS Physics, MS Chemical Engineering
-----Original Message-----
From: jdom-interest-admin at jdom.org
[mailto:jdom-interest-admin at jdom.org]On Behalf Of Jason Long
Sent: Monday, March 17, 2003 7:40 PM
To: JDOM
Subject: [jdom-interest] JDOM XPath error...help needed.
I am having a problem that I must resolve immediatly. I am about to have
the client sign off on this project, and a strange behavior has started. I
may be something I changed, but I do not think so. Here is what is going
on.
Example XPath:
//item[@size='4.500' and @weight='11.60' and @grade='K-55' and @endFin='LTC'
and @yard='A-A' and mill='New API Seamless Baoshan' and location='Houston,
TX' and @status='IN STOCK']
This what working, but unexpectedly stopped. I did upgrade to the latest
code, but after I noticed this problem I started to use jdom8 again. This
did not fix the problem. When this xpath is used now, I get the following
error found at the end of this email. I will work if I take the mill and
location out of the xpath. The difference is that these are text nodes and
the rest are attributes. I definately did not change the way I am
generating the xpath, so I am a bit confused why this behavior started. I
need to fix this asap, so any advice would be greatly appreciated.
java.lang.NoSuchMethodError: org.jdom.Text.getValue()Ljava/lang/String;
at
org.jaxen.jdom.DocumentNavigator.getElementStringValue(DocumentNavigator.jav
a:346)
at org.jaxen.function.StringFunction.evaluate(StringFunction.java:52)
at
org.jaxen.expr.DefaultEqualsExpr.evaluateSetString(DefaultEqualsExpr.java:10
6)
at org.jaxen.expr.DefaultEqualityExpr.evaluate(DefaultEqualityExpr.java:79)
at org.jaxen.expr.DefaultAndExpr.evaluate(DefaultAndExpr.java:31)
at org.jaxen.expr.DefaultAndExpr.evaluate(DefaultAndExpr.java:38)
at org.jaxen.expr.DefaultAndExpr.evaluate(DefaultAndExpr.java:38)
at org.jaxen.expr.DefaultAndExpr.evaluate(DefaultAndExpr.java:38)
at org.jaxen.expr.DefaultAndExpr.evaluate(DefaultAndExpr.java:38)
at org.jaxen.expr.DefaultAndExpr.evaluate(DefaultAndExpr.java:38)
at org.jaxen.expr.DefaultPredicate.evaluate(DefaultPredicate.java:45)
at org.jaxen.expr.PredicateSet.evaluatePredicates(PredicateSet.java:112)
at
org.jaxen.expr.DefaultLocationPath.evaluate(DefaultLocationPath.java:157)
at
org.jaxen.expr.DefaultAbsoluteLocationPath.evaluate(DefaultAbsoluteLocationP
ath.java:65)
at org.jaxen.expr.DefaultXPath.asList(DefaultXPath.java:46)
at org.jaxen.JaXPath.jaSelectNodes(JaXPath.java:35)
at org.jaxen.BaseXPath.selectNodes(BaseXPath.java:22)
at com.jmlie.MP3_Publisher.inventory_test.doGet(inventory_test.java:103)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:386)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:530)
at java.lang.Thread.run(Thread.java:536)
Jason Long - CEO and Chief Software Engineer
Supernova Software - supernovasoftware.com
BS Physics, MS Chemical Engineering
_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com
More information about the jdom-interest
mailing list