This is unfortunately a well-known and still not fully resolved issue, mostly there are issues with persistence, but I have seen the errors you are encountering myself; there are various work-arounds for now that you can use:
- the simplest way is restarting OH2 a few times (w/o deleting the cache and tmp files), this can solve this issue, but may not always work
- Here some other solutions:
https://www.openhab.org/docs/configuration/persistence.html#startup-behavior
Cleaning up the startup process / renaming rules (windows possible)