Skip to content

Error Codes

Peter G. Horvath edited this page Nov 23, 2017 · 16 revisions

Introduction

This page describes the error codes emitted by dyna4JDBC driver.

NOTE: The documentation is still in progress

Terminology

This document uses the following terms while explaining possible error codes emitted:

  • Client: the Java application, which uses dyna4JDBC to execute user scripts
  • User script: a string passed by the client to the driver for execution
  • Script Engine: an implementation of javax.script.ScriptEngine Java API, which allows the execution of User scripts
  • Process Runner: A component of dyna4JDBC driver, which allows console-oriented applications to be called via the JDBC API and their output to be processed as Java JDBC Result Sets.
  • Script executor: a Script Engine or the dyna4JDBC Process Runner component

Error codes emitted

EXECUTION_ABORTED_AT_CLIENT_REQUEST (SQLSTATE 01001)

Description:

This is a warning message indicating that the execution of the statement was aborted by the client.

Root Cause:

The client application called java.sql.Statement#cancel() while the statement was still being executed.

Corrective User Action:

No corrective action needed. If required, re-run the statement without calling java.sql.Statement#cancel()

SCRIPT_EXECUTION_EXCEPTION (SQLSTATE 07001)

Description:

The execution of the user script raised an exception during processing.

Root Cause:

The JDBC driver received an Exception from the underlying Script Executor

Corrective User Action:

Examine the stack trace of the exception to understand the cause. Ensure that there are no syntax errors in the user script the client application does not truncate or split the user script at semicolons (as normal with some interactive SQL tools, which assume semicolon to be statement separator) the underlying Script Executor is operational (all required runtime dependencies are present etc)

LOADING_SCRIPTENGINE_FAILED (SQLSTATE 07002)

Description:

The Script Engine specified in the URL cannot be loaded: the Script Engine is either not found or could not initialize properly.

Root Cause:

The system call javax.script.ScriptEngineManager#getEngineByName(String) returned null, indicating that the specified Script Engine could not be loaded.

Corrective User Action:

Check if the Script Engine name is correct. Examine application logs, standard output and standard error messages for any detailed description of the error Ensure that all the necessary Java libraries (JAR files etc.) are added to the classpath if native libraries are used by the ScriptEngine, all the necessary native libraries (.dll, .so etc.) are added to the system PATH or the library path of the host JVM if native libraries are used by the ScriptEngine, bitness (32bit/64bit), platform and system library versions (gcc etc.) of the native libraries match and are compatible with that of the host JVM, and readable by the process

INCONSISTENT_HEADER_SPECIFICATION (SQLSTATE 07003)

DUPLICATED_HEADER_NAME (SQLSTATE 07004)

FORMAT_STRING_UNEXPECTED_FOR_COLUMN_TYPE (SQLSTATE 07005)

FORMAT_STRING_INVALID (SQLSTATE 07006)

INVALID_FORMATTING_HEADER (SQLSTATE 07007)

RESULT_SET_MULTIPLE_EXPECTED_ONE (SQLSTATE 07008)

CONNECT_FAILED_EXCEPTION (SQLSTATE 08001)

INITSCRIPT_READ_IO_ERROR (SQLSTATE 08100)

Description:

The init script file defined in the connection configuration could not be read

Root Cause:

The driver attempted to read the file containing the init script to execute the initialization for the connection, however attempting to read the path specified in the configuration failed due to an I/O error.

Corrective User Action:

Ensure the init script file exists and is readable for the host JVM process or try to remove the init script reference from the connection configuration.

INITSCRIPT_EXECUTION_EXCEPTION (SQLSTATE 08101)

Description:

The execution of the init script file defined in the connection configuration failed.

Root Cause:

The driver started the execution of the init script, which in turn failed with an exception.

Corrective User Action:

ensure the init script is syntactically correct and can be executed.

REQUIRED_RESOURCE_UNAVAILABLE (SQLSTATE 08200)

Description:

The operation failed due to a required library or other resource not being available.

Root Cause:

Most likely, this error is caused by a library not properly being added to the connection definition as classpath. (Some JAR file is missing from the classpath).

Corrective User Action:

ensure all external resources required for the connection are properly added to the classpath of the connection. Use classpath setting of the connection to add all the required JAR files to the classpath of the connection . See Configuration Parameters for details.

JDBC_FEATURE_NOT_SUPPORTED (SQLSTATE 0A001)

Description:

The requested JDBC operation is not supported by the driver.

Root Cause:

The JDBC driver does not implement the feature / operation the client attempted to call or use (e.g JDBC method call, certain settings etc).

Corrective User Action:

Abstain from calling or using the operation or feature mentioned in the error message Configure the client application so that it does not invoke or attempt to use the feature (e.g. transactional connections) described in the error message. If there is no viable work-around available, please file a feature request via the dyna4JDBC issue tracker.

DATA_CONVERSION_FAILED (SQLSTATE 22001)

Description:

The attempt to retrieve the value as the specified type failed due to a conversion error.

Root Cause:

The value could not be converted to the requested type.

Corrective User Action:

Ensure that the client application calls the appropriate method for retrieving the data. (if applicable) the correct type is defined in the formatting header by the user script

NON_STANDARD_COMPLIANT_SCRIPTENGINE (SQLSTATE 39001)

Description:

The specified javax.script.ScriptEngine implementation is not standard compliant, hence the interaction attempt made by dyna4JDBC JDBC driver failed.

Root Cause:

The specified javax.script.ScriptEngine implementation does not implement certain standard features required to interact with dyna4JDBC JDBC driver.

Corrective User Action:

Use an alternative javax.script.ScriptEngine implementation, which is standard compliant.

NODE_JS_INTEGRATION_ERROR(SQLSTATE 39002)

Description:

The Node.js integration subsystem encountered an error.

Root Cause:

Either launching the node process failed or the execution of auto-generated Node.js JavaScript scripts used to provide interaction between dyna4jdbc and the external Node.js process failed (writes to process standard error are assumed to be an error).

Corrective User Action:

Examine the detailed error message for a detailed explanation of the error. Ensure Node.js is installed properly and the node executable is added to the system path (can be launched without specifying installation directory). Examine warnings emitted to the JDBC statement / connection. Upgrade to the latest version of dyna4jdbc driver

USING_STDOUT_FROM_UPDATE (SQLSTATE 42001)

Description:

The user script has written to its standard output from within an update statement.

Root Cause:

Since update statements can not return any kind of result set, update operations are not allowed to emit anything to the standard output so as to prevent potential data loss. A user script attempting to write to the standard output stream immediately raises this error

Corrective User Action:

Ensure that the user script does not emit anything to the standard output from an update call, or use methods java.sql.Statement#executeQuery(String java.sql.Statement#execute(String sql)) to retrieve script output as a Result Set.

INVALID_CONFIGURATION (SQLSTATE 56001)

Description:

The operation could not be performed due to an incorrect configuration supplied by the client.

Root Cause:

The client supplied incorrect or invalid configuration in either the connection URL or the connection properties, which cannot be properly interpreted.

Corrective User Action:

Examine the detailed error message and correct the configuration passed to the driver.

JDBC_API_USAGE_CALLER_ERROR (SQLSTATE 56002)

CANNOT_UNWARP_OBJECT (SQLSTATE 56003)

RESULT_SET_INDEX_ILLEGAL (SQLSTATE 56004)

CANCEL_REQUESTED_ALREADY (SQLSTATE 56005)

CLOSE_FAILED (SQLSTATE 57001)

OBJECT_CLOSED (SQLSTATE 57002)

CANCEL_FAILED (SQLSTATE 57003)

Description:

The client application invoked java.sql.Statement#cancel, which failed.

Root Cause:

There statement is either finished at the time cancel() is called on it, or cancel() has been invoked on the statement previously.

Corrective User Action:

Examine the error message for details. Ensure java.sql.Statement#cancel is not called multiple times. Ignore if the statement had been intended to be cancelled, but it finished in the meanwhile.

PARENT_CLOSE_TRIGGERED_FROM_CHILD_THREW_EXCEPTION (SQLSTATE 57004)

OUT_OF_MEMORY (SQLSTATE 57005)

Description:

There is not enough memory allocated to the Java process to complete the requested operation.

Root Cause:

The Java Virtual Machine reported that it cannot allocate enough memory by throwing an OutOfMemoryError.

Corrective User Action:

  1. ) If there is any, try increasing the memory limit of the Java process.

  2. ) If a scriptengine connection type is used and this error is thrown on executing a User script, try rewriting the User script so that less memory is used.

UNEXPECTED_THROWABLE (SQLSTATE 57900)

Description:

The dyna4JDBC JDBC driver received an unexpected error, which could not be translated to an appropriate JDBC error (SQLException).

Root Cause:

An ScriptEngine throwing an unexpected exception or an unexpected error condition within dyna4JDBC JDBC driver.

Corrective User Action:

  1. ) If a ScriptEngine is used for the connection, upgrade the ScriptEngine to the latest possible version.
  2. ) Upgrade to the latest version of dyna4JDBC JDBC driver. If the latest version version is used, submit a bug report ticket to dyna4JDBC issue tracker.
  3. ) Retry the failed operation.

DRIVER_BUG_UNEXPECTED_STATE (SQLSTATE 57999)

Description:

The dyna4JDBC JDBC driver encountered an unexpected internal error condition, which is likely to be caused by a bug.

Root Cause:

An unexpected error condition within dyna4JDBC JDBC driver.

Corrective User Action:

Upgrade to the latest version of the driver. If the latest version version is used, submit a bug report ticket to dyna4JDBC issue tracker.

Clone this wiki locally