SQL Error Codes

The following table describes error codes used by SQLException objects.

This table also provides the SQLSTATE code that corresponds with each error type. The SQLSTATE is returned if using an ODBC/JDBC driver.
Error Code SQLSTATE Error Type Description Example

-1

42000

SYNTAX_ERROR

There was a SQL syntax error.

Wrong number of arguments for function.

-2

0A000

FEATURE_NOT_YET_IMPLEMENTED

The feature you tried to use is not yet implemented.

-

-3

58000

BUG_CHECK

An internal database error occurred.

-

-4

42000

COMPILE_ERROR

An error occurred during compilation of the SQL statement.

Inconsistent select list in union branches.

-5

58000

RUNTIME_ERROR

An error occurred during execution of a SQL statement.

Result set has been closed.

-6

08000

OCS_ERROR

Not used.

-

-7

08000

NETWORK_ERROR

An error occurred during a network communication with the broker or Transaction Engine (TE).

No nodes are available for database.

-8

22000

CONVERSION_ERROR

A conversion error occurred during execution of a SQL statement.

Numeric overflow converting n.

-9

22000

TRUNCATION_ERROR

A truncation error occurred during execution a SQL statement.

Assignment of n bytes into type of maximum length < n.

-10

08000

CONNECTION_ERROR

An error related to a SQL connection occurred. The error might be related to an existing connection or to the creation of a SQL connection.

Database already open.Bad statement handle.

-11

42000

DDL_ERROR

A runtime error occurred during execution of a SQL DDL statement.

Table already defined.

-12

58000

APPLICATION_ERROR

An application-specific error occurred.

Cannot execute PreparedStatement with SQL parameter.

-13

58000

SECURITY_ERROR

A database security error occurred.

No username specified. Not a known user. Requested access to foo is denied. Unsupported cipher requested.

-14

58000

DATABASE_CORRUPTION

Not used.

-

-15

58000

VERSION_ERROR

Not used.

-

-16

58000

LICENSE_ERROR

Not used.

-

-17

58000

INTERNAL_ERROR

An internal error occurred. This should never happen.

Function has not been compiled.Unexpected NULL lower bound node.

-18

58000

DEBUG_ERROR

Not used.

-

-19

22000

LOST_BLOB

Not used.

-

-20

22000

INCONSISTENT_BLOB

Not used.

-

-21

22000

DELETED_BLOB

Not used.

-

-22

58000

LOG_ERROR

Not used.

-

-23

58000

DATABASE_DAMAGED

Not used.

-

-24

40002

UPDATE_CONFLICT

A server (TE) error occurred.

Pending update rejected, transaction nnn.

-25

42000

NO_SUCH_TABLE

There was an invalid table reference.

Table has been dropped.Cannot find table.

-26

58000

INDEX_OVERFLOW

Not used.

-

-27

23000

UNIQUE_DUPLICATE

There was a server (TE) error related to duplicate values in a unique index.

-

-28

Uncommitted Updates

Not Used

-

-29

40001

DEADLOCK

There was a server (TE) deadlock error.

-

-30

58000

OUT_OF_MEMORY_ERROR

Not used.

-

-31

58000

OUT_OF_RECORD_MEMORY_ERROR

Not used.

-

-32

58000

LOCK_TIMEOUT

Not used.

-

-36

58000

PLATFORM_ERROR

This is a generic error related to the server (TE).

-

-37

58000

NO_SCHEMA

No schema was specified where a schema specification was required.

-

-38

58000

CONFIGURATION_ERROR

A server (TE) error occurred.

Could not find a valid archive at the given location.

-39

58000

READ_ONLY_ERROR

There was an attempt to write to a read-only connection.

-

-40

58000

NO_GENERATED_KEYS

Not used.

-

-41

58000

THROWN_EXCEPTION

An error occurred that is related to the SQL THROW control statement.

-

-42

58000

INVALID_TRANSACTION_ISOLATION

Not used.

-

-43

01000

UNSUPPORTED_TRANSACTION_ISOLATION

The specified transaction isolation level is not supported.

-

-44

0A000

INVALID_UTF8

A string is not in UTF-8 when it should be.

-

-45

58000

CONSTRAINT_ERROR

A SQL constraint violation occurred.

-

-46

23001

UPDATE_ERROR

There was an attempt to update a database object that cannot be updated.

Table returned by a stored procedure cannot be manipulated.

-47

58000

I18N_ERROR

An error related to internationalization occurred.

Error getting default converter.

-48

58000

OPERATION_KILLED

A SQL operation was killed, perhaps by the KILL statement.

-

-49

HY008

INVALID_STATEMENT

There was an invalid reference to a SQL statement.

On connection n, unable to kill statement m.No such statement id.

-50

58000

IS_SHUTDOWN

An error occurred because the database is shutting down.

-

-51

58000

IN_QUOTED_STRING

An internal error was generated by the parser because the statement string ends with a quoted string. This error type is used by nuosql.

-

-52

58000

BATCH_UPDATE_ERROR

This is a general error used for batch update exceptions.

-

-53

58000

JAVA_ERROR

An error related to Java stored procedures occurred.

-

-54

58000

INVALID_FIELD

There was a server (TE) error related to an attempt to set a value in an invalid field.

-

-55

58000

INVALID_INDEX_NULL

An invalid NULL was inserted into an index.

-

-56

58000

INVALID_OPERATION

There was an error related to an invalid operation.

Maximum number of open result sets exceeded.Maximum number of open statements exceeded.

-57

58000

INVALID_STATISTICS

The index statistics for a specified query have become invalid.

-

-58

58000

INVALID_GENERATOR

In older versions of NuoDB, an invalid generator was defined. Invoke ALTER TABLE to change the column types to INT, BIGINT, NUMERIC or STRING.

-

-59

HYT00

OPERATION_TIMEOUT

Query timeout period expired before a statement object was executed.

-

-60

42S12

NO_SUCH_INDEX

An invalid index reference has occurred.

-

-61

HY101

NO_SUCH_SEQUENCE

An invalid sequence reference has occurred.

-

-62

HY102

XAER_PROTO

An error with the XA protocol has occurred.

-

-63

HYZZZ

UNKNOWN_ERROR

An unknown error code.

-

-64

40003

TRANSACTIONAL_LOCK_ERROR

An error occurred acquiring a transactional lock

-

-65

08007

PLATFORM_TRANSACTION_STATE_UNKNOWN

The transaction is in an unknown state. It is necessary to check whether the transaction has been committed. If not committed, re-commit the transaction.

-

-67

22032

INVALID_JSON_TEXT

An invalid argument was passed to a JSON string function.

-