Hi there,
I'm loving xmlbeans but one weird thing has held me up for a day or so
now and I could do with some help.
I'm using xmlbeans 2.4.0 combined with Saxon 9 to perform Xpath
lookups on my document. All works well when running in the context of
Eclipse and JUnit.
However when I run via maven (mvn test) I get the message:
java.lang.RuntimeException: Trying XBeans path engine... Trying
XQRL... Trying Saxon... FAILED on declare namespace gml='http://www.opengis.net/gml/3.2';declare
namespace wp='http://www.classactionpl.com/gml/worldPolitical';$this/wp:World/gml:name
[lower-case(text())='earth political']/../*/gml:name[lower-
case(text())='australia']/../*/gml:name[lower-case(text())='new south
wales']/..
...which implies that it can't find Saxon on the classpath right? (any
further elaboration on what causes this message would be appreciated).
If I look at the Surefire report then here's the classpath for the test:
<property value="/Users/huntc/Development/Eclipse/workspace/World
Political GML Model/target/classes:/Users/huntc/Development/Eclipse/
workspace/World Political GML Model/target/test-classes:/Users/
huntc/.m2/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar:/
Users/huntc/.m2/repository/org/apache/xmlbeans/xmlbeans-xpath/2.4.0/
xmlbeans-xpath-2.4.0.jar:/Users/huntc/.m2/repository/org/apache/
xmlbeans/xmlbeans/2.3.0/xmlbeans-2.3.0.jar:/Users/huntc/.m2/repository/
junit/junit/3.8.1/junit-3.8.1.jar:/Users/huntc/.m2/repository/net/sf/
json-lib/json-lib/2.2.3/json-lib-2.2.3-jdk15.jar:/Users/huntc/.m2/
repository/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga.jar:/
Users/huntc/.m2/repository/org/hibernate/hibernate-commons-annotations/
3.0.0.ga/hibernate-commons-annotations-3.0.0.ga.jar:/Users/huntc/.m2/
repository/commons-logging/commons-logging/1.0.4/commons-
logging-1.0.4.jar:/Users/huntc/.m2/repository/stax/stax-api/1.0.1/stax-
api-1.0.1.jar:/Users/huntc/.m2/repository/antlr/antlr/2.7.6/
antlr-2.7.6.jar:/Users/huntc/.m2/repository/commons-beanutils/commons-
beanutils/1.7.0/commons-beanutils-1.7.0.jar:/Users/huntc/.m2/
repository/org/codehaus/plexus/plexus-container-default/1.0-alpha-9-
stable-1/plexus-container-default-1.0-alpha-9-stable-1.jar:/Users/
huntc/.m2/repository/org/apache/maven/maven-profile/2.0.6/maven-
profile-2.0.6.jar:/Users/huntc/.m2/repository/com/vividsolutions/jts/
1.8/jts-1.8.jar:/Users/huntc/.m2/repository/asm/asm/1.5.3/
asm-1.5.3.jar:/Users/huntc/.m2/repository/org/apache/maven/maven-
plugin-registry/2.0.6/maven-plugin-registry-2.0.6.jar:/Users/huntc/.m2/
repository/org/apache/maven/maven-project/2.0.6/maven-
project-2.0.6.jar:/Users/huntc/.m2/repository/org/apache/maven/maven-
settings/2.0.6/maven-settings-2.0.6.jar:/Users/huntc/.m2/repository/
net/sf/saxon/saxon-dom/9.1.0.6/saxon-dom-9.1.0.6.jar:/Users/huntc/.m2/
repository/net/sf/saxon/saxon/9.1.0.6/saxon-9.1.0.6.jar:/Users/
huntc/.m2/repository/xml-resolver/xml-resolver/1.2/xml-
resolver-1.2.jar:/Users/huntc/.m2/repository/org/hibernate/ejb3-
persistence/1.0.1.GA/ejb3-persistence-1.0.1.GA.jar:/Users/huntc/.m2/
repository/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6.jar:/Users/
huntc/.m2/repository/org/apache/maven/maven-artifact-manager/2.0.6/
maven-artifact-manager-2.0.6.jar:/Users/huntc/.m2/repository/org/
apache/maven/maven-plugin-api/2.0.6/maven-plugin-api-2.0.6.jar:/Users/
huntc/.m2/repository/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3.jar:/
Users/huntc/.m2/repository/org/hibernate/hibernate-annotations/
3.3.1.GA/hibernate-annotations-3.3.1.GA.jar:/Users/huntc/.m2/
repository/org/apache/maven/wagon/wagon-provider-api/1.0-beta-2/wagon-
provider-api-1.0-beta-2.jar:/Users/huntc/.m2/repository/commons-lang/
commons-lang/2.4/commons-lang-2.4.jar:/Users/huntc/.m2/repository/
classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar:/Users/
huntc/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar:/Users/
huntc/.m2/repository/org/apache/maven/maven-repository-metadata/2.0.6/
maven-repository-metadata-2.0.6.jar:/Users/huntc/.m2/repository/cglib/
cglib/2.1_3/cglib-2.1_3.jar:/Users/huntc/.m2/repository/asm/asm-attrs/
1.5.3/asm-attrs-1.5.3.jar:/Users/huntc/.m2/repository/org/apache/maven/
maven-artifact/2.0.6/maven-artifact-2.0.6.jar:/Users/huntc/.m2/
repository/commons-collections/commons-collections/3.2/commons-
collections-3.2.jar:/Users/huntc/.m2/repository/com/classactionpl/gml/
gml/1.1.0-SNAPSHOT/gml-1.1.0-SNAPSHOT.jar:/Users/huntc/.m2/repository/
log4j/log4j/1.2.14/log4j-1.2.14.jar:/Users/huntc/.m2/repository/org/
codehaus/plexus/plexus-utils/1.4.2/plexus-utils-1.4.2.jar:/Users/
huntc/.m2/repository/org/apache/maven/maven-model/2.0.6/maven-
model-2.0.6.jar:" name="surefire.test.class.path"/>
As you can see the Saxon jars are on the classpath.
Any guidance? Thanks for any help.
Kind regards,
Christopher