Conversion Exceptions (3001– 3008)
ConversionException
is a development exception that is raised when a conversion error occurs by an incompatible type conversion. The message that is returned indicates which type cast caused the exception, as shown in Example 13-3.
Format
EXCEPTION [TOPLINK – error code]: Exception name
EXCEPTION DESCRIPTION: Message
INTERNAL EXCEPTION: Message
Example 13-3 Conversion Exception
EXCEPTION [TOPLINK – 3006]: oracle.toplink.exceptions.ConversionException
EXCEPTION DESCRIPTION: object must be of even length to be converted to a ByteArray
-
3001: COULD_NOT_BE_CONVERTED
-
Cause: The object object
of class objectClass
cannot be converted to javaClass
. The object cannot be converted to a given type.
-
Action: Ensure that the object being converted is of the right type.
-
3002: COULD_NOT_BE_CONVERTED_EXTENDED
-
Cause: The object object
of class objectClass
from mapping mappingType
cannot be converted to javaClass
. The object cannot be converted to a given type.
-
Action: Ensure that the object being converted is of the right type.
-
3003: INCORRECT_DATE_FORMAT
-
Cause: The date in dateString
is in an incorrect format. The expected format is YYYY-MM-DD.
-
Action: Verify the date format.
-
3004: INCORRECT_TIME_FORMAT
-
Cause: The time in timeString
is in an incorrect format. The expected format is HH:MM:SS.
-
Action: Verify the time format.
-
3005: INCORRECT_TIMESTAMP_FORMAT
-
Cause: The timestamp timestampString
is in an incorrect format. The expected format is YYYY-MM-DD HH:MM:SS.NNNNNNNNN.
-
Action: Verify the timestamp format.
-
3006: COULD_NOT_CONVERT_TO_BYTE_ARRAY
-
Cause: The String
object must be of even length to be converted to a ByteArray
. This object cannot be converted to a ByteArray
.
-
Action: Verify the object being converted.
-
3007: COULD_NOT_BE_CONVERTED_TO_CLASS
-
Cause: The object object
of class objectClass
cannot be converted to javaClass
. The class javaClass
is not on the classpath.
-
Action: Ensure that the class JavaClass
is on the classpath.
-
3008: INCORRECT_DATE_TIME_FORMAT
-
Cause: Incorrect date-time format object. The expected format is YYYY-MM-DD'T'HH:MM:SS.
-
Action: Ensure that the date-time object is in the expected format of YYYY-MM-DD'T'HH:MM:SS.