Content Errors

Last updated: February 3, 2026

Below are some of the more common content errors a user may encounter, along with guidance on how to troubleshoot them.


Error(s) rendering template: messages.email.htmlTemplate: The following has evaluated
to null or missing: ==> Recipient.current_date [in template "htmlTemplate" at line 6,
column 16] ---- Tip: If the failing expression is known to be legally refer to
something that's sometimes null or missing, either specify a default value like
myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing
</#if>. (These only cover the last step of the expression; to cover the whole
expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
---- ---- FTL stack trace ("~" means nesting-related): - Failed at: 
${Recipient.current_date} [in template "htmlTemplate" at line 6, column 14] ---- 

Similarly, you may see this error message:

This XML query result can't be used as string because for that it had to contain 
exactly 1 XML node, but it contains 0 nodes. That is, the constructing XML query has 
found no matches. 

These are common FreeMarker render errors.  The parts in bold are the relevant information.  In this example, the template is referencing a recipient field called current_date.  This error indicates that there’s no value supplied for that field, which means it’s either empty or missing entirely. In the case of the former, check the recipient data and be sure to add a value for that field. In the case of the latter, make sure that the field is included in the audience query (for Accelerator-based jobs) or the body of the API call (for transactional jobs). In either case, check the referenced line number of the template to see how that field is being used.

If this error message is shown while doing a test send or a recipient preview in Accelerator, check the sample recipient data for the root causes mentioned previously.

Please see below for our FreeMarker documentation pages:


Error(s) rendering template: messages.email.htmlTemplate: Aborting message rendering 
at user request. ---- FTL stack trace ("~" means nesting-related): - Failed at: 
${Gears.doNotSend()} [in template "htmlTemplate" at line 1, column 1] ---- 

This is a render error created purposely by the ${Gears.doNotSend()} macro.  That macro could be in the template HTML or in one of the snippets used by the template.  When it’s used, it’s typically with an if/then condition that determines whether or not the job should be sent.  These are usually expected and should be ignored, but if this is being triggered in unexpected scenarios, you’ll need to look into the if/then condition and the underlying data it evaluates to determine why the message is not being sent.


This content has personalization errors.  To resolve this issue, please update your 
template, headers, or FreeMarker references. 

This is a render error that would be shown while previewing a campaign's recipient data or previewing a template with sample data.  It indicates that the provided recipient data is not completely valid for the template or campaign in question.  This is usually either an empty value in a field that requires data or a field is referenced by the campaign/template but is missing entirely from the recipient data.


Error occurred writing recipients to batch files 

Typically this means there were 0 recipients returned from the audience for a given job, but sometimes it indicates an actual job error.  In the latter case, the Accelerator log file will have more details.  Look for any mentions of XML formatting errors, database timeouts, or other network/connection errors.  If it’s a temporary connection issue, then the campaign can typically be relaunched.  If it continues to fail, that indicates there may be a problem with the XML recipient data.


Failed to launch campaign ': VALIDATION_FAILURE :: recipient must be valid 
cross-channel xml; nested exception is PreviewRenderException: : recipient must be 
valid cross-channel xml'

This error message means that either there wasn’t an email address, push address, or SMS address found in the recipient data, or the XML format itself is invalid.

In the case of the former, this can be because it doesn’t exist (no valid addresses were provided) or, more often, the column name of the email address wasn’t explicitly EmailAddress.  Using EMAILADDRESS, Email_Address, emailaddress, or any other combination will not work; it must be exactly EmailAddress.  The same holds true for push and SMS recipients; the headers for these must be exactly PushAddress and SmsAddress, respectively.

In the case of the latter (invalid XML), it will depend on the type of job.  If it’s a bulk/marketing campaign job, invalid XML can potentially be caused by underlying data issues - there could be some recipient data that contains invalid characters, too many characters, or a data format issue.  If it’s a transactional job where the full XML is supplied, this usually means there’s a formatting problem with the body of the API call, such as a missing closing tag or other typos.


Error: Error(s) rendering template: messages.push.apns.rawContent: Can't compare 
values of these types. Allowed comparisons are between two numbers, two strings, 
two dates, or two booleans. Left hand operand is a sequence+hash (wrapper: 
f.e.dom.NodeListModel). Right hand operand is a string (wrapper: f.t.SimpleScalar)

This FreeMarker error indicates that that the template or snippet code is trying to compare two values that have different data types.  For example, the code may be attempting to evaluate a text string against a number, which will cause this error.  In that scenario, you could potentially use FreeMarker's ?number function to explicitly convert a string of numbers to an actual number data type.

For more information, please see our FreeMarker documentation pages that were linked above.  There is also official FreeMarker documentation about the built-in functions that can be used to convert data types: https://freemarker.apache.org/docs/ref_builtins.html.


c.m.a.s.h.l.PreviewFirstRecipientCommand Error Launching campaign [job ID] -
[campaign name] resulted in MessagePreview request errors. Stopping job:

This means that the first recipient in the list ran into a render error.  When the first recipient render errors, the job itself fails.  Usually, if the first recipient fails to render, that points to a larger issue that often will affect all recipients.  As a failsafe to prevent attempting (and likely failing) to render a job with errors, the job itself is marked as failed.

Underneath this error should be another error message with details about the specific reason for the failure.


Document size has exceeded allowed maximum of 5242880 bytes

This means that the amount of supplemental (context) data included in the campaign is over the limit allowed by the MessageGears Cloud.  In order to launch the campaign, you'll need to reduce the amount of data returned by the supplemental data query.  This can be accomplished by limiting the result set, removing any unnecessary columns/fields, or otherwise modifying the query.