Exception Handling

❗️

This is a legacy Apache Ignite documentation

The new documentation is hosted here: https://ignite.apache.org/docs/latest/

The following table describes exceptions supported by the Ignite API and actions that can be taken to handle these exceptions. You can look at the throws clause in the javadoc for checked exceptions.

Exception

Description

Action to be taken

Runtime exception

IgniteException

This exception indicates an error condition in the Grid.

Operation failed. Exit from the method.

Yes

IgniteClientDisconnectedException

This exception is thrown by the Ignite API when a client node gets disconnected from cluster.
Thrown from Cache operations, compute API, and data structures.

Wait on future and use retry logic.

Yes

IgniteAuthenticationException

This exception is thrown when there is either a node authentication failure or security authentication failure.

Operation failed. Exit from the method.

No

IgniteClientException

This exception can be thrown from Cache operations.

Check exception message for the action to be taken.

Yes

IgniteDeploymentException

This exception is thrown when the Ignite API fails to deploy a job or task on a node. Thrown from the Compute grid API.

Operation failed. Exit from the method.

Yes

IgniteInterruptedException

This exception is used to wrap the standard InterruptedException into IgniteException.

Retry after clearing the interrupted flag.

Yes

IgniteSpiException

This exception thrown by SPI such as - CollisionSpi, LoadBalancingSpi, TcpDiscoveryIpFinder, FailoverSpi, UriDeploymentSpi, etc.

Operation failed. Exit from the method.

Yes

IgniteSQLException

This exception is thrown when there is a SQL query processing error. This exception also provides query specific error codes.

Operation failed. Exit from the method.

Yes

IgniteAccessControlException

This exception occurs when there is a authentication / authorization failure.

Operation failed. Exit from the method.

No

IgniteCacheRestartingException

This exception is thrown from Ignite cache API if a cache is restarting.

Wait on future and use retry logic.

Yes

IgniteFutureTimeoutException

This exception occurs when a future computation is timed out.

Either increase timeout limit or exit from the method.

Yes

IgniteFutureCancelledException

This exception occurs when a future computation cannot be retrieved because it was cancelled.

Use retry logic.

Yes

IgniteIllegalStateException

This exception indicates that the Ignite instance is in an invalid state for the requested operation.

Operation failed. Exit from the method.

Yes

IgniteNeedReconnectException

This exception indicates that a node should try to reconnect to the cluster.

Use retry logic.

No

IgniteDataIntegrityViolationException

This exception is thrown if data integrity violation is found.

Operation failed. Exit from the method.

Yes

IgniteOutOfMemoryException

This exception is thrown when the system does not have enough memory to process Ignite operations.
Thrown from Cache operations.

Operation failed. Exit from the method.

Yes

IgniteTxOptimisticCheckedException

This exception is thrown when a transaction fails optimistically.

Use retry logic.

No

IgniteTxRollbackCheckedException

This exception is thrown when a transaction has been automatically rolled back.

Use retry logic.

No

IgniteTxTimeoutCheckedException

This exception is thrown when a transaction times out.

Use retry logic.

No

ClusterTopologyException

This exception indicates an error with the cluster topology (e.g. crashed node, etc.). Thrown from Compute and Events API

Wait on future and use retry logic.

Yes