![]() | |
|
PersistenceException
The PersistenceException is thrown by the persistence provider when a problem occurs. It may be thrown to report that the invoked operation could not complete because of an unexpected error (e.g., failure of the persistence provider to open a database connection). All other exceptions defined by this specification are subclasses of the PersistenceException. All instances of PersistenceException except for instances of NoResultException and NonUniqueResultException will cause the current transaction, if one is active, to be marked for ROLLBACK.
TransactionRequiredException
The TransactionRequiredException is thrown by the persistence provider when a transaction is required but is NOT active.
OptimisticLockException
The OptimisticLockException is thrown by the persistence provider when an optimistic locking CONFLICT occurs. This exception may be thrown as part of an API call, at flush, or at commit time. The current transaction, if one is active, will be marked for ROLLBACK.
RollbackException
The RollbackException is thrown by the persistence provider when EntityTransaction.commit() fails.
EntityExistsException
The EntityExistsException may thrown by the persistence provider when the persist operation is invoked and the entity already exists. The EntityExistsException may be thrown when the persist operation is invoked, or the EntityExistsException or another PersistenceException may be thrown at commit time.
EntityNotFoundException
The EntityNotFoundException is thrown by the persistence provider when an entity reference obtained by getReference is accessed but the entity does not exist. It is also thrown by the refresh operation when the entity no longer exists in the database. The current transaction, if one is active, will be marked for ROLLBACK.
NoResultException
The NoResultException is thrown by the persistence provider when Query.getSingleResult is invoked and there is NO result to return. This exception will NOT cause the current transaction, if one is active, to be marked for roll back.
NonUniqueResultException
The NonUniqueResultException is thrown by the persistence provider when Query.getSingleResult is invoked and there is more than one result from the query. This exception will NOT cause the current transaction, if one is active, to be marked for roll back.
![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |