Line 142 in XUpdateQueryResolver.java ($Revision: 1.13 $) has: xu.execute(doc.getDocumentElement());
Which means that doc is null (xu can not be null). Doc is obtained in previous line:
Document doc = context.getDocument(keys[i]);
So, may be the document mentioned above (with id keys[i]) does not exist? You can set a breakpoint and investigate this issue further.
Vadim
Peter Charles wrote:
Sorry to leave this critical info out, it was late :( I am running 1.1b4 on win2000 jdk 1.4_2, tomcat 5
Xindice and my app are running in the same tomcat container. As I said this works fine except when called from with in my webapp. All other basic db commands, add, retrive, delete, query are working fine when called from the webapp.
The command as a string
String config ="<xu:modifications version=\"1.0\"" + " xmlns:xu=\"http://www.xmldb.org/xupdate\">" + " <xu:update select=\"/food/[EMAIL PROTECTED] = '3']\">" + " FRESH FISH" + " </xu:update>" + "</xu:modifications>";
My method;
public boolean XUpdate(String documentID, String command) { String xupdate = command; String key = documentID; boolean updated = false; try { XUpdateQueryService service = (XUpdateQueryService) col.getService( "XUpdateQueryService", "1.0"); service.updateResource(key, xupdate); updated=true; } catch (XMLDBException e) { System.err.println( "XML:DB Exception occured " + e.errorCode + " " + e.getMessage()); } return updated; } Hello,
Can any one give me a clue what the below error means? I only get this error when I call my database access class from a web app. When I call the same class with the same XUpdate commands from a test class, It works fine...
Thanks
Peter
Mar 10, 2004 7:27:22 PM org.apache.xindice.core.Collection queryDocument
INFO: [http8888-Processor24] '/db/test' Query document food4.xml, query:
<xu:modifications version="1.0"
xmlns:xu="http://www.xmldb.org/xupdate"> <xu:update
select="/food/[EMAIL PROTECTED] = '3']"> Spring Chicken
</xu:update></xu:modifications>
Mar 10, 2004 7:27:22 PM
org.apache.xindice.core.xupdate.XUpdateQueryResolver$XUpdateQuery
execute
WARNING: ignored exception
java.lang.NullPointerException
at
org.apache.xindice.core.xupdate.XUpdateQueryResolver$XUpdateQuery.execut
e(XUpdateQueryResolver.java:142)
at
org.apache.xindice.core.xupdate.XUpdateQueryResolver.query(XUpdateQueryR
esolver.java:84)
at
org.apache.xindice.core.query.QueryEngine.query(QueryEngine.java:122)
at
org.apache.xindice.core.Collection.queryDocument(Collection.java:1249)
at
org.apache.xindice.server.rpc.messages.Query.execute(Query.java:58)
at
org.apache.xindice.server.rpc.RPCMessageInterface.run(RPCMessageInterfac
e.java:48)
...