4 Replies Latest reply: Jun 30, 2014 9:01 PM by Bo Stern-Oracle RSS

    File Adapter - Error while translating. Translation exception. Error occured while translating content from file

    user13615743

      Hi All,

       

      I have a SOA composite application using a File Adapter, which picks up CSV files from a directory after polling at regular intervals. The CSV file contains employee info from HR. The composite works fine for most of the CSV files , parses CSV and does the business operation inside BPEL, but fails occassionally for some of the CSV files with the following error.

       

      Error in EM Console:

      Error while translating. Translation exception. Error occured while translating content from file /home/inbox/Identit123.csv. Please make sure that the file content conforms to the schema. Make necessary changes to the file content or the schema.

       

      All the data defined in CSV is declared as String in the xsd.

       

      SOA composite is deployed in SOA server running on Linux platform. CSV file is created in Windows platform.    When I opened the CSV in Notepad++ I found that under Encoding - Encode in UTF-8 without BOM

       

       

      The schema is built natively for the File Adapter and can be found below. I changed the encoding to UTF-8 in the schema but still the issue is not resolved. Do I need to anable UTF-8 encoding at Linux OS level?

       

      Any help to fix this parsing issue in File Adapter would be greatly appreciated.

       

      xsd

      *******

       

      <?xml version='1.0' encoding='UTF-8'?>

      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" xmlns:tns="http://TargetNamespace.com/ReadEmployeePayGlobalExtract" targetNamespace="http://TargetNamespace.com/ReadEmployeePayGlobalExtract" elementFormDefault="qualified" attributeFormDefault="unqualified" nxsd:version="NXSD" nxsd:stream="chars" nxsd:encoding="UTF-8" nxsd:hasHeader="true" nxsd:headerLines="1" nxsd:headerLinesTerminatedBy="${eol}">

         <xsd:element name="Root-Element">

            <xsd:complexType>

               <xsd:sequence>

                  <xsd:element name="EmployeeRecord" minOccurs="1" maxOccurs="unbounded">

                     <xsd:complexType>

                        <xsd:sequence>

                           <xsd:element name="USR_LAST_NAME" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_FIRST_NAME" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_MIDDLE_NAME" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_DISPLAY_NAME" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_LOGIN" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_START_DATE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_EMAIL" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_COUNTRY" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_EMP_NO" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_FAX" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_HOME_PHONE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_MOBILE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_TELEPHONE_NUMBER" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_TITLE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_PERSONID" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_PREFERREDNAME" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_POSITIONCODE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_POSITIONDESCRIPTION" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_STARTDATEINPOSITION" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_TERMINATIONDATE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_TERMINATIONREASON" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_ORGANISATIONUNIT" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_POSITIONFAMILYCOSTING" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_POSITIONFAMILYSITE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_EMPLOYINGENTITY" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_CONTRACTTYPE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_MANAGERFULLNAME" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_WORKEMAIL" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_WORKFAX" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_WWCCHECK" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_POLICECHECK" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_PREVIOUSNAME" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_GENDER" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_DATEOFBIRTH" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_MANAGEREMPCODE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_WORKMOBILE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_ORGANISATIONUNITDESC" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_WORKEMAILSHARED" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_WAPCODE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_MANAGERPOSITIONCODE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_DEPARTMENTCODEDRM" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_DEPARTMENTDESCDRM" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_PAYSCALENUMBER" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_ONEUPMGREMPCODE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_MGRWAPCODE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_ONEUPMGRWAPCODE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_PORTFOLIOCODE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_PORTFOLIODESC" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_COSTINGSTATEREGION" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_MGMTHIERARCHYLVL" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_CCCODE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_CCDESCRIPTION" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_WKLYHOURS" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_BUSINESSSECCODE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_BUSINESSSECDESC" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_HOMEADDR1" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_HOMEADDR2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_HOMEADDR3" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_HOMEADDR4" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_HOMEPOSTCODE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_HOMECOUNTRYCODE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_HOMESTATE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_EMPSTATUSCODE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_EMPSTATUSDESC" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_WORKADDRESS1" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_WORKADDRESS2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_WORKSUBURB" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_WORKSTATE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_WORKREGION" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_WORKPOSTCODE" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_WORKCOUNTRY" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_COSTINGREGION" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_UDF_WORKLOCATIONDESC" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="|" nxsd:quotedBy="&quot;"/>

                           <xsd:element name="USR_STATUS" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;"/>

                        </xsd:sequence>

                     </xsd:complexType>

                  </xsd:element>

               </xsd:sequence>

            </xsd:complexType>

         </xsd:element>

      </xsd:schema>

       

      Thanks