cancel
Showing results for 
Search instead for 
Did you mean: 

0 byte txt file using receiver File Adapter

Former Member
0 Kudos

HI,

My scenario is Flat File to Fixed Length File.

Mapping : Based on the condition Reciever node need to generated , In some cases it wont generate any node ( No data )

Receiver Communication channel : I used FCC for Fixed length Format.

Problem : When i am generatingf the receiver file with some data it executes. But when i am generating the file with no data , it fails in the receiver comminication channel.

Could not process due to error: java.lang.Exception: Exception in XML Parser (format problem?):'java.lang.Exception: Message processing failed in XML parser: 'Conversion configuration error: Unknown structure 'ns0:Message1' found in document', probably configuration error in file adapter (XML parser error)'

I need the receiver file to generate with 0 bytes when there is empty data.

can any one help on this.

Thanks

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

By my first, the issue seems to be with the hierarchy of the structure. Please make sure of it.

Use the option Empty file process.

When an empty is sent the receiver structure would be expecting some values. So, when there is no data it would not be able to process. So it is generating errors.

Thanks,

aashish_sinha
Active Contributor
0 Kudos

Hi,

>>Problem : When i am generatingf the receiver file with some data it executes. But when i am generating the file with no data , it fails in the receiver comminication channel.

What happens in this case is, when you send a blank file to PI it processes but once it went to Receiver Adapter, it looks out for some fields because of the FCC settings. So it throws an error/exception because some fields are expected and it is not coming. Because of that you getting below exception.

Secondly, Once you send data with few values or fields it will process in Receiver file adapter FCC and if there is some error it throws error. this is why you getting exception in moni, and other places.

Regards

Aashish Sinha

former_member191735
Active Contributor
0 Kudos

Baskar is right. Have your source and target data type elements to 0..unbounded. Make sure you have defined the recordset structures with * and all FCC parameters where you are converting content.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

In addition to empty file process option , Create your target root occurence 0 to unbounded.

shivhare
Active Contributor
0 Kudos

Hey, use empty file process option in file adapter