Working with LiteDB, the initial construction of the database has no real issue, however on subsequent loads, it is trying to find a file which does not exist.
According to their documentation, journaling is something that is on by default, however it does not document how to disable this, or more ideal, how to ensure that the journal file actually gets created.
You can use their demonstration from their website, or the code from my other stackoverflow issue ( LiteDB: Invalid BSON data type 'Null' on field '_id' )which will demonstrate this problem by generating the following exception with tracing open :
Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll ("Could not find file 'D:\Code\bin\Debug\cache-journal.db'.")
... where D:\Code\bin\Debug\
will vary based on where you are testing this from.
My questions which I believe should take care of the above exception are :
- How can I ensure the journal file is created ?
- How can I disable journaling (if desired) ?