java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
jakarta.nosql.NoSQLException
jakarta.nosql.MappingException
- All Implemented Interfaces:
Serializable
An exception that occurs when there is a mapping error during entity mapping or persistence.
This exception typically indicates issues with the usage or missing annotations at the entity level.
Some scenarios where this exception may be thrown include:
- A class annotated with
@Entity
does not have the@Id
annotation. - A class annotated with
@Entity
or@Embeddable
does not have a default constructor or has multiple constructors without@Id
and@Column
annotations. - A class annotated with
@Entity
or@Embeddable
has multiple constructors with annotations provided by Jakarta NoSQL, which may lead to ambiguity in entity instantiation.
This exception may occur at runtime or build time, depending on the Jakarta NoSQL provider being used.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMappingException
(String message) Constructs aMappingException
using the given message.MappingException
(String message, Throwable cause) Constructs aMappingException
using the given message and cause.MappingException
(Throwable cause) Constructs aMappingException
using the given cause. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MappingException
Constructs aMappingException
using the given message and cause.- Parameters:
message
- A message explaining the exception conditioncause
- The underlying cause
-
MappingException
Constructs aMappingException
using the given cause.- Parameters:
cause
- The underlying cause
-
MappingException
Constructs aMappingException
using the given message.- Parameters:
message
- A message explaining the exception condition
-