cancel
Showing results for 
Search instead for 
Did you mean: 

ERROR :Conversion of file content to XML failed at position 0

former_member203631
Participant
0 Kudos

Hi Frnds,

I have a File to File scenario, while testing I am getting the following error:

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

Can any one please tell me why Iam getting this error even I have provided the following informantion in channel configuration. Here TA_830 is the record name.

TA_830.processFieldNames fromConfiguration

TA_830.fieldNames SEG_NUM,PROCESS_DATE,PAYEE_BCODE,ISSUE_SEQ_NUM,CR_DATE,PAYER_BCODE,PAYER_ID,ENTRY_SEQ_NUM,TRAN_TYPE,PAYMENT_TYPE,PROCESS_FLAG,REF_NUM,PAYER_ACC,VAL_DATE,ISO_CURRENCY,AMOUNT,RESV_11,SEG_NUM,EXCHG_RATE,ADDR1,ADDR2,ADDR3,ADDR4,RESV_18,SEG_NUM,BANK_ID,BANK_CODE,ADDR1,ADDR2,ADDR3,ADDR4,RESV_5,SEG_NUM,ACCOUNT,ADDR1,ADDR2,ADDR3,ADDR4,RESV_6,SEG_NUM,MESSAGE1,MESSAGE2,MESSAGE3,MESSAGE4,RESV_6,SEG_NUM,MESSAGE1,MESSAGE2,MESSAGE3,MESSAGE4,RESV_6,SEG_NUM,PROCESS_DATE,PAYEE_BCODE,ISSUE_SEQ_NUM,CR_DATE,PAYER_BCODE,PAYER_ID,ENTRY_SEQ_NUM,TRAN_TYPE,PAYMENT_TYPE,PROCESS_FLAG,TOTAL_AMOUNT,RESV_59

TA_830.fieldFixedLengths 2,6,12,5,6,7,5,5,3,1,1,16,24,6,3,15,11,2,12,24,24,24,24,18,2,1,24,24,24,24,24,5,2,24,24,24,24,24,6,2,30,30,30,30,6,2,30,30,30,30,6,2,6,12,5,6,7,5,5,3,1,1,16,59

TA_830.fieldContentFormatting nothing

Regards,

Shiva.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

hi

you are doing the file to file scenarios

in that necessary to import the xsd file

which is in xml format because the Receiver can unserstand the

source file this xsd file is used to convert the source file in to the

target file .

please check again

i hope u problem will solved

thanks

regards

vijay

former_member1009864
Participant
0 Kudos

Use

TA_830..keepIncompleteFields=yes

Rather then

TA_830.lastFieldsOptional=yes

Thanks

Reward points if help full

Former Member
0 Kudos

Hi,

You can check with this

/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem

Regards

Seshagiri

Former Member
0 Kudos

Looks like you are using fixed length file. If you do not have the full length of the record, you should put blank spaces, otherwise you have to specify saying that last fields are optional.

The parameter lastFieldsOptional indicates that missing fields in the source CSV file are allowed.

note:reward points if solution found helpfull.....

regards

chandrakanth.k

Former Member
0 Kudos

Hi,

When you are using Field Fixed Length Files, the file should send with complete fields that are specified in FieldNames and length of the fields should be same as specified in FieldLengths.

Use TA_830.lastFieldsOptional = 'YES', so that if any fields are missing it does not through error. It will process ignoring the fields that are missed.

Thanks,

Kishore.

former_member203631
Participant
0 Kudos

Hi Kishore,

Thanks for your quick response

If I give TA_830.lastFieldsOptional = 'YES' then complete file is not getting picked only part of the file is picked into the input xml file.

Former Member
0 Kudos

Hi,

As you are using Fixed Length File...use below specified parameters:

TA_830.fieldName: Names of Fields in teh File

TA_830.fieldFixedLegths: Lenghts as per your file

TA_830.keyFieldValue: If you use any value as key

TA_830.lastFieldsOptional: YES

TA_830.endSeparator : 'nl'

This will help you out..

Thanks,

Kishore.