Error Messages
After processing a command, CSVUtil displays a response in the form of an XML message (see the Loading CSV Data via the Application Server section). When an error is detected in the processing, the XML message will contain an Error element with the details. The Error XML element indicates the table name, indicates the type of error detected, and lists the data (or row in file) that was being processed when the error occurred.
Below is the error message that Oracle Transportation Management displayed in the procedure (see the Loading CSV Data via Integration section). The TableName element indicates the table being processed, the Exception element provides the error message, and the Data element indicates the row being processed. In this case, it indicates that the JUNK table does not exist in the database.
<Error>
<TableName>JUNK</TableName>
<Exception>ORA-00942: table or view does not exist
</Exception>
<Data>"Data1","Data2","Data3"</Data>
</Error>
Import Messages
This topic describes some common error messages while importing. For each error, there is an explanation of when the message occurs and the action needed to correct the error.
Message 1
<Exception> ORA-00942: table or view does not exist
- Occurs When: Table name improperly specified (misspelled or invalid table) on the first line of the CSV file.
- Corrective Action: Verify that the table exists and that the CSV file contains the correct table name.
Message 2
<Exception> ORA-00001: unique constraint (GLOGOWNER.PK_WEIGHT_BREAK) violated
- Occurs When: Inserting data with primary keys that are already in the database.
- Corrective Action: Depending on the action desired, one
of the following can be used:
- If the data should be skipped or ignored, use the ii command to suppress the message.
- If the data is intended to be new, change the keys.
- If the data is intended to be an update, use the u or uu command.
Message 3
<Exception>ORA-02292: integrity constraint (GLOGOWNER.FK_RGCWB_WEIGHT_BREAK_GID) violated - child record found
- Occurs When: During a delete when child records in other tables depend on the key being removed.
- Corrective Action: Delete child records in associated tables before deleting from this table, or use the RC command code in CSVUtil if deleting all associated child records is your intent.
Message 4
<Error>There are supposed to be 7 columns of data, but I found 6 columns in this line: ["MYDOMAIN.LT 4500","LT 4500","MYDOMAIN.DEFAULT",4500,"LB","MYDOMAIN"]</Error>
<Error>
<TableName>WEIGHT_BREAK</TableName>
<Exception>ORA-01722: invalid number</Exception>
<Data>"MYDOMAIN.LT 4500","LT 4500","MYDOMAIN.DEFAULT",4500,"LB","MYDOMAIN"</Data>
</Error>
- Occurs When: Missing a column of data in one of the rows.
- Corrective Action: Verify that the data contains the number of fields as indicated in the ColumnList, and that the field formats (string, numeric, date, etc.) are valid.
Message 5
<Error>
<TableName>WEIGHT_BREAK</TableName>
<Exception>ORA-01722: invalid number</Exception>
<Data>"MYDOMAIN.LT 4500","LT 4500","MYDOMAIN.DEFAULT",4500,"LB","gung ho","MYDOMAIN"</Data>
</Error>
- Occurs When: Trying to insert a string in a numeric field.
- Corrective Action: Verify that the data contains the number of fields as indicated in the ColumnList, and that the field formats (string, numeric, date, etc.) are valid.
Message 6
<Error>There are supposed to be 7 columns of data, but I found 1 columns in this line: []</Error>
<Error>
<TableName>WEIGHT_BREAK</TableName>
<Exception>ORA-01400: cannot insert NULL into ("GLOGOWNER"."WEIGHT_BREAK"."WEIGHT_BREAK_GID")
</Exception>
<Data></Data>
</Error>
- Occurs When: The CSV file contains extra blank lines at the end. Oracle Transportation Management considers each line to represent a row of data, regardless of whether or not it is blank.
- Corrective Action: Remove any extra blank lines at the end of the file.
Message 7
<Error>
<TableName>WEIGHT_BREAK</TableName>
<Exception>ORA-01401: inserted value too large for column</Exception>
<Data>"MYDOMAIN.LT 4500","LT 4500","MYDOMAIN.DEFAULT",4500,"LB",4500,"MYDOMAIN12345678901234567890123456789012345678901234567890123456789012345678901234567890"</Data>
</Error>
- Occurs When: Field length for one of the columns has been exceeded.
- Corrective Action: Limit the length of the input data field value to the appropriate size.
Message 8
<Error>
<TableName>WEIGHT_BREAK</TableName>
<RowsProcssed>0</RowsProcssed>
<Data>"MYDOMAIN.LT 4500","LT 4500","MYDOMAIN.DEFAULT",4500,"LB",4500,"MYDOMAIN"</Data>
</Error>
- Occurs When: Attempted to delete data where the data does not exist in the table.
- Corrective Action: Validate that the keys being used to delete the data are correct. Could use the dd command to suppress the error message.
Export Messages
This topic describes some common error messages while exporting. For each error there is an explanation of when the message occurs and the action needed to correct the error.
Message
<CSVUtil>
<Command>xcsv</Command>
<DataDir>.\</DataDir>
<DataFileName>weight_break.csv</DataFileName>
<Write>
<TableName>WEIGHT_BREAK2</TableName>
</Write>
</CSVUtil>
Caught exception: CSVUtil.SQLException: /CSVUtil.SQLException:
(null)/java.sql.SQLException: ORA-00936: missing expression
…
- Occurs When: Attempting to export data from a table that does not exist.
- Corrective Action: Verify table exists and that the CSV file contains the correct table name.