public class EnvironmentFailureException extends RunRecoveryException
Environmentas a whole. For failures that impact only the current operation and/or transaction, see
OperationFailureException). For an overview of all exceptions thrown by JE, see
Depending on the nature of the failure, this exception may indicate that
Environment.close() must be called. The application should catch
EnvironmentFailureException and then call
false is returned, all
handles (instances) must be closed and re-opened in order to run recovery
and continue operating. If
true is returned, the
Environment can continue operating without being closed and re-opened.
Also note that
Environment.isValid() may be called at any time, not
just during exception handling.
The use of the
Environment.isValid() method allows JE to determine
dynamically whether the failure requires recovery or not, and allows for
this determination to change in future releases. Over time, internal
improvements to error handling may allow more error conditions to be handled
without invalidating the
(Although this exception class extends
does not always indicate that recovery is necessary, as described above.
RunRecoveryException has been deprecated and
EnvironmentFailureException should be used instead.)
EnvironmentFailureException consistently occurs soon after
opening the Environment, this may indicate a persistent problem. It may
indicate a system problem or a persistent storage problem. In this case,
human intervention is normally required and restoring from a backup may be
Note that subclasses of
EnvironmentFailureException indicate how
to handle the exception in more specific ways.
Thread.interruptis called for a thread performing JE operations, a
ThreadInterruptedExceptionis thrown. Since interrupting a thread is intentional, it does not indicate a persistent problem and human intervention is not normally required.
IOExceptionoccurs while writing to the JE log, a
LogWriteExceptionis thrown. Although an
IOExceptioncan occur for different reasons, it is a hint that the disk may be full and applications may wish to attempt recovery after making more disk space available.
com.sleepycat.je.reppackage for more information. Such exceptions may require special handling.
Environment.close() is not called after an
EnvironmentFailureException invalidates the
subsequent method calls for the
Environment will throw the same
exception. This provides more than one opportunity to catch and handle the
specific exception subclass that caused the failure.
|Modifier and Type||Method and Description|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Copyright (c) 2004, 2014 Oracle and/or its affiliates. All rights reserved.