locked
Serialization Error in map RRS feed

  • Question

  • hi all, 

    I have an source schema in the form of xml and the destination schema is a positional flat file. There are two fields post box and street in the source schema and i have to map them to the destination fields called C/O Address and Post Address based on some conditions which are mentioned below.

    1. If postbox is not greater than one, and street doesn't contains C/O address, then PostAddress should be mapped using scripting functoid.

    2. If postbox is not greater than one, and street contains C/O address, then C/O address should be mapped using scripting functoid.

    But, here the issue comes, when street field of source schema is mapped to C/O address, it gives the error during test map as under:

    error btm1048: Native serialization error: Value cannot be null.

    Parameter name: format

    I have checked in different MSDN forums. Everyone suggested to deploy and use a send pipeline with flat file assembler. Still the same error comes. This is not occurring if i map with Post Address only. Here, both Post Address and C/O Address have 35 positions and are of type string. 

    I am unable to figure out, how to resolve this issue. Kindly help me in this.

    Friday, January 29, 2016 4:25 AM

Answers

  • hi Shanky, 

    Thank you for your response.

    We just checked that the map also contains one more sheet where this field was mapped with string contantenate which is passing empty. Thats why it is throwing that error. 

    Thanks and Regards,

    Veena

    • Proposed as answer by Shankycheil Friday, January 29, 2016 5:43 AM
    • Marked as answer by Angie Xu Thursday, February 11, 2016 9:04 AM
    Friday, January 29, 2016 5:26 AM

All replies

  • You are getting that error because in your test source one of the fields does not exist and the condition is causing this to get mapped. So for example if condition 1 is true and PostAddress does not exist in the source, you would get the error.

    You may need to add the logical existence functoids to the map to prevent this. So your condition 1 should become that

    if (postbox <= 1 AND street != C/O Address AND (PostAddress EXISTS)) then map....

    Regards.

    Friday, January 29, 2016 4:47 AM
  • Hi Veena,

    Thank you for posting on MSDN forum.

    Two question,

    Have you check if C/O address and Post address can be null in destination schema?

    Have you validate the destination Schema, Validate Instance?


    Thanks,

    If my reply is helpful please mark as Answer or vote as Helpful.

    My blog | Twitter | LinkedIn

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Friday, January 29, 2016 4:59 AM
    Moderator
  • hi Shanky, 

    Thank you for the response.

    We have mapped the source field to the destination field (C/O Address) directly without any functoids. that time also same error occurs. The field has nillable true as well.

    The test file contains only one record with the values which are required for C/O Address field.

    Friday, January 29, 2016 5:10 AM
  • It is not the mapping. Have you checked in the source (test data) file if there is a value to the field? Do the data types match ?

    Regards.

    Friday, January 29, 2016 5:14 AM
  • hi Shanky, 

    Thank you for your response.

    We just checked that the map also contains one more sheet where this field was mapped with string contantenate which is passing empty. Thats why it is throwing that error. 

    Thanks and Regards,

    Veena

    • Proposed as answer by Shankycheil Friday, January 29, 2016 5:43 AM
    • Marked as answer by Angie Xu Thursday, February 11, 2016 9:04 AM
    Friday, January 29, 2016 5:26 AM
  • hi Shanky, 

    Thank you for your response.

    We just checked that the map also contains one more sheet where this field was mapped with string contantenate which is passing empty. Thats why it is throwing that error. 

    Thanks and Regards,

    Veena

    Good to know you have solved this issue yourself. Keep posting on MSDN forum if you have any issue, we are happy to assist you.

    Thanks,

    If my reply is helpful please mark as Answer or vote as Helpful.

    My blog | Twitter | LinkedIn

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Friday, January 29, 2016 5:48 AM
    Moderator