000037863 - RSA Archer Mail Merge export fails with DocumentBuilder.InsertParagraph System.NullReferenceException in w3wp logs

Document created by RSA Customer Support Employee on Sep 12, 2019Last modified by RSA Customer Support Employee on Oct 28, 2019
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000037863
Applies ToRSA Product Set: Archer
RSA Product/Service Type: RSA Archer (On-Premise)
RSA Version/Condition: 6.4.0.2
Platform: Windows
IssueMail Merge export fails with the below popup
User-added image
Additionally, the following error can be found in the log:
 

<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
   <ApplicationData>
        <TraceData>
            <DataItem>UserId: ; 
LogReferenceId: 070119-132618-4188; 
Message: Object reference not set to an instance of an object.; 
Exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at Aspose.Words.DocumentBuilder.InsertParagraph()
   at Aspose.Words.DocumentBuilder.&#x2;(String &#x2;, Boolean &#x3;)
   at &#x5;   .&#x2;(DocumentBuilder &#x2;, String &#x3;)
   at &#x8;   .&#x2;     &#x3;()
   at &#x2;   .&#x2;()
   at &#x3;   .&#x2;     &#x2;()
   
   at &#xE;   .&#x8;(Field &#x2;)
   at &#xE;   .&#x6; (&#x5;    &#x2;)
   at &#xE;   .&#x5;(&#x5;    &#x2;)
   at &#xE;   .&#xF;(&#x5;    &#x2;)
   at &#xE;   .&#x2;(&#x3;    &#x2;)
   at &#xE;   .&#x3;(&#x5;    &#x2;)
   at &#xE;   .&#x2;(&#x3;    &#x2;)
   at &#xE;   .&#x3;(&#x5;    &#x2;)
   at &#xE;   .&#x2;(&#x3;    &#x2;)
   at &#xE;   .&#x2;(&#x8;    &#x2;, &#x8;    &#x3;)
   at &#xE;   .&#x2;(ArrayList &#x2;)
   at &#x6;   .&#x2;(ArrayList &#x2;, &#xE;    &#x3;)
   at &#x6;   .&#x6; ()
   at &#x6;   .&#x2; ()
   at &#x6;   .&#x6;     &#x2;(&#x8;    &#x2;)
   at &#xE;   .&#x2;(&#x8;    &#x2;)
   at &#xE;   .&#x2;(&#x8;    &#x2;, &#x8;    &#x3;)
   at &#xE;   .&#x2;(ArrayList &#x2;)
   at &#x6;   .&#x2;(ArrayList &#x2;, &#xE;    &#x3;)
   at &#x6;   .&#x6; ()
   at &#x6;   .&#x2; ()
   at &#x6;   .&#x6;     &#x2;(&#x8;    &#x2;)
   at &#xE;   .&#x2;(&#x8;    &#x2;)
   at &#xE;   .&#x2;(&#x8;    &#x2;, &#x8;    &#x3;)
   at &#xE;   .&#x2;(ArrayList &#x2;)
   at &#x6;   .&#x2;(ArrayList &#x2;, &#xE;    &#x3;)
   at &#x6;   .&#x6; ()
   at Aspose.Words.MailMerging.MailMerge.&#x3;(&#x2;    &#x2;)
   at ArcherTech.MailMerge.MailMergeDocument.Merge(EntityList reader)
   at ArcherTech.MailMerge.MailMergeService.PerformMailMerge(MailMergeProperties properties)
   at ArcherTech.Kernel.Brokers.PrintExportBroker.PerformMailMerge(Int32 contentId, Int32 mailMergeTemplateId, Int32 exportInfoId, User user, Boolean isAsync)</DataItem>
        </TraceData>
    </ApplicationData>
</E2ETraceEvent>
CauseMail Merge export fails when all the below conditions are true:
  1. The Mail Merge template contains a table of related records
  2. The Mail Merge template contains MergeFields to display the contents of text fields from the related records in the table.
  3. The text fields contain HTML
  4. The HTML contains a <p> tag that forces the text to span multiple rows.
  5. The Mail Merge template contains an IF statement that is in the incorrect syntax.  IF statements must follow IF THEN ELSE syntax.
Resolution
  1. On the Mail Merge template, press Alt+F9 to display all Mail Merge tag details.
  2. Locate any IF statements that do not follow the proper IF...THEN...ELSE syntax required for Mail Merge and either fix the syntax to be correct as per Microsoft Mail Merge documentation or remove the IF...THEN...ELSE statements from the template.

For situations where the syntax error in the Mail Merge template cannot be located, follow the steps below to zero in on the problematic section of the Mail Merge template.
 
  1. Remove some MergeFields from the Mail Merge template
  2. Re-upload Mail Merge template to Archer
  3. Perform an export with the new template.
  4. Repeat 1-3 until the export is successful and the MergeField field causing the failure has been identified.
  5. Use the alias from the MergeField that is causing the failure to identify the Text Area Field in the related application.
  6. Fix syntax errors, especially in regards to IF...THEN...ELSE syntax that surrounds or includes the MergeField that is causing the failure.
  7. Save the related records and export the Mail Merge template.


 

Attachments

    Outcomes