Common Oracle Exception Handling and oracle Exception Handling
Summarizes Oracle exceptions and solutions that are often encountered during database operations.
Code |
Prompt |
Remarks General Solution |
ORA-01861 |
Text does not match the format string- |
|
ORA-00904 |
Invalid column name |
Invalid column name Check whether the column name is case sensitive or incorrect. The table to be searched does not match the column to be searched. |
ORA-00942 |
Table or view does not exist |
The table or view does not exist. Check whether the table name in SQL is correct |
ORA-01400 |
Cannot insert NULL () |
Check whether the table has a not null constraint while executing the insert operation, without providing data. Check whether the column is not empty |
ORA-00936 |
Expression missing |
Check SQL statement syntax |
ORA-00933 |
SQL command ended incorrectly |
Check SQL statement syntax |
ORA-01722 |
|
Invalid Number It may be caused by an attempt to enter the value of the string type into the numeric type. |
ORA-06530 |
Access_assist_null |
An attempt to write a value to an attribute of an uninitialized object |
ORA-06592 |
CASE_NOT_FOUND |
Case statement format error, no branch statement |
ORA-00001 |
DUP_VAL_ON_INDEX |
Duplicate database field storage, unique primary key value conflict |
ORA-01001 |
INVALID_CURSOR |
Invalid Pointer |
ORA-01722 |
INVALID_NUMBER |
Invalid Number This is caused by an attempt to enter the string type value in the numeric type. Check the SQL statement. |
ORA-01017 |
LOGIN_DENIED |
Access denied |
|
Login denied |
The case does not match the property file when the key-Value Pair information is obtained in the program. |
|
Cannot be converted to internal representation |
Pay attention to the Data Type When retrieving data from the result set. |
|
File not found |
Possible cause: the path of the db. properties file is incorrect. |
Note: commit is required after adding data; otherwise, data cannot be found after the Java program runs the query.
Generally, SQLException is caused by database operation errors, such as SQL statement errors or database table or data errors.