We have an Adapter Batch Insert service which is failing for a value too large for column. But the exception thrown doens`t give the field name for which it is failed. So it is very tough for us to interpret for which field the exception is thrown. Is there anyway to get the exact exception.
We are using Integration Server 6.1 with SP2 and WMJDBCAdapter version 6.0.3
[ART.117.4002] Adapter Runtime (Adapter Service): Unable to invoke adapter service SLR_Services_MARC.LabelInformation.dbServices:batchInsertShipLabel. [ADA.1.316] Cannot execute the SQL statement
ORA-01401: inserted value too large for column (23000/1401) ORA-01401: inserted value too large for column " ORA-01401: inserted value too large for column
The error you see is the message returned by Oracle itself so there’s nothing you can do in the IS, or even in Oracle (AFAIK), that will cause more detail to be returned.
One solution is to create an IS document type that matches the input of your adapter service. In the document type, you can then specify the length of each field by choosing a “Contenty type” like “string” and then setting the maxLength attribute. In your service, you would then map the data to this document and call pub.schema:validate. If a field exceeds the maximum length, ‘validate’ will give you a more detailed error message. If no errors occur during validation, you can simply map your document straight into the adapter service.
In addition to the more detailed error message, one advantage of this approach is that it allows you to identify a problem without having to go all the way to the database. One drawback, however, is that if the size of a column changes in the database, you’d have to update your document.