bluejay92
bluejay92

Reputation: 161

NetSuite Advanced PDF / HTML error: "Parse exception during template merging. Unexpected end of file reached."

I have created a complex Advanced PDF / HTML Template using freemarker. When I make no changes and attempt to save the template, the template saves with no errors. When I add a new field to the template through the UI or even simple HTML "Test" and then try to save, I get the following error:

"Parse exception during template merging. com.netledger.templates.TemplateServiceException: Parse exception during template merging. freemarker.core.ParseException: Unexpected end of file reached."

If I proceed and save anyway, the printed PDF gives the same error and displays: "The template stored was invalid". What does this error mean and how can I resolve it?

Upvotes: 0

Views: 2211

Answers (1)

ddekany
ddekany

Reputation: 31112

It means that you have some FreeMarker construct in the template that weren't closed. Like, and ${ without the matching }, or an <#if ...> without the matching </#if>.

BTW, usually the error message also tells what wasn't closed. Perhaps you are using an old FreeMarker version where error message quality was lower. You may try to copy-paste the template into http://freemarker-online.kenshoo.com/ to see what a more recent version says.

Upvotes: 3

Related Questions