I don't believe the XML:DB exception is based on your xupdate request but has to do with either the run-time state of your collection. My request for the test was for the collection. Can you use the collection to read the document and System.out.println the document.
HTH, Mark Thomas Sempf wrote: > Hi, > > thanks for your answer. Well, here is my xupdate string: > > <xu:modifications version="1.0" > xmlns:xu="http://www.xmldb.org/xupdate"> <xu:update > select="//[EMAIL PROTECTED]'id']">Thomas Sempf</xu:update></xu:modifications> > > And this is the error code: > > XML:DB Exception occured 1 > > I tried to getMessage from the XMLDBException, but the string is > empty :-( > Don�t know how to test if the: > > XUpdateQueryService service =(XUpdateQueryService) > col.getService("XUpdateQueryService", "1.0"); > service.updateResource( Integer.toString( kernid ), xupdate ); > > is working properly. > > Greetings, > > Thomas Sempf > > What I have seen with xupdate is that it is usually silent if > there is a problem. Could you send your output(the xupdate string)? > My gut instinct is that the XML:DB is related to either then > name of the collection or something not being initialized. > Can you put some code in to make sure that the > > XUpdateQueryService service =(XUpdateQueryService) > col.getService("XUpdateQueryService", "1.0"); > service.updateResource( Integer.toString( kernid ), xupdate ); > > is working. I take it kernid is the key of the document that you > inserted? > > HTH, > > Mark > > Thomas Sempf wrote: > > Hello, > > i�ve trying to do some xupdate instructions. But every time i get: > > XML:DB Exception occured 1 > > and nothing is updated. > Here is my xupdate code: > > try { > String xupdate = "<xu:modifications version=\"1.0\"" + > " xmlns:xu=\"http://www.xmldb.org/xupdate\">" + > " <xu:update select=\"/page/header/"+nodeid+ "\">" +node + > "</xu:update>"+ > "</xu:modifications>"; > > System.out.println( xupdate ); > > XUpdateQueryService service =(XUpdateQueryService) > col.getService("XUpdateQueryService", "1.0"); > service.updateResource( Integer.toString( kernid ), xupdate ); > return true; > } > > By the way, i open the db in an other routine. > So any advice out there? > > Greetings > Thomas Sempf
