Summarizes the Oracle exceptions and handling methods that are often encountered when working with databases.
Code |
Tips |
Note General processing methods |
ORA-01861 |
The text does not match the format string- |
|
ORA-00904 |
Invalid column name |
Invalid column name Check that the column names are case-sensitive or wrong-written The lookup table and the lookup column do not match |
ORA-00942 |
Table or view does not exist |
Table or view does not exist Check that the table names in SQL are correct |
ORA-01400 |
Cannot insert NULL into () |
Checks if the table has a NOT NULL constraint while performing an insert operation without giving the data Check whether non-null is required in the column |
ORA-00936 |
Missing an expression |
Check the syntax of the SQL statement |
ORA-00933 |
SQL command does not end correctly |
Check the syntax of the SQL statement |
ORA-01722 |
|
Invalid number It is generally possible to attempt to populate a numeric type with a value of the string type, resulting in |
ORA-06530 |
Access_into_null |
An attempt to write a value to a property of an object that is not initialized |
ORA-06592 |
Case_not_found |
Case statement is malformed, no branch statement |
ORA-00001 |
Dup_val_on_index |
Database field store duplicates, primary key unique values conflict |
ORA-01001 |
Invalid_cursor |
Invalid pointer |
ORA-01722 |
Invalid_number |
Invalid number An attempt was made to populate a numeric type with a value of type string, and to examine the SQL statement |
ORA-01017 |
Login_denied |
Access Denied |
|
Deny Login |
The case and the property file do not match when the key value is in the program. |
|
cannot be converted to an internal representation |
Note The data type when the result set takes data. |
|
The file could not be found |
Possible cause: Db.properties file path is incorrect |
Note: Be sure to commit when new data is added, otherwise the Java program cannot find the data after running the query.
The general SqlException is due to an error in manipulating the database, such as a SQL statement being written incorrectly, or an error in the table or data in the database.
Common Exception Handling for Oracle