Oracle8i SQLJ Developer's Guide and Reference
Release 8.1.5

A64684-01

Library

Product

Contents

Index

Prev  Chap Top Next

Runtime Messages

This section provides a list of error messages your users may encounter from the SQLJ runtime, including SQL state, cause, and action information.

See "Retrieving SQL States and Error Codes" for information about SQL states.

java.io.InvalidObjectException: invalid descriptor: descriptor value

Cause: In the loading of a profile object, it was determined that the descriptor object of one of the SQL operations was invalid. This suggests that the profile does not conform to the standard, or was read from a corrupted file.

Action: Recreate the profile by retranslating the original source file.

java.io.InvalidObjectException: invalid execute type: type value

Cause: In the loading of a profile object, it was determined that the method used to execute one of the SQL operations was invalid. This suggests that the profile does not conform to the standard, or was read from a corrupted file.

Action: Recreate the profile by retranslating the original source file.

java.io.InvalidObjectException: invalid modality: mode value

Cause: In the loading of a profile object, it was determined that the modality of one of the SQL operation parameters was invalid. This suggests that the profile does not conform to the standard, or was read from a corrupted file.

Action: Recreate the profile by retranslating the original source file.

java.io.InvalidObjectException: invalid result set type: type value

Cause: In the loading of a profile object, it was determined that the type of result produced by of one of the SQL operations was invalid. This suggests that the profile does not conform to the standard, or was read from a corrupted file.

Action: Recreate the profile by retranslating the original source file.

java.io.InvalidObjectException: invalid role: role value

Cause: In the loading of a profile object, it was determined that the contents of one of the SQL operations was invalid. This suggests that the profile does not conform to the standard, or was read from a corrupted file.

Action: Recreate the profile by retranslating the original source file.

java.io.InvalidObjectException: invalid statement type: type value

Cause: In the loading of a profile object, it was determined that the statement type of one of the SQL operations was invalid. This suggests that the profile does not conform to the standard, or was read from a corrupted file.

Action: Recreate the profile by retranslating the original source file.

java.lang.ClassNotFoundException: not a profile: profile name

Cause: The object created as the profile named profile name cannot be used as a profile. This error suggests that the file containing the profile has unknown data or has been corrupted.

Action: Recreate the profile by retranslating the original source file.

java.lang.ClassNotFoundException: unable to instantiate profile profile name

Cause: The profile named profile name exists but could not be instantiated. This suggests that the profile contains invalid data or was read from a corrupted file.

Action: Recreate the profile by retranslating the original source file.

java.lang.ClassNotFoundException: unable to instantiate serialized profile profile name

Cause: The profile named profile name exists as type sqlj.runtime.SerializedProfile, but could not be instantiated. A profile of this type usually indicates that the profile has been converted to .class format. This error suggests that the profile contains invalid data or was read from a corrupted file.

Action: Recreate the profile by retranslating the original source file. Use the ser2class option if the profiles should be created in .class format.

java.sql.SQLException: expected x columns in select list but found y

SQL State: 42122

Cause: The query executed selects x items, but has y INTO-list items or is assigned to an iterator containing y columns.

Action: Correct the program so that the number of INTO-list items or iterator columns matches the number of items selected.

java.sql.SQLException: expected instance of ForUpdate iterator at parameter x, found class class name

SQL State: 46130

Cause: A positional SQL operation contained a host expression with runtime type class name as the target of the CURRENT OF clause. The class name must be an instance of the sqlj.runtime.ForUpdate interface.

Action: Update the declaration of the iterator type passed as the target of the CURRENT OF clause. Include the ForUpdate interface in the implements clause.

java.sql.SQLException: expected statement with no OUT parameters: {statement}

SQL State: 46130

Cause: A SQL operation unexpectedly contained one or more OUT or INOUT parameters. This indicates an operation that does not conform to the SQLJ runtime standard, and may require a special customization to be executed. Alternatively, the profile may have been read from a corrupted file.

Action: Verify the original SQL operation is valid. Retranslate the source file or install a customization that supports the extended functionality.

java.sql.SQLException: expected statement with OUT parameters: {statement}

SQL State: 46130

Cause: A SQL operation contained no OUT or INOUT parameters when it was expected to have at least one. This indicates an operation that does not conform to the SQLJ runtime standard, and may require a special customization to be executed. Alternatively, the profile may have been read from a corrupted file.

Action: Verify the original SQL operation is valid. Retranslate the source file or install a customization that supports the extended functionality.

java.sql.SQLException: expected statement {statement} to be executed via executeQuery

SQL State: 46130

Cause: A SQL operation was unexpectedly requested to produce an update count instead of a result set. This indicates an operation that does not conform to the SQLJ runtime standard, and may require a special customization to be executed. Alternatively, the profile may have been read from a corrupted file.

Action: Verify the original SQL operation is valid. Retranslate the source file or install a customization that supports the extended functionality.

java.sql.SQLException: expected statement {statement} to be executed via executeUpdate

SQL State: 46130

Cause: A SQL operation was unexpectedly requested to produce a result set instead of an update count. This indicates an operation that does not conform to the SQLJ runtime standard, and may require a special customization to be executed. Alternatively, the profile may have been read from a corrupted file.

Action: Verify the original SQL operation is valid. Retranslate the source file or install a customization that supports the extended functionality.

java.sql.SQLException: expected statement {statement} to use x parameters, found y

SQL State: 46130

Cause: A SQL operation that was expected to contain y host expressions was found to contain x host expressions instead. This indicates an operation that does not conform to the SQLJ runtime standard, and may require a special customization to be executed. Alternatively, the profile may have been read from a corrupted file.

Action: Verify the original SQL operation is valid. Retranslate the source file or install a customization that supports the extended functionality.

java.sql.SQLException: found null connection context

SQL State: 08003

Cause: The connection context instance used in an executable SQL statement was null.

Action: Initialize the connection context instance to a non-null value. If the SQL statement uses an implicit connection context, it is initialized using the static setDefaultContext method of the sqlj.runtime.ref.DefaultContext class.

java.sql.SQLException: found null execution context

SQL State: 08000

Cause: The execution context instance used in an executable SQL statement was null.

Action: Initialize the execution context instance to a non-null value.

java.sql.SQLException: Invalid column name

SQL State: 46121

Cause: There was a mismatch between a column name declared in the named iterator used in this SQL operation and a column name contained in the underlying result set. Each column of a named iterator must uniquely case-insensitive match the name of a column in the underlying result set.

Action: Change either the name of the column in the named iterator, or the name of the column in the associated query, so that they match.

java.sql.SQLException: invalid iterator type: type name

SQL State: 46120

Cause: An object returned or used by this SQL operation with type type name was not a valid iterator type. This may indicate that the iterator class was produced by a non-standard translator.

Action: Verify the original SQL operation and the iterator types it uses are valid. Retranslate the source files as needed.

java.sql.SQLException: key is not defined in connect properties: key name

SQL State: 08000

Cause: The key named key name was not defined in the connection properties resource file. Information contained in the connection properties resource file is used to establish a database connection, and must include a key named key name.

Action: Add the key key name to the connection properties file with an appropriate value for the desired connection.

java.sql.SQLException: multiple rows found for select into statement

SQL State: 21000

Cause: The execution of a SELECT INTO statement produced a result that contained more than one row.

Action: Correct the SELECT INTO query or queried data so that exactly one row is selected.

java.sql.SQLException: no rows found for select into statement

SQL State: 02000

Cause: The execution of a SELECT INTO statement produced a result that contained no rows.

Action: Correct the SELECT INTO query or queried data so that exactly one row is selected.

java.sql.SQLException: null connection

SQL State: 08000

Cause: A null SQLJ connection context or JDBC connection object was passed to the constructor of a connection context class.

Action: If a JDBC connection is used, establish a database connection with the JDBC connection object before passing it to the connection context constructor. For Oracle JDBC drivers, this is done using one of the static getConnection methods of the java.sql.DriverManager class. If a connection context object is used, make sure it has been properly initialized before passing it to the constructor. If the default connection context is used, call setDefaultContext before using the default context.

java.sql.SQLException: profile profile name not found: error description

SQL State: 46130

Cause: The profile named profile name could not be found or instantiated. The problem is further explained by error description.

Action: Consult the recommended action for the problem detail given by error description.

java.sql.SQLException: unable to convert database class found type to client class expected type

SQL State: 22005

Cause: The default mapping from a database type into a Java object produced class found type when class expected type was required by the host expression. This often indicates a failed conversion to the client-side class java.math.BigDecimal. It may also indicate a failed conversion to a non-standard class that is only supported when a particular customization is installed.

Action: Verify that the database type selected has a default mapping assignable to the type of host variable or iterator column fetched into. This may require the use of a different client-side type. Verify that the customization required to support the client-side type, if any, is installed.

java.sql.SQLException: Unable to create CallableStatement for RTStatement

SQL State: 46110

Cause: Execution of this SQL operation requires the use of a JDBC CallableStatement object at runtime. However, such an object was not available from the customization used to execute the operation. This indicates that incompatible customizations may have been installed into your application, or that the operation may require the use of a special customization.

Action: Retranslate the source file or install a customization that supports the extended functionality.

java.sql.SQLException: Unable to create PreparedStatement for RTStatement

SQL State: 46110

Cause: Execution of this SQL operation requires the use of a JDBC PreparedStatement object at runtime. However, such an object was not available from the customization used to execute the operation. This indicates that incompatible customizations may have been installed into your application, or that the operation may require the use of a special customization.

Action: Retranslate the source file or install a customization that supports the extended functionality.

java.sql.SQLException: unable to load connect properties file: filename

SQL State: 08000

Cause: The connection properties file named filename could not be loaded as a resource file. It is used to establish a database connection. Since it is loaded as an application resource file, it must be packaged with the application classes. This message indicates that the file does not exist in the expected location or is not readable.

Action: Verify that the connection properties file is readable and packaged with the application classes.

java.sql.SQLException: unexpected call to method method name

SQL State: 46130

Cause: The execution of a SQL operation unexpectedly involved a call to method method name. This indicates an operation that does not conform to the SQLJ runtime standard, and may require a special customization to be executed. It may also indicate the use of a non-standard SQLJ translator.

Action: Verify the original SQL operation is valid. Retranslate the source file or install a customization that supports the extended functionality.

java.sql.SQLException: unexpected exception raised by constructor constructor name : exception description

SQL State: 46120

Cause: The construction of a runtime result or output parameter resulted in a runtime exception being thrown by the constructor.

Action: Examine the contents of exception description to determine the cause of the exception.

java.sql.SQLException: unexpected exception raised by method method name : exception description

SQL State: 46120

Cause: The conversion of a host expression to or from a database type involved in a call to method method name, which raised an exception other than a SQLException.

Action: Examine the contents of exception description to determine the cause of the exception.

sqlj.runtime.SQLNullException: cannot fetch null into primitive data type

SQL State: 22002

Cause: Attempted to store a SQL NULL into Java primitive iterator column type, result, OUT parameter, or INOUT parameter.

Action: Use a nullable Java wrapper type instead of the primitive type.




Prev

Top

Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index