IndexNotAvailableException (Oracle - Berkeley DB Java Edition API)
Date: 2014-12-16

com.sleepycat.persist

## Class IndexNotAvailableException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - com.sleepycat.je.DatabaseException
        - - com.sleepycat.je.OperationFailureException
          - - com.sleepycat.persist.IndexNotAvailableException

- All Implemented Interfaces:
    Serializable

      public class IndexNotAvailableException
      extends OperationFailureException

  Thrown by the `getPrimaryIndex`, `getSecondaryIndex` and `getSubclassIndex` when an index has not yet been created. This exception can be thrown in two circumstances.
  1. It can be thrown in a replicated environment when the Replica has been upgraded to contain new persistent classes that define a new primary or secondary index, but the Master has not yet been upgraded. The index does not exist because the Master has not yet been upgraded with the new classes. If the application is aware of when the Master is upgraded, it can wait for that to occur and then open the index. Or, the application may repeatedly try to open the index until it becomes available.

  2. It can be thrown when opening an environment read-only with new persistent classes that define a new primary or secondary index. The index does not exist because the environment has not yet been opened read-write with the new classes. When the index is created by a read-write application, the read-only application must close and re-open the environment in order to open the new index.

  Author:
    Mark Hayes
  See Also:
    Serialized Form

- - ### Method Summary

    - ### Methods inherited from class com.sleepycat.je.DatabaseException

      `getMessage`

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Copyright (c) 2004, 2014 Oracle and/or its affiliates. All rights reserved.