I believe the physical collection is ok. The physical collection lives in
the database
and is fine. At runtime, you make a call to DatabaseManager.getCollection(),
this returns a "collection". This is the "collection" I am trying to
determine if
it is ok. In order for it to be ok, you have to register the database and
then
call getCollection. So, the test I would like you to run is, right after you
call
Collection col = DatabaseManager.getCollection("mycollectionname"), try and
use that col to access the document you are trying to update. Try to read
it.
If you can, then that eliminates a chunk of possible errors.
HTH,
Mark
Thomas Sempf wrote:
> >
> Hi,
>
> the request for a document over getContent is no problem. I am also
> capable of getting a node from the document over a xpath query. So i
> think there is no problem with collection, or is there one?
>
> Greetings
>
> Thomas Sempf
>
> > 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
> >