DB ~webdav
Wednesday, 11 September 2013 · 4 messages · last reply 14 Sep 2013
FB
France Baril11 Sep 2013 03:08 #
Hi,
I deleted the ~webdav DB by error, and now I am getting an Unexpector error with this trace: DB org.basex.core.BaseXException: Database '~webdav' was not found. Doh!
Is there a place I can download a copy of this DB? Or can you provide the parameters I should use to recreate it?
Thanks,
--
France Baril
Architecte documentaire / Documentation architect
france.baril at architextus.com
(514) 572-0341
CG
Christian Grün11 Sep 2013 10:56 #
Hi France,
by default, no ~webdav database exists; it is created as soon as a file is opened in oXygen via WebDAV. The problem should be fixed if you restart BaseX, oXygen, or both applications.
Hope this helps,
Christian
___________________________
2013/9/11 France Baril <france.baril at architextus.com>:
Quoted text · France Baril · 22 lines
> Hi, > > I deleted the ~webdav DB by error, and now I am getting an Unexpector error > with this trace: DB org.basex.core.BaseXException: Database '~webdav' was > not found. Doh! > > Is there a place I can download a copy of this DB? Or can you provide the > parameters I should use to recreate it? > > Thanks, > > -- > France Baril > Architecte documentaire / Documentation architect > france.baril at architextus.com > (514) 572-0341 > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >
FB
France Baril11 Sep 2013 20:00 #
Ah!...
Then the problem comes from elsewhere. I get a bad crash. Here is the long story for*: Unexpected error: Improper use? Potential bug?... [Trace is attached]*.
I have tried to reproduce the problem on a smaller scale in order to get you something manageable, and I can't reproduce the error in other contexts, but in my production context it happens all the time.
This is what I am doing: I am running batch transformations.
1. I run a process that transform a bunch of XML documents to HTML and saves the result in another DB.
- The first time, I create the DB and collection, then run the process. I am successful.
- After, if the DB and the collection in which I want to save the resulting documents both exist, the process deletes the collection so I can start up fresh without documents from the previous run. [A redirect occurs after deletion to make sure operations occur in the right order].
In both cases, I am processing the exact same set of documents, the exact same way. It's all going through the exact same code with the exact same parameters and called from the exact same web page.
After the crash, the database seems corrupted, I have to delete it to avoid getting the same error all the time. If I try to add the DB as a logical folder in XML Oxygen, I get a 500 error.
The DB indicates (DB properties in BaseX GUI) that, on the second run, the process was able to save the HTML documents and crashed after (the trace that I left indicates the same thing).
- If I do not delete the collection and then run the process multiple times, I don't get a crash.
- If I run the process, then comment out code so only the collection deletion occurs. The collection gets deleted and the DB is NOT corrupted. If I run the process again to repopulate the DN, it crashes
Because of the exception about ~webdav DB in the trace, I thought it was my fault for deleting the DB by error.
Now, my impression is that something happens when the collection is deleted that leaves the DB in a different state than the one it was in before the collection existed. This 'something' causes the crash to occur.
If I put a stop after the delete, I can see that the delete function itself worked and did not cause the crash. I can go in the GUI, open the DB properties window and browse up to where the deleted collection was.
A bit of code context:
The delete has nothing special to it, I check if there are files in the collection, if so I delete:
*then *(*
db:delete*(*$db-name*, *$dir-to-delete*))
I call the function that crashes like this:
*case *'create-and-save-html-files' *return *(*
staticHTML:create-and-save-html-files*(*$param-map*),
*db:output*(* admin:display-in-dashboard*(*$progress*)))
The end of the staticHTML:create-and-save-html-files function is:*return *(*for **$submenu* *in **$submenus*
*let* *$pos* := *index-of*(*$submenus*, *$submenu*)
*let* *$debug* := *file:append*('debug-crash.xml', 'In create
and save, before debug sub ')
*let* *$debug* := *file:append*('debug-html-submenus.xml', *
concat*(' In pos ', *$pos*, ' '))
*let* *$debug* := *file:append*('debug-html-submenus.xml', *
$submenus*[*$pos*])
*let* *$debug* := *file:append*('debug-crash.xml', 'In create
and save, after debug sub ')
*return **db:replace*(*$app:review-db-name*, *
$submenu-destinations*[*$pos*], *$submenu*),
(*for **$test* *in **$index*
*let* *$debug* := *file:append*('debug-crash.xml', 'In create
and save, before index sub ')
*let* *$debug* := *file:append*('debug-html-submenus.xml', ' In
index... ')
*let* *$debug* := *file:append*('debug-html-index.xml', *$index*
)
*return *(*db:replace*(*$app:review-db-name*, *
$index-html-destination*, *$index*), *file:append*('debug-crash.xml', 'In
create and save, after index sub ') ))
)All debug traces (
file:write/append) get written and all files have HTML content. So the next step would be to exit the function and go back to the calling function for the db:output... I never seem to get out if the functions are called after the deletion of a collection.
My trace says that I have added all files:
Step id: create-and-save-html-files
In create and save HTML
In create and save topics
In create and save menus
In create and save menus, before submenus
In create and save menus before set destinations
In create and save menus, before return
In create and save, before debug sub
In create and save, after debug sub
In create and save, before debug sub
In create and save, after debug sub
In create and save, before debug sub
In create and save, after debug sub
In create and save, before debug sub
In create and save, after debug sub
In create and save, before debug sub
In create and save, after debug sub
In create and save, before index sub
In create and save, after index sub
but I don't get out of the function, or the db:output of the calling function doesn't work because I never get that db:output (remember it all works the first time around, and many times after that as long as I don't delete the collection before re-running the process).
Is there anything else that I can provide that would help identify the issue? I really don't know what else to try. The crash occurs between the end of the function and the callback to the calling function... and only when the target collection has been deleted. Any clue will be useful.
On Wed, Sep 11, 2013 at 4:56 AM, Christian Grün
<christian.gruen at gmail.com>wrote:Quoted text · Christian Grün · 35 lines
> Hi France, > > by default, no ~webdav database exists; it is created as soon as a > file is opened in oXygen via WebDAV. The problem should be fixed if > you restart BaseX, oXygen, or both applications. > > Hope this helps, > Christian > ___________________________ > > 2013/9/11 France Baril <france.baril at architextus.com>: > > Hi, > > > > I deleted the ~webdav DB by error, and now I am getting an Unexpector > error > > with this trace: DB org.basex.core.BaseXException: Database '~webdav' was > > not found. Doh! > > > > Is there a place I can download a copy of this DB? Or can you provide the > > parameters I should use to recreate it? > > > > Thanks, > > > > -- > > France Baril > > Architecte documentaire / Documentation architect > > france.baril at architextus.com > > (514) 572-0341 > > > > _______________________________________________ > > BaseX-Talk mailing list > > BaseX-Talk at mailman.uni-konstanz.de > > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > > >
--
France Baril
Architecte documentaire / Documentation architect
france.baril at architextus.com
(514) 572-0341
DP
Dimitar Popov14 Sep 2013 13:35 #
Quoted text · 11:59:46 · 5 lines
Am Mittwoch, 11. September 2013, 11:59:46 schrieb France Baril: > Now, my impression is that something happens when the collection is > deleted that leaves the DB in a different state than the one it was in > before the collection existed. This 'something' causes the crash to > occur.
You are right: the problem is not due to the missing ~webdav database - the stack trace for ~webdav is only there, because the implementation of
db:exists() tries to open the database and an exception is generated (I hope will have the time to change this).Quoted text · France Baril · 4 lines
> All debug traces (file:write/append) get written and all files have HTML > content. So the next step would be to exit the function and go back to the > calling function for the db:output... I never seem to get out if the > functions are called after the deletion of a collection.
Unfortunately, the debug output is not very useful in this case of updates, because all updates within a single query are first accumulated in the so called "pending update list" [1] and are applied only at the end of the execution. Therefore, you can't determine which update causes the crash.
Quoted text · France Baril · 4 lines
> Is there anything else that I can provide that would help identify the > issue? I really don't know what else to try. The crash occurs between the > end of the function and the callback to the calling function... and only > when the target collection has been deleted. Any clue will be useful.
Corrupted database problems are hard to debug, especially when no data is present to reproduce the error. Therefore, I would suggest the following:
1. try to change your code so that you don't store the documents in a collection, but rather in a separate database; when you need to delete all documents, simply drop the database and re-create it with the new set of documents; from a user point of view it is not a huge difference if you use a database with several collections or just several databases.
2. alternatively, try to reproduce the error and send sample data and code so that we can reproduce and analyze it, too; please, also assert that the database is not accessed simultaneously from different processes (e.g. BaseX GUI and BaseX web server) - this should be no longer cause troubles, but just in case.
Best regards,
Dimitar
[1] http://www.w3.org/TR/xquery-update-10/#dt-pending-update-list
Written for BaseX 7.7. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery