05-23-2012 03:21 PM
Essentially, when I make a base template for emails and I try to extend it using <@extends...>, I get the following error when Nuxeo should send email :
10:56:25,864 ERROR [runtime] on line 1, column 1 in modif extends not found. The problematic instruction: ---------- ==> user-directive extends [on line 1, column 1 in modif] ---------- Java backtrace for programmers: ---------- freemarker.core.InvalidReferenceException: on line 1, column 1 in modif extends not found. at freemarker.core.UnifiedCall.accept(UnifiedCall.java:134) at freemarker.core.Environment.visit(Environment.java:208) at freemarker.core.Environment.process(Environment.java:188) at freemarker.template.Template.process(Template.java:232) at org.nuxeo.ecm.platform.rendering.template.FreemarkerRenderingEngine.process(FreemarkerRenderingEngine.java:62) at org.nuxeo.ecm.platform.rendering.impl.RenderingServiceImpl.process(RenderingServiceImpl.java:91) at org.nuxeo.ecm.platform.ec.notification.email.EmailHelper.sendmail(EmailHelper.java:150) at org.nuxeo.ecm.platform.ec.notification.NotificationEventListener.sendNotification(NotificationEventListener.java:303) at org.nuxeo.ecm.platform.ec.notification.NotificationEventListener.sendNotificationSignalForUser(NotificationEventListener.java:226) at org.nuxeo.ecm.platform.ec.notification.NotificationEventListener.handleNotifications(NotificationEventListener.java:128) at org.nuxeo.ecm.platform.ec.notification.NotificationEventListener.handleEvent(NotificationEventListener.java:92) at org.nuxeo.ecm.core.event.impl.AsyncEventExecutor$Job.run(AsyncEventExecutor.java:159) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:679) 10:56:25,864 ERROR [NotificationEventListener] An error occurred while trying to send user notification org.nuxeo.ecm.core.api.ClientException: Failed to send notification email at org.nuxeo.ecm.platform.ec.notification.NotificationEventListener.sendNotification(NotificationEventListener.java:308) at org.nuxeo.ecm.platform.ec.notification.NotificationEventListener.sendNotificationSignalForUser(NotificationEventListener.java:226) at org.nuxeo.ecm.platform.ec.notification.NotificationEventListener.handleNotifications(NotificationEventListener.java:128) at org.nuxeo.ecm.platform.ec.notification.NotificationEventListener.handleEvent(NotificationEventListener.java:92) at org.nuxeo.ecm.core.event.impl.AsyncEventExecutor$Job.run(AsyncEventExecutor.java:159) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:679) Caused by: org.nuxeo.ecm.core.api.WrappedException: Exception: org.nuxeo.ecm.platform.rendering.RenderingException. message: Freemarker processing failed at org.nuxeo.ecm.platform.rendering.template.FreemarkerRenderingEngine.process(FreemarkerRenderingEngine.java:68) at org.nuxeo.ecm.platform.rendering.impl.RenderingServiceImpl.process(RenderingServiceImpl.java:91) at org.nuxeo.ecm.platform.ec.notification.email.EmailHelper.sendmail(EmailHelper.java:150) at org.nuxeo.ecm.platform.ec.notification.NotificationEventListener.sendNotification(NotificationEventListener.java:303) ... 7 more Caused by: org.nuxeo.ecm.core.api.WrappedException: Exception: freemarker.core.InvalidReferenceException. message: on line 1, column 1 in modif extends not found. at freemarker.core.UnifiedCall.accept(UnifiedCall.java:134) at freemarker.core.Environment.visit(Environment.java:208) at freemarker.core.Environment.process(Environment.java:188) at freemarker.template.Template.process(Template.java:232) at org.nuxeo.ecm.platform.rendering.template.FreemarkerRenderingEngine.process(FreemarkerRenderingEngine.java:62) ... 10 more
I've read that this seems to be that it can't find the file I'm referring to, which is in the same directory.
I then tried to deploy it to nxserver/nuxeo.war/skin/, which also fails with the same error.
Is it really a file location issue?
To me it sounds like a parser error, as if it didn't know what to do with the @extends directive.
05-24-2012 07:21 AM
How does your mail template look like ?
05-24-2012 01:50 PM
baseNotificationTemplate.ftl
05-24-2012 02:57 PM
I guess it's because the <@extends> directive is not available in the ftl rendering engine of the notification service. It will only work in a WebEngine ftl rendering engine.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.