Can't open file

I am trying to execute a simple query on my servlet and I got this error:

“Can’t open file I-B-5-a.xml”

// Query method
public QueryResult getQueryTitle(String sQuery) {

if (sQuery == null || sQuery.length() == 0) return null;

QueryResult qres = null;
Connection conex = null;
StringBuffer strBuff = new StringBuffer();

strBuff.append(“file://.”);
prop.put(“quipcmd”,“F:/Quip/quip.exe”);
prop.put(“home”,“F:/KB/romenhyouji/”);
prop.put(“target”,“filesystem”);

try{
conex = DriverManager.getConnection(strBuff.toString(),(Properties)prop);
qres = conex.executeQuery(sQuery);
}catch(XQueryException e){
System.out.println(“XQueryException:” + e.getMessage());
}

return qres;
}

// Query on subject definition that prompt an error
for $f in document(concat(‘F:/KB/romenhyouji/’,‘files.xml’))//file,
$d in document(concat(‘F:/KB/romenhyouji/’,$f/text()))/kb
where contains($d/subject/definition/text(),‘???’)
return

{document($f/text())//title}
{$f}

sortby(title)

// The query mentioned above generate this error.
<?xml version="1.0" encoding="UTF-8" ?>

<quip:ExecutionError xmlns:quip=“http://namespaces.softwareag.com/tamino/quip/”>
quip:queryFileD:\DOCUME~1\aedls\LOCALS~1\Temp\Query48147.tmp
</quip:queryFile>
quip:message<![CDATA[Error 6: Can't open file I-B-5-a.xml
]]></quip:message>
</quip:ExecutionError>

// On the other hand, the following query string is working properly on my servlet.

for $f in document(concat(‘F:/KB/romenhyouji/’,‘files.xml’))//file,
$t in document(concat(‘F:/KB/romenhyouji/’,$f/text()))//title
where contains($t/text(),‘???’)
return

{$t}
{$f}

sortby(title)


These queries are both working in DOS command prompt and Quip GUI.
What went wrong? Is it my Quip setting or XQuery command. Please help. :confused:

To whom it may concern:
I am sorry if I just waste your time. The problem that I posted yesterday has been solved. The error is on the XQuery statements as follows:

// Query on subject definition that prompt an error
for $f in document(concat(‘F:/KB/romenhyouji/’,‘files.xml’))//file,
$d in document(concat(‘F:/KB/romenhyouji/’,$f/text()))/kb
where contains($d/subject/definition/text(),‘???’)
return


{document($f/text())//title}
{$f}

sortby(title)

// change into
for $f in document(concat(‘F:/KB/romenhyouji/’,‘files.xml’))//file,
$kb in document(concat(‘F:/KB/romenhyouji/’,$f/text()))/kb
where contains($kb/subject/definition/text(),‘???’)
return


{$kb/title}
{$f}

sortby(title)


:slight_smile: Thank you for your time.