Open basex.bat:
=================
> XQUERY db:open('JunitDocbaseDB', '6301904f80000114/0601904f80007547.xml')
<!--
Configuration file for user test suite.
-->
<testSuiteConfig version="2.0">
<testSuiteEnv>
<paths>
<path type="input" value="../data"/>
</paths>
</testSuiteEnv>
<package name="com.documentum.test.xhive_integration.uc_1.uc_1_1">
<test name="TC_1_1_1" className="TC_1_1_1"/>
</package>
</testSuiteConfig>
Query executed in 12.59 ms.
> XQUERY for $article in doc('6301904f80000114/0601904f80007547.xml') return $article
Stopped at ., 1/20:
[FODC0002] Resource 'C:/Srikumar/Software/BaseX/BaseX941/basex/bin/6301904f80000114/0601904f80007547.xml' does not exist.
Run same xquery from java program:
==================================
XQPreparedExpression xqPreparedExpr = null;
XQResultSequence resultSeq = null;
String xQuery = "for $article in doc('6301904f80000114/0601904f80007547.xml') return $article";
xqPreparedExpr = m_conn.prepareExpression(xQuery);
resultSeq = xqPreparedExpr.executeQuery();
Log:
====
[13:17:10.034] TRACE: XQConnection-1.prepareExpression(String) invoked, with the raw XQuery of: for $article in doc('6301904f80000114/0601904f80007547.xml') return $article
[13:17:10.034] TRACE: XQConnection-1.prepareExpression(String, XQStaticContext) invoked, with the raw XQuery of: for $article in doc('6301904f80000114/0601904f80007547.xml') return $article
[13:17:10.035] TRACE: XQPreparedExpression-1.executeQuery() invoked, with the raw XQuery of: for $article in doc('6301904f80000114/0601904f80007547.xml') return $article
[13:17:10.036] TRACE: XQPreparedExpression-1.executeQuery(), raw XQuery resolved to: for $article in doc('6301904f80000114/0601904f80007547.xml') return $article
javax.xml.xquery.XQException:
BXCE001 - Stopped at ., 1/20:
[FODC0002] Resource 'C:/Srikumar/Software/BaseX/BaseX941/basex/bin/6301904f80000114/0601904f80007547.xml' does not exist.
Run same xquery using above same java program:(after opening basexgui.bat and open "JunitDocbaseDB" database in GUI)
==============================================
log:
====
[13:22:49.313] TRACE: XQConnection-2.prepareExpression(String) invoked, with the raw XQuery of: for $article in doc('6301904f80000114/0601904f80007547.xml') return $article
[13:22:49.313] TRACE: XQConnection-2.prepareExpression(String, XQStaticContext) invoked, with the raw XQuery of: for $article in doc('6301904f80000114/0601904f80007547.xml') return $article
[13:22:49.315] TRACE: XQPreparedExpression-1.executeQuery() invoked, with the raw XQuery of: for $article in doc('6301904f80000114/0601904f80007547.xml') return $article
[13:22:49.315] TRACE: XQPreparedExpression-1.executeQuery(), raw XQuery resolved to: for $article in doc('6301904f80000114/0601904f80007547.xml') return $article
[13:22:49.318] DEBUG: XQPreparedExpression-1.close() invoked.
Finished executing xquery with query
Start iterating through the xquery results for query
0 Result : <!--
Configuration file for user test suite.
-->
<testSuiteConfig version="2.0">
<testSuiteEnv>
<paths>
<path type="input" value="../data"/>
</paths>
</testSuiteEnv>
<package name="com.documentum.test.xhive_integration.uc_1.uc_1_1">
<test name="TC_1_1_1" className="TC_1_1_1"/>
</package>
</testSuiteConfig>