cancel
Showing results for 
Search instead for 
Did you mean: 

File Adapter txt Conversion Error

pranay_aitha2
Participant
0 Kudos

Hello,

I am using an Sender File Adapter Channel and have configured content conversion. I get the below error.

Conversion of file content to XML failed at position 0: java.lang.Exception: ERROR converting document line no. 1 according to structure 'Records':java.lang.Exception: Consistency error: field(s) missing - specify 'lastFieldsOptional' parameter to allow this


I tried to add the LasFieldsOptional with YES as value, then it passes through but some of the fields are skipped at the end.


Sample File Image and Content Conversion Parameters below.



Accepted Solutions (0)

Answers (2)

Answers (2)

manoj_khavatkopp
Active Contributor
0 Kudos

Hi Pranay,


I tried to add the LasFieldsOptional with YES as value, then it passes through but some of the fields are skipped at the end.

Can you please be more specific on where do you see fields are skipped , did u cross check the length mentioned in channel with the file in which you see missing fields

Regards,

Man

pranay_aitha2
Participant
0 Kudos

Hi Manoj,

Yes I cross checked the lengths with the file and it is the same. These fields are skipped at the end. for example in the Records(Top most level), the last two values are not being populated and node is also not generated.

Regards,

Pranay

maheswarareddykonda
Active Contributor
0 Kudos

hello,

in mapping level add mapwithdefault function for each field,

Note: recommended for field fixed length we have to use that function mandatory to avoid issues

pranay_aitha2
Participant
0 Kudos

Hi Maheswar,

I See this error in the Sender Communication Channel in the Adapter Logs, its not even entered the Integration Engine yet.

Would adding Mapping with Default help in this case ??

Regards,

Pranay

maheswarareddykonda
Active Contributor
0 Kudos

Ok, Try this parameter for each subnode

*.keyFieldName----Record_Type

pranay_aitha2
Participant
0 Kudos

I'm Getting the same error

maheswarareddykonda
Active Contributor
0 Kudos

i am sure you had created as *.lastFieldsOptional is YES

but still want cross check with you

incase that not works, try again with this *.missingLastFields is YES

Note:above those two parameter should not use same time...also its case-sensitive

still wont works , try to share screenshot exact what you had done. if you are sure about config then try to recreate channel and use in agreement/ICO