ObjectDB closes open databases automatically on JVM shutdown, but apparently this is not done when using a debugger.
ObjectDB identifies a database file that was not closed by the existence of a special empty file (a file whose name is active in the odr directory). If this file exists when a database is opened - ObjectDB tries to restore the database file from the odr files (which represent transactions).
You can also restore the database explicitly by using the Replayer.
Also notice, that a bug that was fixed in version 2.1.1_01 caused renaming the ObjectDB database file by adding the _nonclosed suffix. This happened on attempt to open the same database simultaneously by different processes, which is common during debugging (when running the application again without ending the previous run).
In summary, you should:
- Upgrade to the last build of ObjectDB.
- Check if your database file exists with _nonclosed suffix.
- If not found - rebuild the database by using the Replayer.
ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)