1 Reply Latest reply on Apr 1, 2014 1:42 PM by Greybird-Oracle

    Is there any workaround for log LNs in read-only env. UNEXPECTED_STATE


      I'm at 5.0.43 and encounter the same problem mentioned in The Berkeley DB Java Edition Package: BDB JE Library Version (Release 5.0.55) Change Log


      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

      Thanks for your help.

        • 1. Re: Is there any workaround for log LNs in read-only env. UNEXPECTED_STATE

          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.