Skip to Main Content

Cloud Platform

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Stage File Read returns error because of zero records if the file has only file header and no record

Hi,

Stage File Read returns error because of zero records if the file has only file header and no data.

I'm trying to read a base64 string from BIP Service and writing it to the Stage File as base64Binary type element. I'm reading the data from stage to process using csv format. If the CSV file has any data, stage read is working properly and If there is no data in the stage file (i.e. only the header)  it's throwing the following error while reading the data from stage(same for FTP Read).

Fault:<fault xmlns="http://www.bea.com/wli/sb/context"><errorCode>OSB-380002</errorCode><reason>oracle.soa.api.invocation.InvocationException</reason><location><node>RouteNode1</node><path>request-pipeline</path></location></fault>

If I list the files after writing it to the stage, I'm getting the following response.

<ListFilesResponse xmlns="http://xmlns.oracle.com/cloud/adapter/stagefile/ListFiles_REQUEST/types">   <ListFilesResponse xmlns="http://xmlns.oracle.com/cloud/staging/list">      <FileList>               <icsftype:ICSFile xmlns:icsftype="http://xmlns.oracle.com/cloud/ics/file/v1/types"><FileReference xmlns="http://xmlns.oracle.com/cloud/ics/file/v1/types">file:/cities/city.csv@_@WSbxnzuJH+8PcvUXGmDVA32ETaAp7XhDA9gl6JRJgqgn8jqQ3Y5vtxORZDBA/Ft5</FileReference><Properties xmlns="http://xmlns.oracle.com/cloud/ics/file/v1/types"><filetype>csv</filetype><directory>/cities</directory><filename>city.csv</filename><lastModifiedTime>1535428847000</lastModifiedTime><creationTime>0</creationTime><size>27</size><checksum>a821bea5a7a741f164826b3defe574ff</checksum></Properties></icsftype:ICSFile></FileList>   </ListFilesResponse></ListFilesResponse>

Both Stage Read In Segments and File Read are also returning the same error.

So, as a workaround I'm checking whether the file size is greater than Header size(if the CSV header size is 50bytes, then I'm checking whether the file size is greater than 50 bytes) and proceeding using switch activity.

Please let me know if there is any other direct solution in ICS to validate.

I'm using ICS version : 18.3.3.0.0 (180723.0000.1068)

Regards,

Felix

Comments
Post Details
Added on Aug 28 2018
4 comments
3,242 views