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.
- 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.
then (db:delete($db-name, $dir-to-delete))
case 'create-and-save-html-files' return (staticHTML:create-and-save-html-files($param-map),
db:output(admin:display-in-dashboard($progress)))
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.
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).
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@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@architextus.com
> (514) 572-0341
>
> BaseX-Talk mailing list
> BaseX-Talk@mailman.uni-konstanz.de
> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
>