3 Replies Latest reply: Jul 30, 2012 11:10 PM by 863479 RSS

    java.io.FileNotFoundException: db/00000000.jdb (No such file or directory)

    863479
      I am trying to use the Java edition of the berkeley db and creating the environment config like:
      EnvironmentConfig ecfg = new EnvironmentConfig(jeProperties);
      this.ecfg.setTransactional(false);
      this.ecfg.setAllowCreate(true);
      this.ecfg.setReadOnly(false);
      this.ecfg.setDurability(Durability.COMMIT_WRITE_NO_SYNC);

      I am getting the below Exception on writing to disk after a while.
      I am using version JE 5.0.55

      Here is the stack trace. Please let me know if I need to provide with more details.

      Caused by: com.sleepycat.je.EnvironmentFailureException: (JE 5.0.55) Environment must be closed, caused by: com.sleepycat.je.EnvironmentFailureException: Environment invalid because of previous exception: (JE 5.0.55) /export1/bench/perfTests/perfLogs/server/data-9511/objectdb LN could not be logged LOG_INCOMPLETE: Transaction logging is incomplete, replica is invalid. Environment is invalid and must be closed. at com.sleepycat.je.EnvironmentFailureException.wrapSelf(EnvironmentFailureException.java:196)
      at com.sleepycat.je.dbi.EnvironmentImpl.checkIfInvalid(EnvironmentImpl.java:1506)
      at com.sleepycat.je.Database.checkEnv(Database.java:1906)
      at com.sleepycat.je.Database.put(Database.java:1186)
      at com.tc.objectserver.storage.berkeleydb.BerkeleyDBTCBytesBytesDatabase.put(BerkeleyDBTCBytesBytesDatabase.java:50)
      at com.tc.objectserver.storage.berkeleydb.BerkeleyDBTCLongToBytesDatabase.put(BerkeleyDBTCLongToBytesDatabase.java:45)
      at com.tc.objectserver.storage.cache.offheap.EvictedEntriesCommitManagerImpl.commitEvictedEntries(OffHeapNonPersistenceTCObjectDatabase.java:139)
      at com.tc.objectserver.handler.OffHeapNonPersistenceCommitHandler.handleEvent(OffHeapNonPersistenceCommitHandler.java:18)
      at com.tc.async.impl.StageImpl$WorkerThread.run(StageImpl.java:145)
      Caused by: com.sleepycat.je.EnvironmentFailureException: Environment invalid because of previous exception: (JE 5.0.55) /export1/bench/perfTests/perfLogs/server/data-9511/objectdb LN could not be logged LOG_INCOMPLETE: Transaction logging is incomplete, replica is invalid. Environment is invalid and must be closed.
      at com.sleepycat.je.tree.LN.logInternal(LN.java:565)
      at com.sleepycat.je.tree.LN.optionalLog(LN.java:359)
      at com.sleepycat.je.dbi.CursorImpl.insertNewSlot(CursorImpl.java:944)
      at com.sleepycat.je.dbi.CursorImpl.putInternal(CursorImpl.java:839)
      at com.sleepycat.je.dbi.CursorImpl.put(CursorImpl.java:779)
      at com.sleepycat.je.Cursor.putAllowPhantoms(Cursor.java:2243)
      at com.sleepycat.je.Cursor.putNoNotify(Cursor.java:2200)
      at com.sleepycat.je.Cursor.putNotify(Cursor.java:2117)
      at com.sleepycat.je.Cursor.putNoDups(Cursor.java:2052)
      at com.sleepycat.je.Cursor.putInternal(Cursor.java:2020)
      at com.sleepycat.je.Database.putInternal(Database.java:1324)
      at com.sleepycat.je.Database.put(Database.java:1194)
      ... 5 more
      Caused by: com.sleepycat.je.EnvironmentFailureException: (JE 5.0.55) /export1/bench/perfTests/perfLogs/server/data-9511/objectdb java.io.FileNotFoundException: /export1/bench/perfTests/perfLogs/server/data-9511/objectdb/00000000.jdb (No such file or directory) LOG_INTEGRITY: Log information is incorrect, problem is likely persistent.
      at com.sleepycat.je.log.FileManager$LogEndFileDescriptor.getWritableFile(FileManager.java:3014)
      at com.sleepycat.je.log.FileManager$LogEndFileDescriptor.access$200(FileManager.java:2715)
      at com.sleepycat.je.log.FileManager.writeLogBuffer(FileManager.java:1617)
      at com.sleepycat.je.log.LogBufferPool.writeBufferToFile(LogBufferPool.java:260)
      at com.sleepycat.je.log.LogBufferPool.getWriteBuffer(LogBufferPool.java:197)
      at com.sleepycat.je.log.LogManager.serialLogInternal(LogManager.java:602)
      at com.sleepycat.je.log.SyncedLogManager.serialLog(SyncedLogManager.java:40)
      at com.sleepycat.je.log.LogManager.multiLog(LogManager.java:395)
      at com.sleepycat.je.log.LogManager.log(LogManager.java:335)
      at com.sleepycat.je.tree.LN.logInternal(LN.java:543)
      ... 16 more
      Caused by: java.io.FileNotFoundException: /export1/bench/perfTests/perfLogs/server/data-9511/objectdb/00000000.jdb (No such file or directory)
      at java.io.RandomAccessFile.open(Native Method)
      at java.io.RandomAccessFile.<init>(RandomAccessFile.java:216)
      at java.io.RandomAccessFile.<init>(RandomAccessFile.java:101)
      at com.sleepycat.je.log.FileManager$6.<init>(FileManager.java:1282)
      at com.sleepycat.je.log.FileManager.openFileHandle(FileManager.java:1281)
      at com.sleepycat.je.log.FileManager.makeFileHandle(FileManager.java:1242)
      at com.sleepycat.je.log.FileManager.access$1500(FileManager.java:75)
      at com.sleepycat.je.log.FileManager$LogEndFileDescriptor.getWritableFile(FileManager.java:2992)
      ... 25 more

      Edited by: user6392233 on Jul 23, 2012 10:58 PM
        • 1. Re: java.io.FileNotFoundException: db/00000000.jdb (No such file or directory)
          Greybird-Oracle
          This isn't a known problem in JE and my first thought is to suspect a problem with your system environment. A file-not-found while writing is something that's never been reported and doesn't make a lot of sense, from a JE perspective.

          Some questions:

          + are you using network storage?
          + what is the contents of the directory? (send a listing)
          + is it possible that some other process is making changes to the directory?

          --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
          • 2. Re: java.io.FileNotFoundException: db/00000000.jdb (No such file or directory)
            Greybird-Oracle
            user6392233, did you resolve the problem?
            --mark                                                                                                                                                                                                               
            • 3. Re: java.io.FileNotFoundException: db/00000000.jdb (No such file or directory)
              863479
              Hello Mark,
              This is not always reproducible so we are trying to get this reproduced.
              As for the questions you asked, these are the answer:

              1) are you using network storage?
              No

              2) what is the contents of the directory? (send a listing)
              We are trying to get this reproduced and get a listing

              3) is it possible that some other process is making changes to the directory?
              No, only 1 process is using the database