You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by "Iveland, Espen" <es...@avinor.no> on 2006/11/21 10:07:33 UTC

XPath problem

Hi,
 
I want to make a query using xpath against an XMLObject, but no matter
what I put in my query, I get the same exception:
 
java.lang.RuntimeException:  Trying XBeans path engine... Trying XQRL...
Trying Saxon... FAILED on <my query string>
 at org.apache.xmlbeans.impl.store.Path.getCompiledPath(Path.java:131)
 at org.apache.xmlbeans.impl.store.Path.getCompiledPath(Path.java:91)
 at org.apache.xmlbeans.impl.store.Cursor._selectPath(Cursor.java:902)
 at org.apache.xmlbeans.impl.store.Cursor.selectPath(Cursor.java:2634)
 at
org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(XmlObjectBase.j
ava:431)
 at
org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(XmlObjectBase.j
ava:415)
 ...
 
A typical query that fails may look like:
 
String query = "declare namespace s='http://<my.name.space>;" +
               "$this/s:objects/s:object/s:id eq " + id;
 
 
I use XML beans 2.2.0 and have tried saxon 8.6.1 and 8.8 with the same
result. My classpath includes (in this order) saxon8.jar,
saxon8-xpath.jar, xbean.jar and jsr173_1.0_api.jar. I see that many
people have the same problem, but I have not seen a solution. I have
limited experience with xpath, so the problem could be there, but I am
really stuck. Any help would be appreciated.
 
Thanks

RE: XPath problem

Posted by "Webber, David (NIH/OD) [C]" <we...@od.nih.gov>.
My guess is that you don't have the namespace declaration exactly
correct.

 

DW

 

________________________________

From: Iveland, Espen [mailto:espen.iveland@avinor.no] 
Sent: Tuesday, November 21, 2006 4:08 AM
To: user@xmlbeans.apache.org
Subject: XPath problem

 

Hi,

 

I want to make a query using xpath against an XMLObject, but no matter
what I put in my query, I get the same exception:

 

java.lang.RuntimeException:  Trying XBeans path engine... Trying XQRL...
Trying Saxon... FAILED on <my query string>
 at org.apache.xmlbeans.impl.store.Path.getCompiledPath(Path.java:131)
 at org.apache.xmlbeans.impl.store.Path.getCompiledPath(Path.java:91)
 at org.apache.xmlbeans.impl.store.Cursor._selectPath(Cursor.java:902)
 at org.apache.xmlbeans.impl.store.Cursor.selectPath(Cursor.java:2634)
 at
org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(XmlObjectBase.j
ava:431)
 at
org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(XmlObjectBase.j
ava:415)
 ...

 

A typical query that fails may look like:

 

String query = "declare namespace s='http://<my.name.space>;" +
               "$this/s:objects/s:object/s:id eq " + id;

 

 

I use XML beans 2.2.0 and have tried saxon 8.6.1 and 8.8 with the same
result. My classpath includes (in this order) saxon8.jar,
saxon8-xpath.jar, xbean.jar and jsr173_1.0_api.jar. I see that many
people have the same problem, but I have not seen a solution. I have
limited experience with xpath, so the problem could be there, but I am
really stuck. Any help would be appreciated.

 

Thanks


RE: XPath problem

Posted by Radu Preotiuc-Pietro <ra...@bea.com>.
It looks to me like you're missing xbean_xpath.jar from your classpath.
This contains some "glue-code" that's Saxon-dependent and therefore
can't be included in the normal xbean.jar.
 
Radu

________________________________

From: Iveland, Espen [mailto:espen.iveland@avinor.no] 
Sent: Tuesday, November 21, 2006 1:08 AM
To: user@xmlbeans.apache.org
Subject: XPath problem


Hi,
 
I want to make a query using xpath against an XMLObject, but no matter
what I put in my query, I get the same exception:
 
java.lang.RuntimeException:  Trying XBeans path engine... Trying XQRL...
Trying Saxon... FAILED on <my query string>
 at org.apache.xmlbeans.impl.store.Path.getCompiledPath(Path.java:131)
 at org.apache.xmlbeans.impl.store.Path.getCompiledPath(Path.java:91)
 at org.apache.xmlbeans.impl.store.Cursor._selectPath(Cursor.java:902)
 at org.apache.xmlbeans.impl.store.Cursor.selectPath(Cursor.java:2634)
 at
org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(XmlObjectBase.j
ava:431)
 at
org.apache.xmlbeans.impl.values.XmlObjectBase.selectPath(XmlObjectBase.j
ava:415)
 ...
 
A typical query that fails may look like:
 
String query = "declare namespace s='http://<my.name.space>;" +
               "$this/s:objects/s:object/s:id eq " + id;
 
 
I use XML beans 2.2.0 and have tried saxon 8.6.1 and 8.8 with the same
result. My classpath includes (in this order) saxon8.jar,
saxon8-xpath.jar, xbean.jar and jsr173_1.0_api.jar. I see that many
people have the same problem, but I have not seen a solution. I have
limited experience with xpath, so the problem could be there, but I am
really stuck. Any help would be appreciated.
 
Thanks
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.