2 Replies Latest reply on Jan 2, 2013 12:57 AM by vladodias

    Error while inserting data in SQL Server.


      I am using SOA
      I am inserting data using DB adapter in MS SQL Server. Some times I get below error.

      Error Message: {http://schemas.oracle.com/bpel/extension}bindingFault
      Fault ID     rrr/xxx!1.1*soa_313bd437-7bb9-41c6-a719-d1775b9afc4b/xx/4115908-BpInv0-BpSeq1.6-4
      Fault Time     Dec 24, 2012 8:02:09 AM
      Non Recoverable System Fault :
      <bpelFault><faultType>0</faultType><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'insert' failed due to: DBWriteInteractionSpec Execute Failed Exception. insert failed. Descriptor name: [InsertIntoStagingxx.Stagingxx]. Caused by java.sql.BatchUpdateException: String or binary data would be truncated.. Please see the logs for the full DBAdapter logging output prior to this exception. This exception is considered not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCodes with value "-8152" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution. </summary></part><part name="detail"><detail>String or binary data would be truncated.</detail></part><part name="code"><code>8152</code></part></bindingFault></bpelFault>

      Please advice.

        • 1. Re: Error while inserting data in SQL Server.
          Hi Yatan,

          This should be due to data issues. And the error message is due to data truncation issues.
          Please check your payload that you are trying to insert into the SQL server table.
          One or more fields might have a data that is exceeding its defined length with respect to the table definitions.

          Problem with using SQL server is that while inserting, you will not be pointed towards which field or column is causing the error.
          You have to take the pain of searching through the entire payload to find the problem causing ones.

          • 2. Re: Error while inserting data in SQL Server.
            inserting data using DB adapter in MS SQL Server. Some times I get below error
            Some field is exceeding the maximum length defined in the database... Check the data that's being sent, you will either truncate the data before sending to DbAdapter or to increase the size of the filed in the database...