|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
DOCUMENT_NOT_FOUND when try to delete while iterating over XQuery result set
by Matt Magoffin-4
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message Hello,
I've been having a problem appear every so often that I can't seem to track down. It seems to happen more frequently after loading sets of data, but I cannot be sure exactly of the cause. The symptom is that I execute an XQuery and then try to delete all the documents resulting from the XQuery, all within a transaction. If I step through the code in a debugger, I see BDB XML returning the XmlDocument instances, but then throws the below exception: ----- Error: Document not found: 4991476, errcode = DOCUMENT_NOT_FOUND at com.sleepycat.dbxml.dbxml_javaJNI.XmlContainer_deleteDocument__SWIG_2(Native Method) at com.sleepycat.dbxml.XmlContainer.deleteDocument(XmlContainer.java:367) ----- The general flow of the program is this: ----- XmlQueryContext context = xmlManager.createQueryContext(); XmlQueryExpression qe = createQueryExpression(criteria, context, XmlQueryContext.LiveValues, XmlQueryContext.Lazy); XmlResults results = qe.execute(holder.getTransaction(), context); XmlUpdateContext updateContext = xmlManager.createUpdateContext(); XmlDocument docToDelete = xmlManager.createDocument(); while ( results.next(docToDelete) ) { xmlContainer.deleteDocument(holder.getTransaction(), docToDelete, updateContext); } ----- I've tried experimenting with XmlQueryContext.Eager, but that did not seem to make any difference. Are there any situations that the results of the XQuery could not be found in this way? I figured if the query returns the document it should be able to be deleted? The actual XQuery I'm using is pretty simple: (31 Jul 2006 21:55:10) DEBUG QueryPlan for XQuery [collection('dealers.dbxml')/als:dealer[@active = true()]]: <XQuery> <Navigation> <QueryPlanFunction result="collection" container="dealers.dbxml"> <OQPlan>n(V(node-attribute-equality-boolean,@active,=,'true'),P(node-element-presence-none,=,dealer:http://autoleadservice.com/xml/als))</OQPlan> </QueryPlanFunction> <Step axis="child" uri="http://autoleadservice.com/xml/als" name="dealer" nodeType="element"/> <DbXmlFilter> <Navigation> <Step axis="attribute" name="active" nodeType="attribute"/> <DbXmlCompare name="equal"> <Sequence> <AnyAtomicTypeConstructor value="true" typeuri="http://www.w3.org/2001/XMLSchema" typename="boolean"/> </Sequence> </DbXmlCompare> </Navigation> </DbXmlFilter> </Navigation> </XQuery> Thanks for any insight... -- m@ ------------------------------------------ To remove yourself from this list, send an email to xml-unsubscribe@... |
|
|
Re: DOCUMENT_NOT_FOUND when try to delete while iterating over XQuery result set
by Matt Magoffin-4
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message I recompiled BDB XML against DB 4.4.20, and the problems seem to have gone
away. I had been using the DB 4.3 that came with XML 2.2.13 previously. -- m@ > Hello, > > I've been having a problem appear every so often that I can't seem to > track down. It seems to happen more frequently after loading sets of data, > but I cannot be sure exactly of the cause. > > The symptom is that I execute an XQuery and then try to delete all the > documents resulting from the XQuery, all within a transaction. If I step > through the code in a debugger, I see BDB XML returning the XmlDocument > instances, but then throws the below exception: > > ----- > Error: Document not found: 4991476, errcode = DOCUMENT_NOT_FOUND > at > com.sleepycat.dbxml.dbxml_javaJNI.XmlContainer_deleteDocument__SWIG_2(Native > Method) > at > com.sleepycat.dbxml.XmlContainer.deleteDocument(XmlContainer.java:367) > ----- > > The general flow of the program is this: > > ----- > XmlQueryContext context = xmlManager.createQueryContext(); > XmlQueryExpression qe = createQueryExpression(criteria, context, > XmlQueryContext.LiveValues, XmlQueryContext.Lazy); > XmlResults results = qe.execute(holder.getTransaction(), context); > > XmlUpdateContext updateContext = xmlManager.createUpdateContext(); > XmlDocument docToDelete = xmlManager.createDocument(); > while ( results.next(docToDelete) ) { > xmlContainer.deleteDocument(holder.getTransaction(), > docToDelete, updateContext); > } > ----- > > I've tried experimenting with XmlQueryContext.Eager, but that did not seem > to make any difference. > > Are there any situations that the results of the XQuery could not be found > in this way? I figured if the query returns the document it should be able > to be deleted? The actual XQuery I'm using is pretty simple: > > (31 Jul 2006 21:55:10) DEBUG QueryPlan for XQuery > [collection('dealers.dbxml')/als:dealer[@active = true()]]: > <XQuery> > <Navigation> > <QueryPlanFunction result="collection" container="dealers.dbxml"> > <OQPlan>n(V(node-attribute-equality-boolean,@active,=,'true'),P(node-element-presence-none,=,dealer:http://autoleadservice.com/xml/als))</OQPlan> > </QueryPlanFunction> > <Step axis="child" uri="http://autoleadservice.com/xml/als" > name="dealer" nodeType="element"/> > <DbXmlFilter> > <Navigation> > <Step axis="attribute" name="active" nodeType="attribute"/> > <DbXmlCompare name="equal"> > <Sequence> > <AnyAtomicTypeConstructor value="true" > typeuri="http://www.w3.org/2001/XMLSchema" > typename="boolean"/> > </Sequence> > </DbXmlCompare> > </Navigation> > </DbXmlFilter> > </Navigation> > </XQuery> > > Thanks for any insight... > > -- m@ > > > > ------------------------------------------ > To remove yourself from this list, send an > email to xml-unsubscribe@... > > ------------------------------------------ To remove yourself from this list, send an email to xml-unsubscribe@... |
|
|
Re: DOCUMENT_NOT_FOUND when try to delete while iterating over XQuery result set
by Matt Magoffin-4
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message Sorry, actually I spoke too soon. I still see the below exception, even
with DB 4.4. Any insight would be appreciated! -- m@ > I recompiled BDB XML against DB 4.4.20, and the problems seem to have gone > away. I had been using the DB 4.3 that came with XML 2.2.13 previously. > > -- m@ > >> Hello, >> >> I've been having a problem appear every so often that I can't seem to >> track down. It seems to happen more frequently after loading sets of >> data, >> but I cannot be sure exactly of the cause. >> >> The symptom is that I execute an XQuery and then try to delete all the >> documents resulting from the XQuery, all within a transaction. If I step >> through the code in a debugger, I see BDB XML returning the XmlDocument >> instances, but then throws the below exception: >> >> ----- >> Error: Document not found: 4991476, errcode = DOCUMENT_NOT_FOUND >> at >> com.sleepycat.dbxml.dbxml_javaJNI.XmlContainer_deleteDocument__SWIG_2(Native >> Method) >> at >> com.sleepycat.dbxml.XmlContainer.deleteDocument(XmlContainer.java:367) >> ----- >> >> The general flow of the program is this: >> >> ----- >> XmlQueryContext context = xmlManager.createQueryContext(); >> XmlQueryExpression qe = createQueryExpression(criteria, context, >> XmlQueryContext.LiveValues, XmlQueryContext.Lazy); >> XmlResults results = qe.execute(holder.getTransaction(), context); >> >> XmlUpdateContext updateContext = xmlManager.createUpdateContext(); >> XmlDocument docToDelete = xmlManager.createDocument(); >> while ( results.next(docToDelete) ) { >> xmlContainer.deleteDocument(holder.getTransaction(), >> docToDelete, updateContext); >> } >> ----- >> >> I've tried experimenting with XmlQueryContext.Eager, but that did not >> seem >> to make any difference. >> >> Are there any situations that the results of the XQuery could not be >> found >> in this way? I figured if the query returns the document it should be >> able >> to be deleted? The actual XQuery I'm using is pretty simple: >> >> (31 Jul 2006 21:55:10) DEBUG QueryPlan for XQuery >> [collection('dealers.dbxml')/als:dealer[@active = true()]]: >> <XQuery> >> <Navigation> >> <QueryPlanFunction result="collection" container="dealers.dbxml"> >> <OQPlan>n(V(node-attribute-equality-boolean,@active,=,'true'),P(node-element-presence-none,=,dealer:http://autoleadservice.com/xml/als))</OQPlan> >> </QueryPlanFunction> >> <Step axis="child" uri="http://autoleadservice.com/xml/als" >> name="dealer" nodeType="element"/> >> <DbXmlFilter> >> <Navigation> >> <Step axis="attribute" name="active" nodeType="attribute"/> >> <DbXmlCompare name="equal"> >> <Sequence> >> <AnyAtomicTypeConstructor value="true" >> typeuri="http://www.w3.org/2001/XMLSchema" >> typename="boolean"/> >> </Sequence> >> </DbXmlCompare> >> </Navigation> >> </DbXmlFilter> >> </Navigation> >> </XQuery> >> >> Thanks for any insight... >> >> -- m@ >> >> >> >> ------------------------------------------ >> To remove yourself from this list, send an >> email to xml-unsubscribe@... >> >> > > > > ------------------------------------------ > To remove yourself from this list, send an > email to xml-unsubscribe@... > > ------------------------------------------ To remove yourself from this list, send an email to xml-unsubscribe@... |
|
|
Re: DOCUMENT_NOT_FOUND when try to delete while iterating over XQuery result set
by George Feinberg-3
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message Matt,
The most obvious explanation is that you are getting more than one result for that document, and removing it based on the first result. Then, when you process your second result, the document's gone. If this is possible, just catch, and ignore this exception. You can change your deleteDocument() call to one that just prints out the document name to see if this is happening. George On Jul 31, 2006, at 10:59 PM, Matt Magoffin wrote: > Sorry, actually I spoke too soon. I still see the below exception, > even > with DB 4.4. > > Any insight would be appreciated! > > -- m@ > >> I recompiled BDB XML against DB 4.4.20, and the problems seem to >> have gone >> away. I had been using the DB 4.3 that came with XML 2.2.13 >> previously. >> >> -- m@ >> >>> Hello, >>> >>> I've been having a problem appear every so often that I can't >>> seem to >>> track down. It seems to happen more frequently after loading sets of >>> data, >>> but I cannot be sure exactly of the cause. >>> >>> The symptom is that I execute an XQuery and then try to delete >>> all the >>> documents resulting from the XQuery, all within a transaction. If >>> I step >>> through the code in a debugger, I see BDB XML returning the >>> XmlDocument >>> instances, but then throws the below exception: >>> >>> ----- >>> Error: Document not found: 4991476, errcode = DOCUMENT_NOT_FOUND >>> at >>> com.sleepycat.dbxml.dbxml_javaJNI.XmlContainer_deleteDocument__SWIG_ >>> 2(Native >>> Method) >>> at >>> com.sleepycat.dbxml.XmlContainer.deleteDocument(XmlContainer.java: >>> 367) >>> ----- >>> >>> The general flow of the program is this: >>> >>> ----- >>> XmlQueryContext context = xmlManager.createQueryContext(); >>> XmlQueryExpression qe = createQueryExpression(criteria, context, >>> XmlQueryContext.LiveValues, XmlQueryContext.Lazy); >>> XmlResults results = qe.execute(holder.getTransaction(), context); >>> >>> XmlUpdateContext updateContext = xmlManager.createUpdateContext(); >>> XmlDocument docToDelete = xmlManager.createDocument(); >>> while ( results.next(docToDelete) ) { >>> xmlContainer.deleteDocument(holder.getTransaction(), >>> docToDelete, updateContext); >>> } >>> ----- >>> >>> I've tried experimenting with XmlQueryContext.Eager, but that did >>> not >>> seem >>> to make any difference. >>> >>> Are there any situations that the results of the XQuery could not be >>> found >>> in this way? I figured if the query returns the document it >>> should be >>> able >>> to be deleted? The actual XQuery I'm using is pretty simple: >>> >>> (31 Jul 2006 21:55:10) DEBUG QueryPlan for XQuery >>> [collection('dealers.dbxml')/als:dealer[@active = true()]]: >>> <XQuery> >>> <Navigation> >>> <QueryPlanFunction result="collection" >>> container="dealers.dbxml"> >>> <OQPlan>n(V(node-attribute-equality- >>> boolean,@active,=,'true'),P(node-element-presence- >>> none,=,dealer:http://autoleadservice.com/xml/als))</OQPlan> >>> </QueryPlanFunction> >>> <Step axis="child" uri="http://autoleadservice.com/xml/als" >>> name="dealer" nodeType="element"/> >>> <DbXmlFilter> >>> <Navigation> >>> <Step axis="attribute" name="active" nodeType="attribute"/> >>> <DbXmlCompare name="equal"> >>> <Sequence> >>> <AnyAtomicTypeConstructor value="true" >>> typeuri="http://www.w3.org/2001/XMLSchema" >>> typename="boolean"/> >>> </Sequence> >>> </DbXmlCompare> >>> </Navigation> >>> </DbXmlFilter> >>> </Navigation> >>> </XQuery> >>> >>> Thanks for any insight... >>> >>> -- m@ >>> >>> >>> >>> ------------------------------------------ >>> To remove yourself from this list, send an >>> email to xml-unsubscribe@... >>> >>> >> >> >> >> ------------------------------------------ >> To remove yourself from this list, send an >> email to xml-unsubscribe@... >> >> > > > > ------------------------------------------ > To remove yourself from this list, send an > email to xml-unsubscribe@... > ------------------------------------------ To remove yourself from this list, send an email to xml-unsubscribe@... |
|
|
Re: DOCUMENT_NOT_FOUND when try to delete while iterating over XQuery result set
by Matt Magoffin-4
::
Rate this Message:
Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message I added a catch for this exception, and noticed for one query 117
DOCUMENT_NOT_FOUND exceptions for only 2 actual deletions. For the 117 exceptions, they all appear to have unique document names. This problem seems somewhat related to the other DOCUMENT_NOT_FOUND problem I noted another email thread... because after adding the check to ignore the error and continue, my application then attempted to load data in and ran into the DOCUMENT_NOT_FOUND during a updateDocument() call. -- m@ > Matt, > > The most obvious explanation is that you are getting more > than one result for that document, and removing it > based on the first result. Then, when you process > your second result, the document's gone. > > If this is possible, just catch, and ignore this exception. > > You can change your deleteDocument() call to one > that just prints out the document name to see if > this is happening. > > George > > On Jul 31, 2006, at 10:59 PM, Matt Magoffin wrote: > >> Sorry, actually I spoke too soon. I still see the below exception, >> even >> with DB 4.4. >> >> Any insight would be appreciated! >> >> -- m@ >> >>> I recompiled BDB XML against DB 4.4.20, and the problems seem to >>> have gone >>> away. I had been using the DB 4.3 that came with XML 2.2.13 >>> previously. >>> >>> -- m@ >>> >>>> Hello, >>>> >>>> I've been having a problem appear every so often that I can't >>>> seem to >>>> track down. It seems to happen more frequently after loading sets of >>>> data, >>>> but I cannot be sure exactly of the cause. >>>> >>>> The symptom is that I execute an XQuery and then try to delete >>>> all the >>>> documents resulting from the XQuery, all within a transaction. If >>>> I step >>>> through the code in a debugger, I see BDB XML returning the >>>> XmlDocument >>>> instances, but then throws the below exception: >>>> >>>> ----- >>>> Error: Document not found: 4991476, errcode = DOCUMENT_NOT_FOUND >>>> at >>>> com.sleepycat.dbxml.dbxml_javaJNI.XmlContainer_deleteDocument__SWIG_ >>>> 2(Native >>>> Method) >>>> at >>>> com.sleepycat.dbxml.XmlContainer.deleteDocument(XmlContainer.java: >>>> 367) >>>> ----- >>>> >>>> The general flow of the program is this: >>>> >>>> ----- >>>> XmlQueryContext context = xmlManager.createQueryContext(); >>>> XmlQueryExpression qe = createQueryExpression(criteria, context, >>>> XmlQueryContext.LiveValues, XmlQueryContext.Lazy); >>>> XmlResults results = qe.execute(holder.getTransaction(), context); >>>> >>>> XmlUpdateContext updateContext = xmlManager.createUpdateContext(); >>>> XmlDocument docToDelete = xmlManager.createDocument(); >>>> while ( results.next(docToDelete) ) { >>>> xmlContainer.deleteDocument(holder.getTransaction(), >>>> docToDelete, updateContext); >>>> } >>>> ----- >>>> >>>> I've tried experimenting with XmlQueryContext.Eager, but that did >>>> not >>>> seem >>>> to make any difference. >>>> >>>> Are there any situations that the results of the XQuery could not be >>>> found >>>> in this way? I figured if the query returns the document it >>>> should be >>>> able >>>> to be deleted? The actual XQuery I'm using is pretty simple: >>>> >>>> (31 Jul 2006 21:55:10) DEBUG QueryPlan for XQuery >>>> [collection('dealers.dbxml')/als:dealer[@active = true()]]: >>>> <XQuery> >>>> <Navigation> >>>> <QueryPlanFunction result="collection" >>>> container="dealers.dbxml"> >>>> <OQPlan>n(V(node-attribute-equality- >>>> boolean,@active,=,'true'),P(node-element-presence- >>>> none,=,dealer:http://autoleadservice.com/xml/als))</OQPlan> >>>> </QueryPlanFunction> >>>> <Step axis="child" uri="http://autoleadservice.com/xml/als" >>>> name="dealer" nodeType="element"/> >>>> <DbXmlFilter> >>>> <Navigation> >>>> <Step axis="attribute" name="active" nodeType="attribute"/> >>>> <DbXmlCompare name="equal"> >>>> <Sequence> >>>> <AnyAtomicTypeConstructor value="true" >>>> typeuri="http://www.w3.org/2001/XMLSchema" >>>> typename="boolean"/> >>>> </Sequence> >>>> </DbXmlCompare> >>>> </Navigation> >>>> </DbXmlFilter> >>>> </Navigation> >>>> </XQuery> >>>> >>>> Thanks for any insight... >>>> >>>> -- m@ >>>> >>>> >>>> >>>> ------------------------------------------ >>>> To remove yourself from this list, send an >>>> email to xml-unsubscribe@... >>>> >>>> >>> >>> >>> >>> ------------------------------------------ >>> To remove yourself from this list, send an >>> email to xml-unsubscribe@... >>> >>> >> >> >> >> ------------------------------------------ >> To remove yourself from this list, send an >> email to xml-unsubscribe@... >> > > > ------------------------------------------ > To remove yourself from this list, send an > email to xml-unsubscribe@... > > ------------------------------------------ To remove yourself from this list, send an email to xml-unsubscribe@... |
| Free embeddable forum powered by Nabble | Forum Help |