Uses of Class
jakarta.persistence.PersistenceException
Packages that use PersistenceException
Package
Description
Jakarta Persistence is the API for the management for persistence and object/relational mapping.
-
Uses of PersistenceException in jakarta.persistence
Subclasses of PersistenceException in jakarta.persistenceModifier and TypeClassDescriptionclassThrown by the persistence provider when: a detached instance of an entity type is passed toEntityManager.persist(Object), or an instance of an entity type with an identifier already assigned by the application is passed toEntityAgent.insert(Object), and a record with the assigned identifier value already exists in the database.classThrown by the persistence provider when:EntityHandler.get(Class, Object)cannot return an instance of the requested entity type because there is no matching record in the database, an entity reference obtained by callingEntityManager.getReference(Class, Object)is accessed but the reference has no corresponding record in the database, an entity is passed toEntityManager.refresh(Object)orEntityAgent.refresh(Object)and its record no longer exists in the database, an entity is passed toEntityManager.lock(Object, LockModeType), a pessimistic lock mode is requested, and the record no longer exists in the database.classThrown by the persistence provider when a pessimistic locking conflict occurs that does not result in transaction rollback.classThrown by the persistence provider whenQuery.getSingleResult(),TypedQuery.getSingleResult(),Query.getSingleResultOrNull(), orTypedQuery.getSingleResultOrNull()is executed and the query has more than one result.classThrown by the persistence provider whenQuery.getSingleResult()orTypedQuery.getSingleResult()is executed and there is no query result to return.classThrown by the persistence provider when an optimistic locking conflict occurs.classThrown by the persistence provider when a pessimistic locking conflict occurs.classThrown by the persistence provider when a query times out and only the statement is rolled back.classThrown by the persistence provider when a resource-local transaction cannot be committed, that is, whenEntityTransaction.commit()fails.classThrown by the persistence provider when a transaction is required but is not active.