Fixed a bug that caused an exception such as the following, when opening an Environment in read-only mode. This occurred under certain circumstances when a clean shutdown (final checkpoint) was not performed when the Environment was last used by a read-write process.
I have below 2 questions:
1) I want to know if there's any workaround to this problem without having to upgrade BDB-JE.
2) Just want to make sure we will not have data compatible issue if we have to upgrade to the latest version
This is a transient problem when opening in read-only mode. It does not cause corruption or a compatibility issue.
If you open the environment read-write and perform a normal shutdown (Environment.close), then it should be possible to open the environment read-only again.
However, it is possible that it could happen again if the read-write process exits without calling Environment.close. The only way to guarantee it won't happen again is to always call Environment.close in the read-write process before opening it read-only, or upgrade to the latest version of JE 5.