Top Description Constructors
javax.persistence

public Class PersistenceException

extends RuntimeException
Class Inheritance
Known Direct Subclasses
javax.persistence.PessimisticLockException, javax.persistence.QueryTimeoutException, javax.persistence.RollbackException, javax.persistence.TransactionRequiredException, javax.persistence.EntityExistsException, javax.persistence.EntityNotFoundException, javax.persistence.LockTimeoutException, javax.persistence.NonUniqueResultException, javax.persistence.NoResultException, javax.persistence.OptimisticLockException

Thrown by the persistence provider when a problem occurs. All instances of PersistenceException except for instances of NoResultException, NonUniqueResultException, LockTimeoutException, and QueryTimeoutException will cause the current transaction, if one is active and the persistence context has been joined to it, to be marked for rollback.
Since
Java Persistence 1.0

Constructor Summary

AccessConstructor and Description
public
PersistenceException()

Constructs a new PersistenceException exception with null as its detail message.

public
PersistenceException(String
the detail message.
message
)

Constructs a new PersistenceException exception with the specified detail message.

public
PersistenceException(String
the detail message.
message
,
Throwable
the cause.
cause
)

Constructs a new PersistenceException exception with the specified detail message and cause.

public
PersistenceException(Throwable
the cause.
cause
)

Constructs a new PersistenceException exception with the specified cause.

Constructor Detail

PersistenceExceptionback to summary
public PersistenceException()

Constructs a new PersistenceException exception with null as its detail message.

PersistenceExceptionback to summary
public PersistenceException(String message)

Constructs a new PersistenceException exception with the specified detail message.

Parameters
message:String

the detail message.

PersistenceExceptionback to summary
public PersistenceException(String message, Throwable cause)

Constructs a new PersistenceException exception with the specified detail message and cause.

Parameters
message:String

the detail message.

cause:Throwable

the cause.

PersistenceExceptionback to summary
public PersistenceException(Throwable cause)

Constructs a new PersistenceException exception with the specified cause.

Parameters
cause:Throwable

the cause.