Skip to Content
0
Former Member
Jan 29, 2016 at 12:57 PM

Issue generating mail with newly created langauge.

249 Views

Hello All,

We are trying to create new language "en_gb" for our website.( UK English). We successfully created the language but we are facing some issue post creation. We are using the "AbstractEmailContext" method for email generation.We are facing the below error when it calls "init" method in AbstractEmailContext class in line 244 , when it is calling "String fromName = emailPageModel.getFromName(new Locale(language.getIsocode()));"

Here,language.getIsocode returns "en_gb" and even we tried passing the ISOCode "en_GB" to check whether issue with the cases but still we ended up with the same error. So, can anyone here please help us with this issue.

ERROR [TaskExecutor-master-215-ProcessTask [8796847047606]] [ActionNode] Error executing java.lang.IllegalArgumentException: No matching DataLocale for en_gb ( tried [en_gb] on available locales {es_CO=es_CO->es_CO, in=in->id, pt=pt->pt, fr=fr->fr, ru=ru->ru, ja=ja->ja, zh_TW=zh_TW->zh_TW, it=it->it, ko=ko->ko, de=de->de, es=es->es, zh=zh->zh, en=en->en, hi=hi->hi, cs=cs->cs, ro=ro->ro, hu=hu->hu, en_GB=en_GB->en_GB, pl=pl->pl} ) at de.hybris.platform.servicelayer.internal.i18n.impl.DefaultLocalizationService.matchDataLocale(DefaultLocalizationService.java:242) at de.hybris.platform.servicelayer.internal.i18n.impl.DefaultLocalizationService.getDataLocale(DefaultLocalizationService.java:146) at de.hybris.platform.servicelayer.i18n.impl.DefaultI18NService.getBestMatchingLocale(DefaultI18NService.java:167) at de.hybris.platform.servicelayer.internal.converter.impl.DefaultLocaleProvider.toDataLocale(DefaultLocaleProvider.java:61) at de.hybris.platform.servicelayer.model.ItemModelContextImpl.toDataLocale(ItemModelContextImpl.java:434) at de.hybris.platform.servicelayer.model.ItemModelContextImpl.getLocalizedValue(ItemModelContextImpl.java:325) at de.hybris.platform.acceleratorservices.model.cms2.pages.EmailPageModel.getFromName(EmailPageModel.java:137) at de.hybris.platform.acceleratorservices.process.email.context.AbstractEmailContext.init(AbstractEmailContext.java:242) at com.philips.b2c.ecommerce.facades.process.email.context.OrderNotificationEmailContext.init(OrderNotificationEmailContext.java:40) at com.philips.b2c.ecommerce.facades.process.email.context.PhilipsOrderNotificationEmailContext.init(PhilipsOrderNotificationEmailContext.java:31) at com.philips.b2c.ecommerce.facades.process.email.context.OrderNotificationEmailContext.init(OrderNotificationEmailContext.java:1) at de.hybris.platform.acceleratorservices.process.email.context.impl.DefaultEmailContextFactory.create(DefaultEmailContextFactory.java:75) at de.hybris.platform.acceleratorservices.email.impl.DefaultEmailGenerationService.generate(DefaultEmailGenerationService.java:68) at de.hybris.platform.acceleratorservices.process.email.actions.GenerateEmailAction.executeAction(GenerateEmailAction.java:103) at de.hybris.platform.processengine.action.AbstractSimpleDecisionAction.execute(AbstractSimpleDecisionAction.java:53) at de.hybris.platform.processengine.definition.ActionNode.execute(ActionNode.java:166) at de.hybris.platform.processengine.process.ProcessengineTaskRunner.runProcessTask(ProcessengineTaskRunner.java:221) at de.hybris.platform.processengine.process.ProcessengineTaskRunner$1.doInTransaction(ProcessengineTaskRunner.java:168) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) at de.hybris.platform.processengine.process.ProcessengineTaskRunner.runProcessTaskInTransaction(ProcessengineTaskRunner.java:160) at de.hybris.platform.processengine.process.ProcessengineTaskRunner.doRun(ProcessengineTaskRunner.java:127) at de.hybris.platform.processengine.process.ProcessengineTaskRunner.run(ProcessengineTaskRunner.java:98) at de.hybris.platform.processengine.process.ProcessengineTaskRunner.run(ProcessengineTaskRunner.java:1) at de.hybris.platform.processengine.task.impl.ProcessengineTaskExecutionStrategy.run(ProcessengineTaskExecutionStrategy.java:33) at de.hybris.platform.task.impl.DefaultTaskService.processTask(DefaultTaskService.java:1290) at de.hybris.platform.task.impl.DefaultTaskService.process(DefaultTaskService.java:1190) at de.hybris.platform.task.impl.DefaultTaskService.processInTenant(DefaultTaskService.java:1146) at de.hybris.platform.task.impl.DefaultTaskService$5.run(DefaultTaskService.java:1057) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) ERROR [TaskExecutor-master-215-ProcessTask [8796847047606]] [ProcessengineTaskRunner] Error executing ActionNode with ID [generateOrderConfirmationEmail]: No matching DataLocale for en_gb ( tried [en_gb] on available locales {es_CO=es_CO->es_CO, in=in->id, pt=pt->pt, fr=fr->fr, ru=ru->ru, ja=ja->ja, zh_TW=zh_TW->zh_TW, it=it->it, ko=ko->ko, de=de->de, es=es->es, zh=zh->zh, en=en->en, hi=hi->hi, cs=cs->cs, ro=ro->ro, hu=hu->hu, en_GB=en_GB->en_GB, pl=pl->pl} ) de.hybris.platform.processengine.definition.NodeExecutionException: Error executing ActionNode with ID [generateOrderConfirmationEmail]: No matching DataLocale for en_gb ( tried [en_gb] on available locales {es_CO=es_CO->es_CO, in=in->id, pt=pt->pt, fr=fr->fr, ru=ru->ru, ja=ja->ja, zh_TW=zh_TW->zh_TW, it=it->it, ko=ko->ko, de=de->de, es=es->es, zh=zh->zh, en=en->en, hi=hi->hi, cs=cs->cs, ro=ro->ro, hu=hu->hu, en_GB=en_GB->en_GB, pl=pl->pl} ) at de.hybris.platform.processengine.definition.ActionNode.handleActionExecutionRuntimeException(ActionNode.java:204) at de.hybris.platform.processengine.definition.ActionNode.execute(ActionNode.java:179) at de.hybris.platform.processengine.process.ProcessengineTaskRunner.runProcessTask(ProcessengineTaskRunner.java:221) at de.hybris.platform.processengine.process.ProcessengineTaskRunner$1.doInTransaction(ProcessengineTaskRunner.java:168) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) at de.hybris.platform.processengine.process.ProcessengineTaskRunner.runProcessTaskInTransaction(ProcessengineTaskRunner.java:160) at de.hybris.platform.processengine.process.ProcessengineTaskRunner.doRun(ProcessengineTaskRunner.java:127) at de.hybris.platform.processengine.process.ProcessengineTaskRunner.run(ProcessengineTaskRunner.java:98) at de.hybris.platform.processengine.process.ProcessengineTaskRunner.run(ProcessengineTaskRunner.java:1) at de.hybris.platform.processengine.task.impl.ProcessengineTaskExecutionStrategy.run(ProcessengineTaskExecutionStrategy.java:33) at de.hybris.platform.task.impl.DefaultTaskService.processTask(DefaultTaskService.java:1290) at de.hybris.platform.task.impl.DefaultTaskService.process(DefaultTaskService.java:1190) at de.hybris.platform.task.impl.DefaultTaskService.processInTenant(DefaultTaskService.java:1146) at de.hybris.platform.task.impl.DefaultTaskService$5.run(DefaultTaskService.java:1057) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.IllegalArgumentException: No matching DataLocale for en_gb ( tried [en_gb] on available locales {es_CO=es_CO->es_CO, in=in->id, pt=pt->pt, fr=fr->fr, ru=ru->ru, ja=ja->ja, zh_TW=zh_TW->zh_TW, it=it->it, ko=ko->ko, de=de->de, es=es->es, zh=zh->zh, en=en->en, hi=hi->hi, cs=cs->cs, ro=ro->ro, hu=hu->hu, en_GB=en_GB->en_GB, pl=pl->pl} ) at de.hybris.platform.servicelayer.internal.i18n.impl.DefaultLocalizationService.matchDataLocale(DefaultLocalizationService.java:242) at de.hybris.platform.servicelayer.internal.i18n.impl.DefaultLocalizationService.getDataLocale(DefaultLocalizationService.java:146) at de.hybris.platform.servicelayer.i18n.impl.DefaultI18NService.getBestMatchingLocale(DefaultI18NService.java:167) at de.hybris.platform.servicelayer.internal.converter.impl.DefaultLocaleProvider.toDataLocale(DefaultLocaleProvider.java:61) at de.hybris.platform.servicelayer.model.ItemModelContextImpl.toDataLocale(ItemModelContextImpl.java:434) at de.hybris.platform.servicelayer.model.ItemModelContextImpl.getLocalizedValue(ItemModelContextImpl.java:325) at de.hybris.platform.acceleratorservices.model.cms2.pages.EmailPageModel.getFromName(EmailPageModel.java:137) at de.hybris.platform.acceleratorservices.process.email.context.AbstractEmailContext.init(AbstractEmailContext.java:242) at com.philips.b2c.ecommerce.facades.process.email.context.OrderNotificationEmailContext.init(OrderNotificationEmailContext.java:40) at com.philips.b2c.ecommerce.facades.process.email.context.PhilipsOrderNotificationEmailContext.init(PhilipsOrderNotificationEmailContext.java:31) at com.philips.b2c.ecommerce.facades.process.email.context.OrderNotificationEmailContext.init(OrderNotificationEmailContext.java:1) at de.hybris.platform.acceleratorservices.process.email.context.impl.DefaultEmailContextFactory.create(DefaultEmailContextFactory.java:75) at de.hybris.platform.acceleratorservices.email.impl.DefaultEmailGenerationService.generate(DefaultEmailGenerationService.java:68) at de.hybris.platform.acceleratorservices.process.email.actions.GenerateEmailAction.executeAction(GenerateEmailAction.java:103) at de.hybris.platform.processengine.action.AbstractSimpleDecisionAction.execute(AbstractSimpleDecisionAction.java:53) at de.hybris.platform.processengine.definition.ActionNode.execute(ActionNode.java:166) ... 15 more INFO [TaskExecutor-master-215-ProcessTask [8796847047606]] [ProcessengineTaskRunner] Reading task logs from D:\Code_Philips\hybris-commerce-suite-5.5.1.1\hybris\temp\hybris\bpm_process_orderConfirmationEmailProcess-14000024001-1453450536858_generateOrderConfirmationEmail_215_1453450539680.log Pinging the JVM took 2 seconds to respond. INFO [hybrisHTTP25] [SampleDataSystemSetup] InitialDataSystemSetup.getInitializationOptions() method START .......