PersistenceException
PersistenceException is a general, unchecked exception used by the Java Persistence API (JPA) and its implementations to indicate problems encountered while performing persistence operations. It extends RuntimeException, meaning it is not required to be caught or declared, and serves as a common base type for more specific persistence errors.
In the JPA specification, PersistenceException is the parent for several more specific exceptions including EntityExistsException, EntityNotFoundException,
Causes of a PersistenceException include database connectivity issues, constraint violations (such as primary key or unique
Handling a PersistenceException is shaped by its status as an unchecked exception. Applications may catch it