Some java. SQL. sqlexception exceptions are frequently encountered.

Source: Internet
Author: User
Tags case statement

I often encounter some exceptions in Java. SQL. sqlexception. I collected some previous documents from the Internet and listed them in the original English documents for future debugging!
ORA-00904: Invalid column name invalid column name
ORA-00942: Table or view does not exist table or view does not exist

ORA-01400: cannot insert null into () cannot insert null values

ORA-00936: expression missing

ORA-00933: SQL command ended incorrectly

ORA-01722: Invalid Number :( generally it is caused by an attempt to enter a string type value in the numeric type)

ORA-06530: access_1__null
Your program attempts to assign values to the attributes of an uninitialized (atomically null) object.
An attempt to write a value to an attribute of an uninitialized object

ORA-06592: case_not_found
None of th choice in the when clses of a case statement is selected, and there is no else clause.
Case statement format error, no branch statement

ORA-06531: collection_is_null
Your program attempts to apply collection methods othe than exist to an uninitialized (atomically null) nested table or varray, or th program attempts to assign values to the elements of an uninitialized nested table or varray.
An attempt is made to enter the set in an uninitialized nested table.

ORA-06511: cursor_already_open.
Your program attempts to open an already open cursor. A cursor must be closed before it can be reopened. A cursor for loop automatically opens the cursor to which it refers. so, your program cannot open that cursor inside the loop.
Attempt to open the opened pointer. the pointer has been opened. To open it again, you must first close it.

ORA-00001: dup_val_on_index
Your program attempts to store duplicate values in a database column that is constrained by a unique index.
Duplicate database field storage, unique primary key value conflict

ORA-01001: invalid_cursor Invalid Pointer
Your program attempts an illegal cursor operation such as closing an unopened cursor.
Invalid Pointer operation, for example, disabling unopened pointers

ORA-01722: invalid_number Invalid Number
In a SQL statement, the conversion of a character string into a number fails because the string does not represent a valid number. (In procedural statements, value_error is raised .) this exception is also raised when the limit-clause expression in
Bulk fetch statement does not evaluate to a positive number.
In an SQL statement, the character numeric type conversion error occurs, and the string cannot be converted to a valid number. This error may also occur because the fetch statement in the limit clause expression cannot correspond to a specified number.

ORA-01017: login_denied access
Your program attempts to log on to Oracle with an invalid username and/or password.
Attempt to log on to Oracle with an invalid user name or password

ORA-01403: no_data_found no data discovery
A select into statement returns no rows, or your program references a deleted element in a nested table or an uninitialized element in an index-by table. SQL Aggregate functions such as AVG and sum always return a value or a null. so,
A select into statement that Callan aggregate function never raises no_data_found. The fetch statement is expected to return No rows eventually, so when that happens, no exception is raised.

ORA-01012: not_logged_on not logged on
Your program issues a database call without being connected to Oracle.
The program sends database commands, but does not establish a connection with Oracle

ORA-06501: program_error program error
PL/SQL has an internal problem.
PL/SQL System Problems

ORA-06504: rowtype_mismatch Row Type Mismatch
The host cursor variable and PL/SQL cursor variable involved in an assignment have incompatible return types.

For example, when an open host cursor variable is passed to a stored subprogram, the return types of the actual and formal parameters must be compatible.

ORA-30625: self_is_null
Your program attempts to call a member method on a null instance. That is, the built-in parameter self (which is always the first parameter passed to a member method) is null.

ORA-06500: storage_error storage Error
PL/SQL runs out of memory or memory has been upted.
PL/SQL running memory overflow or memory conflict

ORA-06533: subscript_beyond_count clause exceeds count
Your program references a nested table or varray element using an index number larger than the number of elements in the collection.

ORA-06532: The subscript_outside_limit clause is invalid.
Your program references a nested table or varray element using an index number (-1 for example) that is outside the legal range.

ORA-01410: sys_invalid_rowid Invalid Field name
The conversion of a character string into a universal rowid fails because the character string does not represent a valid rowid.

ORA-00051: timeout_on_resource resource wait timeout
A time-out occurs while oracle is waiting for a resource.

ORA-01422: too_many_rows returns more than one row
A select into statement returns more Han one row.

Error in ORA-06502: value_error Value
An arithmetic, conversion, truncation, or size-constraint error occurs. for example, when your program selects a column value into a character variable, if the value is longer than the declared length of the variable, PL/SQL aborts the assignment
And raises value_error. In procedural statements, value_error is raised if the conversion of a character string into a number fails. (In SQL statements, invalid_number is raised .)

ORA-01476: zero_divide Division 0 Error
Your program attempts to divide a number by zero.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.