Oracle Fusion Middleware Java API Reference for Oracle TopLink (Deprecated)
11g Release 1 (11.1.1)

B32476-04

oracle.toplink.exceptions
Class DatabaseException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by oracle.toplink.exceptions.TopLinkException
                  extended by oracle.toplink.exceptions.DatabaseException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
EISException, SDKDataStoreException

public class DatabaseException
extends TopLinkException

Purpose: Wrapper for any database exception that occurred through TopLink.

See Also:
Serialized Form

Field Summary
static int CANNOT_REGISTER_SYNCHRONIZATIONLISTENER_FOR_UNITOFWORK
           
static int CONFIGURATION_ERROR_CLASS_NOT_FOUND
           
static int CONFIGURATION_ERROR_NEW_INSTANCE_ILLEGAL_ACCESS_EXCEPTION
           
static int CONFIGURATION_ERROR_NEW_INSTANCE_INSTANTIATION_EXCEPTION
           
static int COULD_NOT_CONVERT_OBJECT_TYPE
           
static int COULD_NOT_FIND_MATCHED_DATABASE_FIELD_FOR_SPECIFIED_OPTOMISTICLOCKING_FIELDS
           
static int DATABASE_ACCESSOR_NOT_CONNECTED
           
static int ERROR_PREALLOCATING_SEQUENCE_NUMBERS
           
static int ERROR_READING_BLOB_DATA
           
static int ERROR_RETRIEVE_DB_METADATA_THROUGH_JDBC_CONNECTION
           
static int LOGOUT_WHILE_TRANSACTION_IN_PROGRESS
           
static int SEQUENCE_TABLE_INFORMATION_NOT_COMPLETE
           
static int SQL_EXCEPTION
           
static int SYNCHRONIZED_UNITOFWORK_DOES_NOT_SUPPORT_COMMITANDRESUME
           
static int TRANSACTION_MANAGER_NOT_SET_FOR_JTS_DRIVER
           
static int UNABLE_TO_ACQUIRE_CONNECTION_FROM_DRIVER
           
 
Method Summary
static DatabaseException cannotRegisterSynchronizatonListenerForUnitOfWork(java.lang.Exception e)
           
static DatabaseException configurationErrorClassNotFound(java.lang.String className)
           
static DatabaseException configurationErrorNewInstanceIllegalAccessException(java.lang.IllegalAccessException exception, java.lang.Class javaClass)
           
static DatabaseException configurationErrorNewInstanceInstantiationException(java.lang.InstantiationException exception, java.lang.Class javaClass)
           
static DatabaseException couldNotConvertObjectType(int type)
           
static DatabaseException databaseAccessorNotConnected()
           
static DatabaseException databaseAccessorNotConnected(DatabaseAccessor databaseAccessor)
           
static DatabaseException errorPreallocatingSequenceNumbers()
           
static DatabaseException errorReadingBlobData()
           
static DatabaseException errorRetrieveDbMetadataThroughJDBCConnection()
           
 Accessor getAccessor()
          Return the accessor.
 Call getCall()
          Return the call that caused the exception.
 int getDatabaseErrorCode()
          This is the database error number.
 java.lang.String getMessage()
          This is the database error message.
 DatabaseQuery getQuery()
          This method returns the databaseQuery.
 Record getQueryArgumentsRecord()
          Return the query argements used in the original query when exception is thrown
 boolean isCommunicationFailure()
          
static DatabaseException logoutWhileTransactionInProgress()
           
static DatabaseException sequenceTableInformationNotComplete()
           
 void setQuery(DatabaseQuery query)
          This method set the databaseQuery.
 void setQueryArguments(oracle.toplink.internal.sessions.AbstractRecord queryArguments)
          Set the query argements used in the original query when exception is thrown
static DatabaseException specifiedLockingFieldsNotFoundInDatabase(java.lang.String lockingFieldName)
           
static DatabaseException sqlException(java.sql.SQLException exception)
           
static DatabaseException sqlException(java.sql.SQLException exception, oracle.toplink.internal.sessions.AbstractSession session)
           
static DatabaseException sqlException(java.sql.SQLException exception, Accessor accessor, oracle.toplink.internal.sessions.AbstractSession session, boolean isCommunicationFailure)
           
static DatabaseException sqlException(java.sql.SQLException exception, Call call, Accessor accessor, oracle.toplink.internal.sessions.AbstractSession session, boolean isCommunicationFailure)
           
static DatabaseException synchronizedUnitOfWorkDoesNotSupportCommitAndResume()
           
static DatabaseException transactionManagerNotSetForJTSDriver()
           
static DatabaseException unableToAcquireConnectionFromDriverException(java.sql.SQLException exception, java.lang.String driver, java.lang.String user, java.lang.String url)
          The connection returned from this driver was null, the driver may be missing(using the default) or the wrong one for the database.
static DatabaseException unableToAcquireConnectionFromDriverException(java.lang.String driver, java.lang.String user, java.lang.String url)
          The connection returned from this driver was null, the driver may be missing(using the default) or the wrong one for the database.
 
Methods inherited from class oracle.toplink.exceptions.TopLinkException
getErrorCode, getInternalException, getSession, printStackTrace, printStackTrace, printStackTrace, setShouldPrintInternalException
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SQL_EXCEPTION

public static final int SQL_EXCEPTION
See Also:
Constant Field Values

CONFIGURATION_ERROR_CLASS_NOT_FOUND

public static final int CONFIGURATION_ERROR_CLASS_NOT_FOUND
See Also:
Constant Field Values

DATABASE_ACCESSOR_NOT_CONNECTED

public static final int DATABASE_ACCESSOR_NOT_CONNECTED
See Also:
Constant Field Values

ERROR_READING_BLOB_DATA

public static final int ERROR_READING_BLOB_DATA
See Also:
Constant Field Values

COULD_NOT_CONVERT_OBJECT_TYPE

public static final int COULD_NOT_CONVERT_OBJECT_TYPE
See Also:
Constant Field Values

LOGOUT_WHILE_TRANSACTION_IN_PROGRESS

public static final int LOGOUT_WHILE_TRANSACTION_IN_PROGRESS
See Also:
Constant Field Values

SEQUENCE_TABLE_INFORMATION_NOT_COMPLETE

public static final int SEQUENCE_TABLE_INFORMATION_NOT_COMPLETE
See Also:
Constant Field Values

ERROR_PREALLOCATING_SEQUENCE_NUMBERS

public static final int ERROR_PREALLOCATING_SEQUENCE_NUMBERS
See Also:
Constant Field Values

CANNOT_REGISTER_SYNCHRONIZATIONLISTENER_FOR_UNITOFWORK

public static final int CANNOT_REGISTER_SYNCHRONIZATIONLISTENER_FOR_UNITOFWORK
See Also:
Constant Field Values

SYNCHRONIZED_UNITOFWORK_DOES_NOT_SUPPORT_COMMITANDRESUME

public static final int SYNCHRONIZED_UNITOFWORK_DOES_NOT_SUPPORT_COMMITANDRESUME
See Also:
Constant Field Values

CONFIGURATION_ERROR_NEW_INSTANCE_INSTANTIATION_EXCEPTION

public static final int CONFIGURATION_ERROR_NEW_INSTANCE_INSTANTIATION_EXCEPTION
See Also:
Constant Field Values

CONFIGURATION_ERROR_NEW_INSTANCE_ILLEGAL_ACCESS_EXCEPTION

public static final int CONFIGURATION_ERROR_NEW_INSTANCE_ILLEGAL_ACCESS_EXCEPTION
See Also:
Constant Field Values

TRANSACTION_MANAGER_NOT_SET_FOR_JTS_DRIVER

public static final int TRANSACTION_MANAGER_NOT_SET_FOR_JTS_DRIVER
See Also:
Constant Field Values

ERROR_RETRIEVE_DB_METADATA_THROUGH_JDBC_CONNECTION

public static final int ERROR_RETRIEVE_DB_METADATA_THROUGH_JDBC_CONNECTION
See Also:
Constant Field Values

COULD_NOT_FIND_MATCHED_DATABASE_FIELD_FOR_SPECIFIED_OPTOMISTICLOCKING_FIELDS

public static final int COULD_NOT_FIND_MATCHED_DATABASE_FIELD_FOR_SPECIFIED_OPTOMISTICLOCKING_FIELDS
See Also:
Constant Field Values

UNABLE_TO_ACQUIRE_CONNECTION_FROM_DRIVER

public static final int UNABLE_TO_ACQUIRE_CONNECTION_FROM_DRIVER
See Also:
Constant Field Values
Method Detail

cannotRegisterSynchronizatonListenerForUnitOfWork

public static DatabaseException cannotRegisterSynchronizatonListenerForUnitOfWork(java.lang.Exception e)

configurationErrorClassNotFound

public static DatabaseException configurationErrorClassNotFound(java.lang.String className)

configurationErrorNewInstanceIllegalAccessException

public static DatabaseException configurationErrorNewInstanceIllegalAccessException(java.lang.IllegalAccessException exception,
                                                                                    java.lang.Class javaClass)

configurationErrorNewInstanceInstantiationException

public static DatabaseException configurationErrorNewInstanceInstantiationException(java.lang.InstantiationException exception,
                                                                                    java.lang.Class javaClass)

couldNotConvertObjectType

public static DatabaseException couldNotConvertObjectType(int type)

databaseAccessorNotConnected

public static DatabaseException databaseAccessorNotConnected()

databaseAccessorNotConnected

public static DatabaseException databaseAccessorNotConnected(DatabaseAccessor databaseAccessor)

errorPreallocatingSequenceNumbers

public static DatabaseException errorPreallocatingSequenceNumbers()

errorReadingBlobData

public static DatabaseException errorReadingBlobData()

specifiedLockingFieldsNotFoundInDatabase

public static DatabaseException specifiedLockingFieldsNotFoundInDatabase(java.lang.String lockingFieldName)

getAccessor

public Accessor getAccessor()
Return the accessor.


getDatabaseErrorCode

public int getDatabaseErrorCode()
This is the database error number. Since it is possible to have no internal exception the errorCode will be zero in this case.


getMessage

public java.lang.String getMessage()
This is the database error message.

Overrides:
getMessage in class TopLinkException

getQuery

public DatabaseQuery getQuery()
This method returns the databaseQuery. DatabaseQuery is a visible class to the TopLink user. Users create an appropriate query by creating an instance of a concrete subclasses of DatabaseQuery.


getCall

public Call getCall()
Return the call that caused the exception.


getQueryArgumentsRecord

public Record getQueryArgumentsRecord()
Return the query argements used in the original query when exception is thrown


logoutWhileTransactionInProgress

public static DatabaseException logoutWhileTransactionInProgress()

sequenceTableInformationNotComplete

public static DatabaseException sequenceTableInformationNotComplete()

setQuery

public void setQuery(DatabaseQuery query)
This method set the databaseQuery. DatabaseQuery is a visible class to the TopLink user. Users create an appropriate query by creating an instance of a concrete subclasses of DatabaseQuery.


setQueryArguments

public void setQueryArguments(oracle.toplink.internal.sessions.AbstractRecord queryArguments)
Set the query argements used in the original query when exception is thrown


sqlException

public static DatabaseException sqlException(java.sql.SQLException exception)

sqlException

public static DatabaseException sqlException(java.sql.SQLException exception,
                                             oracle.toplink.internal.sessions.AbstractSession session)

sqlException

public static DatabaseException sqlException(java.sql.SQLException exception,
                                             Accessor accessor,
                                             oracle.toplink.internal.sessions.AbstractSession session,
                                             boolean isCommunicationFailure)

sqlException

public static DatabaseException sqlException(java.sql.SQLException exception,
                                             Call call,
                                             Accessor accessor,
                                             oracle.toplink.internal.sessions.AbstractSession session,
                                             boolean isCommunicationFailure)

synchronizedUnitOfWorkDoesNotSupportCommitAndResume

public static DatabaseException synchronizedUnitOfWorkDoesNotSupportCommitAndResume()

transactionManagerNotSetForJTSDriver

public static DatabaseException transactionManagerNotSetForJTSDriver()

errorRetrieveDbMetadataThroughJDBCConnection

public static DatabaseException errorRetrieveDbMetadataThroughJDBCConnection()

unableToAcquireConnectionFromDriverException

public static DatabaseException unableToAcquireConnectionFromDriverException(java.lang.String driver,
                                                                             java.lang.String user,
                                                                             java.lang.String url)
The connection returned from this driver was null, the driver may be missing(using the default) or the wrong one for the database.

Parameters:
driver -
Returns:

unableToAcquireConnectionFromDriverException

public static DatabaseException unableToAcquireConnectionFromDriverException(java.sql.SQLException exception,
                                                                             java.lang.String driver,
                                                                             java.lang.String user,
                                                                             java.lang.String url)
The connection returned from this driver was null, the driver may be missing(using the default) or the wrong one for the database.

Parameters:
exception -
driver -
Returns:

isCommunicationFailure

public boolean isCommunicationFailure()

Returns:
true if the DatabaseException was created because of a communication error with the database.

Copyright © 1998, 2012, Oracle. All Rights Reserved.