|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--com.ibm.db.DataException
DataException represents exceptions that are raised by classes in com.ibm.db package.
Field Summary | |
static int |
alreadyConnected
Error code if cannot connect to database because already connected. |
static int |
badJavaClass
Error code if an invalid Java Class specified. |
static int |
badSQLType
Error code if an invalid/unsupported SQL type is specified. |
static int |
badUidPwd
Error code if an invalid userID or password specified. |
static int |
beforeCacheStart
Error code if the specified row is before the start of the cache. |
static int |
beforeResultCacheStart
Error code if the specified result set is before the start of the cache. |
static int |
cannotConvert
Error code if a String value cannot be converted to an object of another class. |
static int |
cannotConvertToString
Error code if cannot convert a column value to a String. |
static int |
cannotRefreshData
Error code if cannot refresh data in a row because the row cannot be found in the database. |
static int |
cloneNotSupported
Error code if the object does not support cloning. |
static int |
connectionClosed
Error code if the JDBC connection you pass to the DatabaseConnection constructor is not open. |
private static java.lang.String |
copyright
|
static int |
decodeError
Error code if a decode error encountered. |
static int |
driverNotFound
Error code if the JDBC driver class not found when attempting to connect. |
static int |
duplicateColumn
Error code if the specified column is already defined. |
static int |
duplicateParm
Error code if the specified paramenter is already defined. |
protected int |
errCode
|
static int |
errorMakeField
Error code if an unsupported Java class specified for column/parameter. |
static int |
externallyManaged
Error code if the connection is externally managed. |
protected java.sql.SQLException |
fieldSQLException
|
static int |
illegalAccess
Error code if the newInstance method of a Class object
fails because the class or initializer is not accessible. |
static int |
inconsistentColumnCount
Error code if the number of columns in a result set does not match the number of columns specified in the StatementMetaData. |
static int |
inconsistentColumns
Error code if the defined columns are inconsistent with SQL statement. |
static int |
inconsistentColumnType
Error code if the SQL data types of columns in a result set do not match the SQL data types of columns specified in the StatementMetaData. |
static int |
indexTooLarge
Error code if the specified row index exceeds the allowable range. |
static int |
instantiationException
Error code if the newInstance method of a Class object
fails because the Class object is abstract or an interface. |
static int |
internalError
Error code if an internal error occurred. |
static int |
invalidConnPoolType
Error code if an invalid connection pool type was specified. |
static int |
lockNotSupported
Error code if method lockRow not supported for database product. |
static int |
maxSize
Error code if newRow failed because result set max size limit reached. |
static int |
multipleTables
Error code if result set is from multiple tables and update, delete or insert was requested. |
static int |
noActiveConnection
Error code if the connection is not active. |
static int |
noConnection
Error code if there is no associated DatabaseConnection. |
static int |
noConnectionSpec
Error code if an error occured creating a DatabaseConnectionSpec. |
static int |
noGui
Error code if no GUI is available. |
static int |
noLogonSpec
Error code if an error occured creating a DatabaseLogonSpec. |
static int |
noMetaData
Error code if there is no associated StatementMetaData. |
static int |
noResults
Error code if the result set is empty. |
static int |
noResultSets
Error code if there are no result sets. |
static int |
noSearchableColumns
Error code if no searchable columns are in the result set. |
static int |
noSQL
Error code if no SQL Statement is specified. |
static int |
noStatement
Error code if there is no associated Statement object. |
static int |
noStatementMetaData
Error code if an error occurred creating StatementMetaData. |
static int |
noSuchColumn
Error code if the specified column is not defined. |
static int |
noSuchParm
Error code if the specified parameter is not defined. |
static int |
noSuchTable
Error code if the specified table is not defined. |
static int |
noTableDefined
Error code if the bean cannot identify the correct table(s) in order to lock, update, insert, or delete a row, or to re-fetch data from it. |
static int |
notCall
Error code if the SQL statement is not a CALL statement. |
static int |
notExecuted
Error code if the SQL statement has not been executed. |
static int |
notExecuting
Error code if execution of the SQL statement cannot be canceled because the statement is not executing. |
static int |
notOpen
Error code if the result set is not open. |
static int |
noTransactions
Error code if autoCommit false not supported for database product. |
static int |
notRegistered
Error code if the connection alias is not registered. |
static int |
notSelect
Error code if the SQL statement is not a SELECT statement. |
static int |
noValuesSet
Error code if cannot insert because no values were set. |
static int |
readOnly
Error code if the result set is read only. |
static int |
resultIndexTooLarge
Error code if the specified result set index exceeds the allowable range. |
static int |
rowChanged
Error code if the current row cannot be updated or deleted because no matching row could be found in the database. |
static int |
rowNotFound
Error code if a lock cannot be obtained on the current row because no matching row could be found in the database. |
static int |
rowNotInDatabase
Error code if the specified row is not in the database. |
static int |
SQLDisconnectException
Error code if an exception occurred during disconnect. |
static int |
sqlException
Error code if an SQLException occurred. |
static int |
transactionIsolationError
Error code if can't set transaction isolation level |
static int |
truncated
Error code if cannot perform operation because data truncation occurred when row was retrieved. |
static int |
unzipError
Error code if an unzip error encountered. |
static int |
websphereConnectionError
Error code if error was encountered obtaining a connection from or releasing a connection to a WebSphere connection pool. |
static int |
wrongObjectType
Error code if the wrong object type is used to update column/parameter. |
static int |
zipError
Error code if a zip error encountered. |
Fields inherited from class java.lang.Throwable |
backtrace,
detailMessage,
serialVersionUID |
Constructor Summary | |
DataException(java.lang.String message,
int errorCode)
Constructs a new DataException with the specified message and error code. |
|
DataException(java.lang.String message,
java.sql.SQLException ex)
Constructs a new DataException with the specified message and associates the specified SQLException with the DataException. |
Method Summary | |
int |
getErrorCode()
Returns the error code associated with the exception. |
java.sql.SQLException |
getSQLException()
Returns the SQLException that is associated with the DataException. |
java.lang.String |
toString()
Returns a string representation of the exception. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace,
getLocalizedMessage,
getMessage,
printStackTrace,
printStackTrace,
printStackTrace,
printStackTrace0 |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected java.sql.SQLException fieldSQLException
protected int errCode
public static final int sqlException
getSQLException
to get the SQLException itself, and examine its contents.public static final int inconsistentColumnCount
public static final int inconsistentColumnType
public static final int inconsistentColumns
inconsistentColumnCount
and inconsistentColumnType
.public static final int wrongObjectType
setColumnValue
or setParameter
has a different java class than expected for
the column or parameter based on the StatementMetaData.public static final int noSQL
public static final int badSQLType
addColumn
or addParameter
method to describe a column or parameter in the StatementMetaData
and you specify a value for the targetSQLType
parameter which
is not recognized.
It can also occur when you retrieve a result set returned by a query
or a stored procedure, and it includes a column with a SQL data type that is
not recognized.
In either case, you can avoid the error by using the addColumn
or addParameter
method of StatementMetaData to specify
a suitable recognized target SQL data type or a specific java class
to use for the column or parameter.public static final int notRegistered
public static final int zipError
public static final int unzipError
public static final int decodeError
setPassword
message and
request that the password be decoded before it is saved. The password
could not be decoded.public static final int websphereConnectionError
connect
or disconnect
if you
are using WebSphere connection pools.public static final int invalidConnPoolType
setConnectionPoolType
.public static final int badUidPwd
connect
method.public static final int noSuchParm
public static final int noSuchColumn
public static final int rowNotFound
public static final int noConnection
public static final int notOpen
public static final int connectionClosed
public static final int externallyManaged
connect
.public static final int SQLDisconnectException
public static final int badJavaClass
javaClass
parameter of the addColumn
or addParameter
method of StatementMetaData.public static final int errorMakeField
javaClass
parameter of the addColumn
or addParameter
method of StatementMetaData is not recognized as a valid class to
contain data for a column or parameter.public static final int notExecuted
public static final int noResults
getCacheValueAt
method of SelectResult.public static final int readOnly
deleteRow
) or would lead to changing the database later
(such as setColumnValue
).public static final int beforeCacheStart
public static final int rowNotInDatabase
lockRow
method
on a row you added to the result set via newRow
before you have inserted it into the database.
A row that is not in the database cannot be locked.public static final int multipleTables
public static final int cloneNotSupported
public static final int instantiationException
newInstance
method of a Class object
fails because the Class object is abstract or an interface.
This is an internal error that should not occur under normal conditions.public static final int illegalAccess
newInstance
method of a Class object
fails because the class or initializer is not accessible.
This is an internal error that should not occur under normal conditions.public static final int cannotConvert
setColumnValueFromString
or setParameterFromString
cannot be converted to an object of the
appropriate type for the column or parameter.public static final int noConnectionSpec
public static final int noLogonSpec
public static final int noStatementMetaData
public static final int noActiveConnection
public static final int internalError
public static final int noGui
public static final int noStatement
public static final int noMetaData
public static final int noSuchTable
removeTable
method to remove a table from the list in a StatementMetaData
object, but the table you specify is not found in the list.public static final int duplicateColumn
addColumn
method to add a column description to a StatementMetaData object,
but it already has a column with the specified name.public static final int duplicateParm
addParameter
method to add a parameter description to a StatementMetaData object,
but it already has a parameter with the specified name.public static final int indexTooLarge
getCacheValueAt
method of
SelectResult.public static final int maxSize
newRow
failed because result set max size limit reached.
This occurs if you have set the maximumRows
property of a
statement to a non-zero limit. This limit not only prevents rows beyond the limit
from being fetched from the database, but also from being added to the cache
via newRow
.public static final int driverNotFound
public static final int rowChanged
public static final int lockNotSupported
lockRow
not supported for database product.
The lockRow
method is not supported for Oracle, Microsoft SQL Server,
Sybase SQL Server, and databases which do not support positioned updates
and deletes (as reported in the JDBC DatabaseMetaData).public static final int noTransactions
public static final int truncated
deleteRow
or setColumnValue
and a truncation warning was raised by the
database when the row was fetched. If data was truncated, it will not be
possible to find the correct row in the database to perform an update or delete.public static final int notSelect
public static final int notCall
public static final int noResultSets
public static final int noValuesSet
updateRow
for a
row added to the result set via newRow
in which you have not yet set any values.public static final int alreadyConnected
public static final int notExecuting
cancelExecution
method to cancel a statement you are
executing via the execute
method or when using the
cancelAction
method to cancel a statement you are executing via
the updateRow
or deleteRow
methods.
The cancelExecution
and cancelAction
methods must
be invoked from a thread other than the one in which the statement
is executing, while the statment is executing.
public static final int beforeResultCacheStart
public static final int resultIndexTooLarge
public static final int noSearchableColumns
public static final int noTableDefined
public static final int transactionIsolationError
public static final int cannotConvertToString
getColumnValueToString
method, and the Clob or Blob has been invalidated (by a commit,
for example).
It can also happen if there is a parameter with a Clob or Blob value
which you attempt to get using the getParameterToString
method, and the Clob or Blob has been invalidated.
If you set the option validateLOBs
, the bean will try to
re-fetch any invalid Clobs or Blobs before reporting this error.
However, under some circumstances, the bean will still fail. For example,
the bean will fail if you are no longer connected to the database, or if
the value you are getting was originally set by you, not fetched
from the database via this result set.public static final int cannotRefreshData
validateLOBs
option, an attempt
is made to refresh the value of any LOB that has become invalid
(due to a commit occuring, for example).
A variety of conditions may prevent the row from being found.
It could have been changed in the database independently of this
object after the row data was retrieved. Data for one or more columns
in the row could have been truncated or reformatted when retrieved
from the database, and therefore not match the database. For example,
decimal data is truncated when retrieved as an integer, timestamp data
is truncated when retrieved as a date, and a date stored as a string in
the database may be reformatted when retrieved as a date.private static final java.lang.String copyright
Constructor Detail |
public DataException(java.lang.String message, int errorCode)
message
- the exception messageerrorcode
- the error codepublic DataException(java.lang.String message, java.sql.SQLException ex)
message
- the exception messageex
- the associated SQLExceptionMethod Detail |
public int getErrorCode()
public java.sql.SQLException getSQLException()
sqlException
, this method
returns a null.public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |