public class DatabaseException extends EclipseLinkException
Purpose: Wrapper for any database exception that occurred through EclipseLink.
CR, errorCode, hasBeenLogged, indentationString, internalException, session, shouldPrintInternalException
Modifier | Constructor and Description |
---|---|
protected |
DatabaseException()
INTERNAL:
EclipseLink exceptions should only be thrown by the EclipseLink code.
|
protected |
DatabaseException(java.sql.SQLException exception)
INTERNAL:
EclipseLink exceptions should only be thrown by the EclipseLink code.
|
protected |
DatabaseException(java.lang.String message)
INTERNAL:
EclipseLink exceptions should only be thrown by the EclipseLink code.
|
Modifier and Type | Method and Description |
---|---|
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 |
databaseAccessorConnectionIsNull(org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor databaseAccessor,
org.eclipse.persistence.internal.sessions.AbstractSession session) |
static DatabaseException |
databaseAccessorNotConnected() |
static DatabaseException |
databaseAccessorNotConnected(org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor databaseAccessor) |
static DatabaseException |
errorPreallocatingSequenceNumbers() |
static DatabaseException |
errorReadingBlobData() |
static DatabaseException |
errorRetrieveDbMetadataThroughJDBCConnection() |
org.eclipse.persistence.internal.databaseaccess.Accessor |
getAccessor()
PUBLIC:
Return the accessor.
|
Call |
getCall()
PUBLIC:
Return the call that caused the exception.
|
int |
getDatabaseErrorCode()
PUBLIC:
This is the database error number.
|
java.lang.String |
getMessage()
PUBLIC:
This is the database error message.
|
DatabaseQuery |
getQuery()
PUBLIC:
This method returns the databaseQuery.
|
Record |
getQueryArgumentsRecord()
PUBLIC:
Return the query arguments used in the original query when exception is thrown
|
boolean |
isCommunicationFailure() |
static DatabaseException |
logoutWhileTransactionInProgress() |
static DatabaseException |
sequenceTableInformationNotComplete() |
void |
setAccessor(org.eclipse.persistence.internal.databaseaccess.Accessor accessor)
INTERNAL:
Set the Accessor.
|
void |
setCall(Call call)
INTERNAL:
Set the call that caused the exception.
|
void |
setCommunicationFailure(boolean isCommunicationFailure) |
void |
setQuery(DatabaseQuery query)
PUBLIC:
This method set the databaseQuery.
|
void |
setQueryArguments(org.eclipse.persistence.internal.sessions.AbstractRecord queryArguments)
PUBLIC:
Set the query arguments 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,
org.eclipse.persistence.internal.sessions.AbstractSession session,
boolean commError) |
static DatabaseException |
sqlException(java.sql.SQLException exception,
org.eclipse.persistence.internal.databaseaccess.Accessor accessor,
org.eclipse.persistence.internal.sessions.AbstractSession session,
boolean isCommunicationFailure) |
static DatabaseException |
sqlException(java.sql.SQLException exception,
boolean commError) |
static DatabaseException |
sqlException(java.sql.SQLException exception,
Call call,
org.eclipse.persistence.internal.databaseaccess.Accessor accessor,
org.eclipse.persistence.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.
|
cr, getErrorCode, getIndentationString, getInternalException, getSession, hasBeenLogged, printStackTrace, printStackTrace, printStackTrace, setErrorCode, setHasBeenLogged, setIndentationString, setInternalException, setSession, setShouldPrintInternalException, shouldPrintInternalException, toString
protected java.sql.SQLException exception
protected transient Call call
protected transient DatabaseQuery query
protected transient org.eclipse.persistence.internal.sessions.AbstractRecord queryArguments
protected transient org.eclipse.persistence.internal.databaseaccess.Accessor accessor
protected boolean isCommunicationFailure
public static final int SQL_EXCEPTION
public static final int CONFIGURATION_ERROR_CLASS_NOT_FOUND
public static final int DATABASE_ACCESSOR_NOT_CONNECTED
public static final int ERROR_READING_BLOB_DATA
public static final int COULD_NOT_CONVERT_OBJECT_TYPE
public static final int LOGOUT_WHILE_TRANSACTION_IN_PROGRESS
public static final int SEQUENCE_TABLE_INFORMATION_NOT_COMPLETE
public static final int ERROR_PREALLOCATING_SEQUENCE_NUMBERS
public static final int CANNOT_REGISTER_SYNCHRONIZATIONLISTENER_FOR_UNITOFWORK
public static final int SYNCHRONIZED_UNITOFWORK_DOES_NOT_SUPPORT_COMMITANDRESUME
public static final int CONFIGURATION_ERROR_NEW_INSTANCE_INSTANTIATION_EXCEPTION
public static final int CONFIGURATION_ERROR_NEW_INSTANCE_ILLEGAL_ACCESS_EXCEPTION
public static final int TRANSACTION_MANAGER_NOT_SET_FOR_JTS_DRIVER
public static final int ERROR_RETRIEVE_DB_METADATA_THROUGH_JDBC_CONNECTION
public static final int COULD_NOT_FIND_MATCHED_DATABASE_FIELD_FOR_SPECIFIED_OPTOMISTICLOCKING_FIELDS
public static final int UNABLE_TO_ACQUIRE_CONNECTION_FROM_DRIVER
public static final int DATABASE_ACCESSOR_CONNECTION_IS_NULL
protected DatabaseException()
protected DatabaseException(java.lang.String message)
protected DatabaseException(java.sql.SQLException exception)
public static DatabaseException cannotRegisterSynchronizatonListenerForUnitOfWork(java.lang.Exception e)
public static DatabaseException configurationErrorClassNotFound(java.lang.String className)
public static DatabaseException configurationErrorNewInstanceIllegalAccessException(java.lang.IllegalAccessException exception, java.lang.Class javaClass)
public static DatabaseException configurationErrorNewInstanceInstantiationException(java.lang.InstantiationException exception, java.lang.Class javaClass)
public static DatabaseException couldNotConvertObjectType(int type)
public static DatabaseException databaseAccessorNotConnected()
public static DatabaseException databaseAccessorNotConnected(org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor databaseAccessor)
public static DatabaseException databaseAccessorConnectionIsNull(org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor databaseAccessor, org.eclipse.persistence.internal.sessions.AbstractSession session)
public static DatabaseException errorPreallocatingSequenceNumbers()
public static DatabaseException errorReadingBlobData()
public static DatabaseException specifiedLockingFieldsNotFoundInDatabase(java.lang.String lockingFieldName)
public org.eclipse.persistence.internal.databaseaccess.Accessor getAccessor()
public int getDatabaseErrorCode()
public java.lang.String getMessage()
getMessage
in class EclipseLinkException
public DatabaseQuery getQuery()
public Call getCall()
public void setCall(Call call)
public Record getQueryArgumentsRecord()
public static DatabaseException logoutWhileTransactionInProgress()
public static DatabaseException sequenceTableInformationNotComplete()
public void setAccessor(org.eclipse.persistence.internal.databaseaccess.Accessor accessor)
public void setQuery(DatabaseQuery query)
public void setQueryArguments(org.eclipse.persistence.internal.sessions.AbstractRecord queryArguments)
public static DatabaseException sqlException(java.sql.SQLException exception)
public static DatabaseException sqlException(java.sql.SQLException exception, boolean commError)
public static DatabaseException sqlException(java.sql.SQLException exception, org.eclipse.persistence.internal.sessions.AbstractSession session, boolean commError)
public static DatabaseException sqlException(java.sql.SQLException exception, org.eclipse.persistence.internal.databaseaccess.Accessor accessor, org.eclipse.persistence.internal.sessions.AbstractSession session, boolean isCommunicationFailure)
public static DatabaseException sqlException(java.sql.SQLException exception, Call call, org.eclipse.persistence.internal.databaseaccess.Accessor accessor, org.eclipse.persistence.internal.sessions.AbstractSession session, boolean isCommunicationFailure)
public static DatabaseException synchronizedUnitOfWorkDoesNotSupportCommitAndResume()
public static DatabaseException transactionManagerNotSetForJTSDriver()
public static DatabaseException errorRetrieveDbMetadataThroughJDBCConnection()
public static DatabaseException unableToAcquireConnectionFromDriverException(java.lang.String driver, java.lang.String user, java.lang.String url)
driver
- public static DatabaseException unableToAcquireConnectionFromDriverException(java.sql.SQLException exception, java.lang.String driver, java.lang.String user, java.lang.String url)
exception
- driver
- public boolean isCommunicationFailure()
public void setCommunicationFailure(boolean isCommunicationFailure)