Oracle9iAS TopLink Troubleshooting Guide Release 2 (9.0.3) Part Number B10068-01 |
|
This chapter describes the TopLink exception classes. Each type of exception corresponds to a range of error code (see Chapter 2, "Error Codes and Descriptions").
All TopLink exceptions are descendents of RuntimeException
. The TopLinkException
class is the superclass of all runtime and development type exceptions.
Runtime exceptions indicate error conditions at runtime, and do not necessarily indicate fatal errors. Instead, they indicate that runtime conditions are invalid, such as the loss of database connection. All of these exceptions should be handled in a try-catch block.
The following exceptions can be thrown at runtime:
Development exceptions indicate that a certain fragment of code is invalid. All development exceptions do not depend on runtime conditions and must therefore be solved before deploying the application. For example, the DescriptorException
is thrown the first time an application is executed if an erroneous descriptor or mapping property is set. Development exceptions are useful as a debugging tool to find inconsistencies in the descriptor. Because development exceptions are not normal behavior, they must not be handled in a try-catch block.
The following exceptions are not dependent on runtime conditions. If one of these exceptions is thrown, the application code being tested is invalid and must be changed. Avoid handling these types of exceptions:
BuilderException
ConcurrencyException
ConversionException
DescriptorException
QueryException
ValidationException
All exceptions return the name of the exception and a message describing what caused the exception. The message given is dependent on the type of exception.
Each TopLink exception thrown has the following information:
A development exception that is raised when the Builder file format for the descriptor is not in a proper state. If possible, the message returned gives the line number of the appropriate descriptor file that caused the exception.
The source and line number are not printed only when it is possible for TopLink to detect the actual source of problem. Internal exception is printed when BuilderException
was caused due to the exception thrown by the VM.
EXCEPTION [TOPLINK - error code]:
Exception name
EXCEPTION DESCRIPTION: Message
INTERNAL EXCEPTION: Message
SOURCE: The source to the descriptor file that caused the error.
LINE NUMBER: The line number that caused the exception to be raised. This is the line number in the descriptor file.
EXCEPTION [TOPLINK - 1038]: oracle.toplink.tools.builderreader.BuilderException
EXCEPTION DESCRIPTION: No such section token: ABC
A runtime exception that wraps all RMI, CORBA, or IO exceptions that may occur.
A development exception that is raised when a Java concurrency violation occurs. Internal Exception is shown only when the running thread was interrupted and VM threw InterruptedException
.
EXCEPTION [TOPLINK - error code]:
Exception name
EXCEPTION DESCRIPTION: Message
INTERNAL EXCEPTION: Message
EXCEPTION [TOPLINK - 2004]: oracle.toplink.exceptions.ConcurrencyException
EXCEPTION DESCRIPTION: Signal attempted before wait on concurrency manager.
This normally means that an attempt was made to commit or rollback a transaction before being started, or rolledback twice.
A development exception that is raised when a conversion error occurs by an incompatible type conversion. The message returned indicates which type cast caused the exception.
EXCEPTION [TOPLINK - error code]: Exception name EXCEPTION DESCRIPTION: Message INTERNAL EXCEPTION: Message
EXCEPTION [TOPLINK - 3006]: oracle.toplink
.exceptions.ConversionException
EXCEPTION DESCRIPTION: object must be of even length to be converted to a
ByteArray
A runtime exception that is raised when data read from the database or the data that is to be written to the database is incorrect. The exception also acts as a wrapper for SQLException
in which case it contains a reference to the error code and error message. This exception can occur on any database type operation.
Internal exception and error code are printed when the exception is wrapping SQLException
.
EXCEPTION [TOPLINK - error code]: Exception name EXCEPTION DESCRIPTION: Message INTERNAL EXCEPTION: Message ERROR CODE: Error code
EXCEPTION [TOPLINK - 4002]: oracle.toplink
.exceptions.DatabaseExceptions
EXCEPTION DESCRIPTION: java.sql.SQLException: [INTERSOLV][ODBC dBase driver]
Incompatible datatypes in expression: >
INTERNAL EXCEPTION: java.sql.SQLException: [INTERSOLV][ODBC dBase driver]
Incompatible datatypes in expression: >
ERROR CODE: 3924
A development exception that is raised when insufficient information has been provided to the descriptor. The message returned includes the name of the descriptor or mapping that caused the exception. If a mapping within the descriptor caused the error, the name and parameters of the mapping are part of the returned message.
Internal exception, mapping and descriptor are optional. They are displayed only when TopLink has enough information about the source of the problem.
EXCEPTION [TOPLINK - error code]: Exception name EXCEPTION DESCRIPTION: Message INTERNAL EXCEPTION: Message MAPPING: Database mapping DESCRIPTOR: Descriptor
EXCEPTION [TOPLINK - 75]: oracle.toplink.exceptions.DescriptorException
EXCEPTION DESCRIPTION: The reference class is not specified.
A runtime exception that is raised when the row on the database matching the desired object is missing or when the value on the database does not match the registered number. It is used in conjunction with the optimistic locking feature. This applies only on update or delete operation. Refer to the Oracle9iAS TopLink: Mapping Workbench Reference Guide for more information on optimistic locking. These exceptions should be handled in a try-catch block.
EXCEPTION [TOPLINK - error code]: Exception Name EXCEPTION DESCRIPTION: Message
EXCEPTION [TOPLINK - 5003]: oracle.toplink
.exceptions.OptimisticLockException
EXCEPTION DESCRIPTION: The object, object.toString() cannot be deleted because
it has changed or been deleted since it was last read.
A development exception that is raised when insufficient information has been provided to the query. If possible, the message indicates the query that caused the exception. Query is optional and is displayed if TopLink has a query that caused this exception.
EXCEPTION [TOPLINK - error code]: Exception name EXCEPTION DESCRIPTION: Message QUERY:
EXCEPTION [TOPLINK - 6026]: oracle.toplink
.exceptions.QueryException
EXCEPTION DESCRIPTION: Query is not defined.
Superclass for all TopLink-generated exceptions. It is an abstract class.
A development exception that is raised when an incorrect state is detected or an API is used incorrectly.
EXCEPTION [TOPLINK - error code]: Exception name EXCEPTION DESCRIPTION: Message
EXCEPTION [TOPLINK - 6026]: oracle.toplink
.exceptions.ValidationException
EXCEPTION DESCRIPTION: Child descriptors do not have an identity map, they share
their parent's.
|
Copyright © 2002 Oracle Corporation. All Rights Reserved. |
|