Hi,
I wrote a very simple java application using QuiP. I have a xml document stored in my local filesystem called"bib.xml", and I’m trying to execute a query. I get an exception, but no info in the Exception telling me what the problem might be. I’m thinking that it’s possible that either the xml doc or the query that I’m trying to execute are not correct. Any help would be greatly appreciated.
Thank you,
Maria
The sample code is:
// create a QuiP connection
Properties obj = new Properties();
obj.put(“home”,“C:\quip161\QuiP\”);
obj.put(“quipcmd”,“C:\quip161\QuiP\quip.exe” );
StringBuffer file = new StringBuffer();
file.append(“file://.”);
QuiPConnection qc = new QuiPConnection(file.toString(), obj);
// execute query
QueryResult qr = qc.executeQuery(query);
Document result = qr.getDocument();
The example document is:
TCP/IP Illustrated
Stevens
W.
Addison-Wesley
65.95
The example query is:
FOR $book IN document(“bib.xml”)//book WHERE $book/publisher = “Addison-Wesley” RETURN $book/title
And the Exception that I get is:
com.softwareag.xtools.quip.xqueryAPI.XQueryException: org/apache/crimson/tr
ee/XmlDocument
at com.softwareag.xtools.quip.xqueryAPI.QuiPConnection.executeQuery
(QuiPConnection.java:72)
at OpXquery.processTuple(OpXquery.java:242)
at OpXquery.on_in_rel(OpXquery.java:87)
at java.lang.reflect.Method.invoke(Native Method)
at theseus.executor.basic.BasicOperatorManager.invokeStreamingMetho
d(BasicOperatorManager.java:1081)
at theseus.executor.basic.BasicOperatorManager.processFiring(BasicO
peratorManager.java:843)
at theseus.executor.basic.BasicOperatorManager.handleEvent(BasicOpe
ratorManager.java:741)
at theseus.executor.basic.BasicOperatorManager.run(BasicOperatorMan
ager.java:1472)
at java.lang.Thread.run(Unknown Source)