Package org.hibernate
Class PropertyAccessException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
jakarta.persistence.PersistenceException
org.hibernate.HibernateException
org.hibernate.PropertyAccessException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
PropertySetterAccessException
A problem occurred accessing a property of an instance of a
persistent class by reflection, or via enhanced entities.
There are a number of possible underlying causes, including:
- failure of a security check,
- an exception occurring inside the getter or setter method,
- a nullable database column was mapped to a primitive-type property, or
- the Hibernate type was not castable to the property type (or vice-versa)
- See Also:
-
Constructor Summary
ConstructorDescriptionPropertyAccessException
(@Nullable Throwable cause, String message, boolean wasSetter, Class<?> persistentClass, String propertyName) Constructs aPropertyAccessException
using the specified information. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
PropertyAccessException
public PropertyAccessException(@Nullable Throwable cause, String message, boolean wasSetter, Class<?> persistentClass, String propertyName) Constructs aPropertyAccessException
using the specified information.- Parameters:
cause
- The underlying causemessage
- A message explaining the exception conditionwasSetter
- Was the attempting to access the setter the cause of the exception?persistentClass
- The class which is supposed to contain the property in questionpropertyName
- The name of the property.
-
-
Method Details
-
getPersistentClass
-
getPropertyName
-
originalMessage
-
getMessage
- Overrides:
getMessage
in classThrowable
-