Oracle® Application Server TopLink Application Developer's Guide
10g Release 2 (10.1.2) Part No. B15901-01 |
|
Previous |
Next |
All OracleAS TopLink exceptions are descendants of RuntimeException
. The TopLinkException
class is the superclass of all runtime and development type exceptions.
Runtime exceptions indicate error conditions at runtime, though not necessarily fatal errors. Instead, they indicate that runtime conditions are invalid, such as the loss of a database connection. All these exceptions must be handled in a try-catch block.
The following exceptions can be thrown at runtime:
DatabaseException
OptimisticLockException
CommunicationException
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 you initialize an application that contains an erroneous descriptor or mapping property. Development exceptions are useful as a debugging tool to find inconsistencies in the descriptor. Because development exceptions represent abnormal 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, then the application code being tested is invalid and must be changed. Avoid handling these types of exceptions:
DescriptorException
BuilderException
ConcurrencyException
ConversionException
QueryException
ValidationException
All exceptions return the name of the exception and a message that describes what caused the exception. The message that appears reflects the type of exception.
OracleAS TopLink exceptions include the following information:
The name of the OracleAS TopLink exception
A description of the most probable cause of the error
A native error code
OracleAS TopLink does not necessarily use the full range of exception error code numbers available. Table C-1 indicates the potential range:
Table C-1 Range of OracleAS TopLink Exception Error Codes
Exceptions | Error Code Range |
---|---|
Descriptor Exception | 1 - 199 |
Builder Exception | 1001 - 2000 |
Concurrency Exception | 2001 - 3000 |
Conversion Exception | 3001 - 4000 |
Database Exception | 4001 - 5000 |
Optimistic Lock Exception | 5001 - 6000 |
Query Exception | 6001 - 7000 |
Validation Exception | 7001 - 8000 |
EJB QL Exception | 8001 - 8999 |
Session Loader Exception | 9000 - 10000 |
EJB Exception Factory | 10001 - 11000 |
Cache Synch Communication Exception | 11001 - 12000 |
Communication Exception | 12001 - 13000 |
XML Data Store Exception | 13001 - 14000 |
Deployment Exception | 14001 - 15000 |
Synchronization Exception | 15001 - 16000 |
JDO Exception | 16001 - 17000 |
SDK Data Store Exception | 17001 - 18000 |
JMS Processing Exception | 18001 - 19000 |
SDK Descriptor Exception | 19001 - 20000 |
SDK Query Exception | 20001 - 21000 |
Discovery Exception | 22000 - 22100 |
Remote Command Manager Exception | 22101 - 22200 |
XML Conversion Exception | 25001 - 26000 |
EJB JAR XML Exception | 72001 - 73000 |