»

Oracle JDBC Driver errors

The Java Database Connectivity (JDBC) API is the industry standard for database-independent connectivity between the Java programming language and a wide range of databases—SQL databases and other tabular data sources, such as spreadsheets or flat files

http://www.oracle.com/technetwork/database/application-development/jdbc/overview/index.html
Solution coverage:
Summary coverage:

Top patterns

  1. Generic SQL Exception

    This java.sql.SQLException is generated from the "DatabaseError.throwSqlException" method. This SQL Exception could happen for many various reasons. For the particular reason that this Database Error is generated, will be indicated by the text following the "java.sql.SQLException:". Therefore this SQLException covers many different causes of the database problems.

    Here are a few examples of this exception, the different cause of the problems, and the possible solutions:

    Exception message: The Network Adapter could not establish the connection

    • verify the URL is correct, for example: "jdbc:oracle:thin:@hostname:port:sid"
    • check the hostname is correct, IP address is correct (if IP address is used)
    • check port is correct.
    • the SID is correct.
    • database is running on the hostname server, and verify port is listening
    • check the server firewall setting to allow the database port traffic

    Exception message: setString can only process strings of less than 32766 characters

    • limitation on the characters length of the strings, thus the length must be reduced.

    Exception message: cannot insert NULL into ("FWDS_AT02"."BATCH_JOB_EXECUTION"."START_TIME")

    • check if this BATCH_JOB_EXECUTION.START_TIME column is nullable on your database and set it to nullable if not.
  2. Incorrect Syntax in SQL statement

    Verify the application program has the correct syntax in the database execute statement. Obtain the scheme of the database table or view you are to access, including each column definition in the table. Verify database execute statement has the correct syntax .

    For examples:

    Exception message: ORA-00942: table or view does not exist

    Access the database, and check the table or view does exist. If not exist, create the table or view in database.

    Exception message: ORA-00904: "ACTION": invalid identifier

    Check if the identifier "ACTION" exist in database, for example the column "ACTION" must be in the database table.

  3. Generic SQL Exception

    This java.sql.SQLException error thrown by the T4CTTIoer.processError method is a generic exception which is caught by the database execution program.

    There is no specific exception type of this error, in general it is commonly caught when there is problem in accessing the database.

    Here are some examples of this exception:

    Exception message: character set mismatch

    Solution is to check the data character type is supported, or the NCHAR and NVARCHAR2 type used in the database is valid.

    Exception message: invalid username/password; logon denied

    This is the authentication error, ensure the correct username or password is used. If this is provided via a property file, check the credential is correct. If password is in encrypted format, verify it via decryption, and it is correct.

Error patternsPackagesClassesMethodsExceptions
DescriptionException TypeEntry MethodWeb pages

Generic SQL Exception

java.sql.SQLException
oracle.jdbc.driver.DatabaseError.throwSqlException
2190Web pages
1Solution
SQLExceptionDatabaseError.throwSqlException2190

Incorrect Syntax in SQL statement

java.sql.SQLSyntaxErrorException
oracle.jdbc.driver.T4CTTIoer.processError
517Web pages
1Solution
SQLSyntaxErrorExceptionT4CTTIoer.processError517

Generic SQL Exception

java.sql.SQLException
oracle.jdbc.driver.T4CTTIoer.processError
442Web pages
1Solution
SQLExceptionT4CTTIoer.processError442

Generic SQL Exception

java.sql.SQLException
oracle.jdbc.driver.SQLStateMapping.newSQLException
433Web pages
1Solution
SQLExceptionSQLStateMapping.newSQLException433

The Oracle XA library is not configured properly to use

oracle.jdbc.xa.OracleXAException
oracle.jdbc.xa.OracleXAResource.checkError
168Web pages
1Solution
OracleXAExceptionOracleXAResource.checkError168

Failed Batch Update

java.sql.BatchUpdateException
oracle.jdbc.driver.DatabaseError.throwBatchUpdateException
132Web pages
1Solution
BatchUpdateExceptionDatabaseError.throwBatchUpdateException132

Incorrect syntax in SQL statement

java.sql.SQLSyntaxErrorException
oracle.jdbc.driver.SQLStateMapping.newSQLException
122Web pages
1Solution
SQLSyntaxErrorExceptionSQLStateMapping.newSQLException122

Integrity Constraint Violation fix

java.sql.SQLIntegrityConstraintViolationException
oracle.jdbc.driver.T4CTTIoer.processError
108Web pages
1Solution
SQLIntegrityConstraintViolationExceptionT4CTTIoer.processError108

Connection reset while accessing the database

java.sql.SQLRecoverableException
oracle.jdbc.driver.T4CConnection.logon
66Web pages
1Solution
SQLRecoverableExceptionT4CConnection.logon66

Listener refused the database connection

java.sql.SQLException
oracle.jdbc.driver.T4CConnection.logon
62Web pages
1Solution
SQLExceptionT4CConnection.logon62

Column Names and Values not implemented correctly

java.sql.SQLException
oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow
51Web pages
1Solution
SQLExceptionOraclePreparedStatement.processCompletedBindRow51

Database Connections reached maximum limit

oracle.net.ns.NetException
oracle.net.ns.Packet.receive
51Web pages
1Solution
NetExceptionPacket.receive51

Failed to execute batch

java.sql.BatchUpdateException
oracle.jdbc.driver.OraclePreparedStatement.executeBatch
49Web pages
1Solution
BatchUpdateExceptionOraclePreparedStatement.executeBatch49

Connection types of Service Name or SID

oracle.net.ns.NetException
1 frames hidden
oracle.jdbc.driver.T4CConnection.connect
45Web pages
1Solution
NetExceptionT4CConnection.connect45

Oracle socket with no connection

java.sql.SQLRecoverableException
oracle.jdbc.driver.T4CMAREngine.unmarshalUB1
44Web pages
1Solution
SQLRecoverableExceptionT4CMAREngine.unmarshalUB144

Provide Username and Password via GetConnection method

java.sql.SQLRecoverableException
2 frames hidden
oracle.jdbc.driver.DatabaseError.throwSqlException
44Web pages
1Solution
SQLRecoverableExceptionDatabaseError.throwSqlException44

Setting object with invalid column type

java.sql.SQLException
oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical
39Web pages
1Solution
SQLExceptionOraclePreparedStatement.setObjectCritical39

Oracle Driver protocol error

java.sql.SQLException
1 frames hidden
oracle.jdbc.driver.T4CTTIfun.doRPC
31Web pages
1Solution
SQLExceptionT4CTTIfun.doRPC31

Correct the version of the oracle driver being used

java.lang.ClassCastException
oracle.sql.ArrayDescriptor.createDescriptor
30Web pages
1Solution
ClassCastExceptionArrayDescriptor.createDescriptor30

Recovery process requires user permission access

javax.transaction.xa.XAException
oracle.jdbc.xa.OracleXAResource.recover
29Web pages
1Solution
XAExceptionOracleXAResource.recover29

Insert non-Null column data values

java.sql.SQLIntegrityConstraintViolationException
oracle.jdbc.driver.SQLStateMapping.newSQLException
29Web pages
1Solution
SQLIntegrityConstraintViolationExceptionSQLStateMapping.newSQLException29

Incorrect Select from Table statement

java.lang.NullPointerException
oracle.jdbc.driver.T4C8Oall.getNumRows
27Web pages
1Solution
NullPointerExceptionT4C8Oall.getNumRows27

Incorrect oracle driver being used

java.lang.NoSuchMethodError
oracle.sql.converter.CharacterConverterFactoryOGS.make
24Web pages
1Solution
NoSuchMethodErrorCharacterConverterFactoryOGS.make24

Column invalid on database

java.sql.SQLException
oracle.jdbc.driver.OraclePreparedStatement.setStringInternal
24Web pages
1Solution
SQLExceptionOraclePreparedStatement.setStringInternal24

Driver causing link error

java.lang.UnsatisfiedLinkError
oracle.jdbc.driver.T2CConnection.t2cGetCharSet
24Web pages
1Solution
UnsatisfiedLinkErrorT2CConnection.t2cGetCharSet24

Memory space insufficient

oracle.wh.util.DebugUtility
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout
24Web pages
1Solution
DebugUtilityOracleStatement.doExecuteWithTimeout24

Column name not found

java.sql.SQLException
oracle.jdbc.driver.OracleStatement.getColumnIndex
23Web pages
1Solution
SQLExceptionOracleStatement.getColumnIndex23

Driver missing classes

java.lang.NoClassDefFoundError
3 frames hidden
oracle.jdbc.driver.OracleDriver.connect
19Web pages
1Solution
NoClassDefFoundErrorOracleDriver.connect19

Invalid column type access

java.sql.SQLException
oracle.jdbc.driver.OracleStatement.getInternalType
18Web pages
1Solution
SQLExceptionOracleStatement.getInternalType18

Local transaction not allowed

javax.transaction.xa.XAException
oracle.jdbc.xa.OracleXAResource.disallowLocalTxnMode
17Web pages
1Solution
XAExceptionOracleXAResource.disallowLocalTxnMode17

Set the TimeZone to use by oracle

java.sql.SQLDataException
5 frames hidden
oracle.jdbc.driver.T4C8Oall.doOALL
17Web pages
1Solution
SQLDataExceptionT4C8Oall.doOALL17

String cannot be cast to BLOB

java.lang.ClassCastException
oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical
17Web pages
1Solution
ClassCastExceptionOraclePreparedStatement.setObjectCritical17

Cannot class cast to oracle connection

java.lang.ClassCastException
oracle.sql.CLOB.createTemporary
15Web pages
1Solution
ClassCastExceptionCLOB.createTemporary15

Oracle driver missing DMSConsole class

java.lang.NoClassDefFoundError
oracle.jdbc.driver.DMSFactory.<clinit>
15Web pages
1Solution
NoClassDefFoundErrorDMSFactory.<clinit>15

Oracle driver installation

oracle.wh.util.DebugUtility
oracle.jdbc.driver.OraclePreparedStatement.execute
14Web pages
1Solution
DebugUtilityOraclePreparedStatement.execute14

Batch size causes ArrayIndexOutOfBounds

java.lang.ArrayIndexOutOfBoundsException
oracle.jdbc.driver.OraclePreparedStatement.setupBindBuffers
13Web pages
1Solution
ArrayIndexOutOfBoundsExceptionOraclePreparedStatement.setupBindBuffers13

Driver upgrade generates ArrayIndexOutOfBoundsException

java.lang.ArrayIndexOutOfBoundsException
oracle.sql.NUMBER._fromLnxFmt
13Web pages
1Solution
ArrayIndexOutOfBoundsExceptionNUMBER._fromLnxFmt13

Closed cursor when accessing ResultSet

java.sql.SQLException
oracle.jdbc.driver.T4CResultSetAccessor.getCursor
13Web pages
1Solution
SQLExceptionT4CResultSetAccessor.getCursor13

Oracle driver installation problem

oracle.wh.util.DebugUtility
oracle.jdbc.driver.T2CConnection.checkError
13Web pages
1Solution
DebugUtilityT2CConnection.checkError13

Cannot class cast to oracle connection

java.lang.ClassCastException
oracle.sql.StructDescriptor.createDescriptor
12Web pages
1Solution
ClassCastExceptionStructDescriptor.createDescriptor12

Oracle socket with no connection

java.sql.SQLException
oracle.jdbc.driver.T4CMAREngine.unmarshalUB1
12Web pages
1Solution
SQLExceptionT4CMAREngine.unmarshalUB112

Listener refused the connection

oracle.net.ns.NetException
oracle.net.ns.NSProtocolStream.negotiateConnection
12Web pages
1Solution
NetExceptionNSProtocolStream.negotiateConnection12

Cannot set a named parameter

java.sql.SQLException
1 frames hidden
oracle.jdbc.driver.OraclePreparedStatementWrapper.setObjectAtName
11Web pages
1Solution
SQLExceptionOraclePreparedStatementWrapper.setObjectAtName11

Oracle Connection Closed

java.sql.SQLRecoverableException
oracle.jdbc.driver.PhysicalConnection.needLine
11Web pages
1Solution
SQLRecoverableExceptionPhysicalConnection.needLine11

No data from socket

java.sql.SQLRecoverableException
oracle.jdbc.driver.T4CMAREngineStream.unmarshalUB1
11Web pages
1Solution
SQLRecoverableExceptionT4CMAREngineStream.unmarshalUB111

ArrayIndexOutOfBounds 0 Exception occurred

java.lang.ArrayIndexOutOfBoundsException
3 frames hidden
oracle.jdbc.driver.OraclePreparedStatement.setItem
11Web pages
1Solution
ArrayIndexOutOfBoundsExceptionOraclePreparedStatement.setItem11

No access to OracleDriverExtension

java.lang.IllegalAccessError
oracle.jdbc.driver.OracleDriver.<init>
11Web pages
1Solution
IllegalAccessErrorOracleDriver.<init>11

Cannot find Oracle libraries

java.lang.UnsatisfiedLinkError
oracle.jdbc.driver.T2CStatement.t2cParseExecuteDescribe
11Web pages
1Solution
UnsatisfiedLinkErrorT2CStatement.t2cParseExecuteDescribe11

Oracle cannot find the class Savepoint

java.lang.NoClassDefFoundError
oracle.jdbc.driver.OracleDriver.getConnectionInstance
11Web pages
1Solution
NoClassDefFoundErrorOracleDriver.getConnectionInstance11

Oracle producing a Arithmetic divide by zero exception

java.lang.ArithmeticException
oracle.jdbc.driver.OraclePreparedStatement.<init>
11Web pages
1Solution
ArithmeticExceptionOraclePreparedStatement.<init>11
Nothing to list here.
Nothing to list here.
Nothing to list here.
Nothing to list here.