Package org.hibernate
Class InstantiationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- jakarta.persistence.PersistenceException
-
- org.hibernate.HibernateException
-
- org.hibernate.InstantiationException
-
- All Implemented Interfaces:
Serializable
public class InstantiationException extends HibernateException
Thrown if Hibernate can't instantiate a class at runtime.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InstantiationException(String message, Class<?> clazz)
Constructs a InstantiationException.InstantiationException(String message, Class<?> clazz, Exception cause)
Constructs a InstantiationException.InstantiationException(String message, Class<?> clazz, Throwable cause)
Constructs aInstantiationException
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getMessage()
Class<?>
getUninstantiatableClass()
Returns the Class we were attempting to instantiate.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
InstantiationException
public InstantiationException(String message, Class<?> clazz, Throwable cause)
Constructs aInstantiationException
.- Parameters:
message
- A message explaining the exception conditionclazz
- The Class we are attempting to instantiatecause
- The underlying exception
-
InstantiationException
public InstantiationException(String message, Class<?> clazz)
Constructs a InstantiationException.- Parameters:
message
- A message explaining the exception conditionclazz
- The Class we are attempting to instantiate
-
-
Method Detail
-
getUninstantiatableClass
public Class<?> getUninstantiatableClass()
Returns the Class we were attempting to instantiate.- Returns:
- The class we are unable to instantiate
-
getMessage
public String getMessage()
- Overrides:
getMessage
in classThrowable
-
-