Hi Cezar,

I've defined the classpath as follows:

    <target name="run" depends="init,build">
        <echo message="============================== running XQueryXPath"/>
        <java
            classname="org.apache.xmlbeans.samples.xquery.XQueryXPath" 
fork="true">
            <arg line="xml/employees.xml"/>
            <classpath>
              <pathelement 
path="${LIB_PATH}/xbean.jar;${LIB_PATH}/xbean_xpath.jar;${LIB_PATH}/jsr173_1.0_api.jar;${LIB_PATH}/saxon8.jar;;build/classes"/>
            </classpath>
        </java>
    </target>

but I got:

  [java] java.lang.IllegalArgumentException: When a DOMSource is used, 
saxon8-dom.jar must be on the classpath

So I've added also:     ${LIB_PATH}/saxon8-dom.jar

Now:

run:
     [echo] ============================== running XQueryXPath
     [java] Running ExecQuery.selectEmpsByStateCursor

     [java] java.lang.NoSuchMethodError: 
net.sf.saxon.query.DynamicQueryContext.getContextNode()Lnet/sf/saxon/om/NodeInfo;
     [java]     at 
org.apache.xmlbeans.impl.xquery.saxon.XBeansXQuery.execQuery(XBeansXQuery.java:76)
     [java]     at 
org.apache.xmlbeans.impl.store.Query$SaxonQueryImpl$SaxonQueryEngine.cursorExecute(Query.java:345)
     [java]     at 
org.apache.xmlbeans.impl.store.Query$SaxonQueryImpl.cursorExecute(Query.java:243)
     [java]     at 
org.apache.xmlbeans.impl.store.Query.cursorExecQuery(Query.java:48)
     [java]     at 
org.apache.xmlbeans.impl.store.Cursor._execQuery(Cursor.java:1336)
     [java]     at 
org.apache.xmlbeans.impl.store.Cursor._execQuery(Cursor.java:1331)
     [java]     at 
org.apache.xmlbeans.impl.store.Cursor.execQuery(Cursor.java:3839)
     [java]     at 
org.apache.xmlbeans.samples.xquery.ExecQuery.updateWorkPhone(ExecQuery.java:74)
     [java]     at 
org.apache.xmlbeans.samples.xquery.XQueryXPath.executeQueries(XQueryXPath.java:75)
     [java]     at 
org.apache.xmlbeans.samples.xquery.XQueryXPath.main(XQueryXPath.java:54)
     [java] Exception in thread "main"
     [java] Java Result: 1

But the saxon8.jar (taken from 
http://easynews.dl.sourceforge.net/sourceforge/saxon/saxonb8-8j.zip) contains 
this class, maybe it is not compatible with xmlbeans-2.2.0.

Regards
Patrizio


-----Original Message-----
From: Cezar Andrei [mailto:[EMAIL PROTECTED] 
Sent: giovedì, 1. marzo 2007 21:27
To: [email protected]
Subject: RE: xmlbeans-2.2.0 and error running XQueryXPath sample


Patrizio,

Make sure you have the following jars on the classpath, not only in build/lib:
  xbean.jar, xbean_xpath.jar, jsr173_1.0_api.jar and saxon.jar.
The latest we tested with is saxonb8-8j from 
http://easynews.dl.sourceforge.net/sourceforge/saxon/saxonb8-8j.zip .

Cezar


________________________________________
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 01, 2007 5:01 AM
To: [email protected]
Subject: xmlbeans-2.2.0 and error running XQueryXPath sample

Hi all,
 
I'm trying to run the XQueryXPath sample bundled with xmlbeans-2.2.0.
 
I've compiled the sample and updated the 
xmlbeans-2.2.0\samples\XQueryXPath\build\lib folder with the below entries:
 
12.06.2006  11:45            23'630 jsr173_1.0_api.jar
12.06.2006  11:45            60'047 resolver.jar
28.02.2007  16:43            40'109 schemas.jar
12.06.2006  11:45         2'664'574 xbean.jar
12.06.2006  11:45             5'578 xbean_xpath.jar
12.06.2006  11:45           429'483 xmlpublic.jar
12.02.2007  11:30         3'728'517 saxon8.jar
I took the first 6 jars from xmlbeans-2.2.0\lib and the last (saxon8.jar) from 
saxonsa8-9j distribution.
I've added the last one because I've found that it is mandatory in order "to 
find the xquery engine".
 
But when I try to run the sample I got the "No query engine found" error:
 
C:\software\xmlbeans-2.2.0\samples\XQueryXPath>ant run
Buildfile: build.xml
 
init:
     [echo] xmlbeans.home: C:\software\xmlbeans-2.2.0
     [echo] xmlbeans.lib: C:\software\xmlbeans-2.2.0/lib
 
schemas.check:
 
schemas.jar:
 
XQueryXPath.classes:
 
build:
 
run:
     [echo] ============================== running XQueryXPath
     [java] Running ExecQuery.selectEmpsByStateCursor
 
     [java] java.lang.RuntimeException: No query engine found
     [java]     at 
org.apache.xmlbeans.impl.store.Query.getCompiledQuery(Query.java:120)
     [java]     at 
org.apache.xmlbeans.impl.store.Query.getCompiledQuery(Query.java:53)
     [java]     at 
org.apache.xmlbeans.impl.store.Query.cursorExecQuery(Query.java:48)
     [java]     at 
org.apache.xmlbeans.impl.store.Cursor._execQuery(Cursor.java:1336)
     [java]     at 
org.apache.xmlbeans.impl.store.Cursor._execQuery(Cursor.java:1331)
     [java]     at 
org.apache.xmlbeans.impl.store.Cursor.execQuery(Cursor.java:3839)
     [java]     at 
org.apache.xmlbeans.samples.xquery.ExecQuery.updateWorkPhone(ExecQuery.java:74)
     [java]     at 
org.apache.xmlbeans.samples.xquery.XQueryXPath.executeQueries(XQueryXPath.java:75)
     [java]     at 
org.apache.xmlbeans.samples.xquery.XQueryXPath.main(XQueryXPath.java:54)
     [java] Exception in thread "main"
     [java] Java Result: 1
 
BUILD SUCCESSFUL
Total time: 3 seconds
 
The saxon8.jar is also present in xmlbeans.lib.
 
Could you please help me in order to understand what is still missing ?
 
Thanks
Regards
Patrizio
 
_______________________________________________________________________
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.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


IMPORTANT:
This e-mail transmission is intended for the named addressee(s)
only.
Its contents are private, confidential and protected from
disclosure
and should not be read, copied or disclosed by any other
person.
If you are not the intended recipient, we kindly ask you to
notify the
sender immediately by telephone (+41 (0)58 806 50 00), to
redirect the
message to the account "[EMAIL PROTECTED]" and to delete this e-
mail.
E-mail transmissions may be intercepted, altered or read by
unauthorized persons and may contain viruses. Therefore, it is
recommended that you use regular mail or courier services for
any
information intended to be confidential. However, by sending us
messages through e-mail, you authorize and instruct us to
correspond by
e-mail in the relevant matter.
Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to