renderSubContent within Email nofifications

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

renderSubContent within Email nofifications

Robert Gan
hey guys,

can maybe anyone explain me the following behavior?

I created screens for the email nofication when the customer register in our web shop.

this works fine. But now I decided to move the ftl content to the cms module to make our live easier when we want to change information within the emails.

I call the content i.ex with: <@renderSubContent subContentId="EMAIL_NOTIFICATION_HEADER" />

when I render the site withe my browser (mapping through the controller) it works fine. But when I do a test, that a customer register, it fails. The following error message occurs:

6548353 [default-invoker-Thread-15] ERROR org.ofbiz.widget.screen.ModelScreen - Error rendering screen [component://content/widget/EmailScreens.xml#main-decorator-email]: java.lang.NullPointerException. Rolling back transaction.
6548354 [default-invoker-Thread-15] WARN org.ofbiz.entity.transaction.TransactionUtil -
---- exception report ----------------------------------------------------------
[TransactionUtil.setRollbackOnly] Calling transaction setRollbackOnly; this stack trace shows where this is happening:
Exception: java.lang.Exception
Message: Error rendering screen [component://content/widget/EmailScreens.xml#main-decorator-email]: java.lang.NullPointerException
---- stack trace ---------------------------------------------------------------
java.lang.Exception: Error rendering screen [component://content/widget/EmailScreens.xml#main-decorator-email]: java.lang.NullPointerException
org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:379)
org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:320)
org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:404)
org.ofbiz.widget.screen.ScreenFactory.renderReferencedScreen(ScreenFactory.java:216)
org.ofbiz.widget.screen.ModelScreenWidget$DecoratorScreen.renderWidgetString(ModelScreenWidget.java:580)
org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:104)
org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:191)
org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:396)
org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:135)
org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:97)
org.ofbiz.common.email.EmailServices.sendMailFromScreen(EmailServices.java:462)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:606)
org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:100)
org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:398)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:226)
org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:163)
org.ofbiz.service.job.GenericServiceJob.exec(GenericServiceJob.java:71)
org.ofbiz.service.job.JobInvoker.run(JobInvoker.java:242)
java.lang.Thread.run(Thread.java:724)
--------------------------------------------------------------------------------

6548356 [default-invoker-Thread-15] ERROR org.ofbiz.common.email.EmailServices -
---- exception report ----------------------------------------------------------
Error rendering screen for email: org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://content/widget/EmailScreens.xml#main-decorator-email]: java.lang.NullPointerException (null)
Exception: org.ofbiz.widget.screen.ScreenRenderException
Message: Error rendering screen [component://content/widget/EmailScreens.xml#main-decorator-email]: java.lang.NullPointerException (null)
---- cause ---------------------------------------------------------------------
Exception: java.lang.NullPointerException
Message: null
---- stack trace ---------------------------------------------------------------
java.lang.NullPointerException
org.ofbiz.content.webapp.ftl.RenderSubContentTransform$1.renderSubContent(RenderSubContentTransform.java:135)
org.ofbiz.content.webapp.ftl.RenderSubContentTransform$1.close(RenderSubContentTransform.java:124)
freemarker.core.Environment.visit(Environment.java:342)
freemarker.core.UnifiedCall.accept(UnifiedCall.java:130)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:221)
freemarker.core.Environment.process(Environment.java:199)
org.ofbiz.base.util.template.FreeMarkerWorker.renderTemplate(FreeMarkerWorker.java:257)
org.ofbiz.widget.screen.HtmlWidget.renderHtmlTemplate(HtmlWidget.java:225)
org.ofbiz.widget.screen.HtmlWidget$HtmlTemplate.renderWidgetString(HtmlWidget.java:270)
org.ofbiz.widget.screen.HtmlWidget.renderWidgetString(HtmlWidget.java:130)
org.ofbiz.widget.screen.ModelScreenWidget$PlatformSpecific.renderWidgetString(ModelScreenWidget.java:915)
org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:104)
org.ofbiz.widget.screen.ModelScreenWidget$Container.renderWidgetString(ModelScreenWidget.java:260)
org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:104)
org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:191)
org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:104)
org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:191)
org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:396)
org.ofbiz.widget.screen.ScreenFactory.renderReferencedScreen(ScreenFactory.java:216)
org.ofbiz.widget.screen.ModelScreenWidget$DecoratorScreen.renderWidgetString(ModelScreenWidget.java:580)
org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:104)
org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:191)
org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:396)
org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:135)
org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:97)
org.ofbiz.common.email.EmailServices.sendMailFromScreen(EmailServices.java:462)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:606)
org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:100)
org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:398)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:226)
org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:163)
org.ofbiz.service.job.GenericServiceJob.exec(GenericServiceJob.java:71)
org.ofbiz.service.job.JobInvoker.run(JobInvoker.java:242)
java.lang.Thread.run(Thread.java:724)
--------------------------------------------------------------------------------

6548357 [default-invoker-Thread-15] ERROR org.ofbiz.service.ServiceDispatcher - Error in Service [sendMailFromScreen]: CommonEmailSendRenderingScreenEmailError
6548358 [default-invoker-Thread-15] ERROR org.ofbiz.service.job.GenericServiceJob -
---- exception report ----------------------------------------------------------
Async-Service failed.
Exception: java.lang.Exception
Message: CommonEmailSendRenderingScreenEmailError
---- stack trace ---------------------------------------------------------------
java.lang.Exception: CommonEmailSendRenderingScreenEmailError
org.ofbiz.service.job.GenericServiceJob.exec(GenericServiceJob.java:77)
org.ofbiz.service.job.JobInvoker.run(JobInvoker.java:242)
java.lang.Thread.run(Thread.java:724)
--------------------------------------------------------------------------------

6548385 [default-invoker-Thread-15] INFO org.ofbiz.service.job.PersistedServiceJob - Persisted Job [43600] Failed Re-Scheduling : 1373305996051

Reply | Threaded
Open this post in threaded view
|

Re: renderSubContent within Email nofifications

Robert Gan
any idea? :)