ATG-通过atg方案发送电子邮件的问题

时间:2013-12-04 05:24:53

标签: email nullpointerexception atg

我需要在注册新用户ATG应用程序后发送电子邮件。

我已经创建了一个模板jsp并在ATG中创建了一个场景。

我还使用以下键值配置 config / atg / scenario / IndividualEmilSender.properties -

contextPathPrefix=/teststore
siteHttpServerName=localhost
siteHttpServerPort=8080

/config/atg/userprofiling/email/TemplateEmailSender.properties : -

$class=atg.userprofiling.email.TemplateEmailInfoImpl
mailingName=Your Mailing
contextPathPrefix=/teststore
messageSubject^=/atg/dynamo/service/SMTPEmail.defaultSubject
messageFrom^=/atg/dynamo/service/SMTPEmail.defaultFrom
contentProcessor=/atg/userprofiling/email/HtmlContentProcessor
fillFromTemplate=true
templateURL=/NewUserRegistered.jsp
loggingDebug=true

但是得到以下异常 -

ERROR [ScenarioManager] Error while processing individual timer message InstanceTimerMessage[17000001,/TestStore/RegistrationScenario.sdl,NewMembers,3,in 1 mins]; rolling back the transaction java.lang.NullPointerException
    at atg.scenario.action.SendEmail.createTemplateEmailInfo(SendEmail.java:193)
    at atg.scenario.action.SendEmail.execute(SendEmail.java:526)
    at atg.process.ProcessManagerService.executeAction(ProcessManagerService.java:14001)
    at atg.process.ProcessManagerService.takeIndividualTransition(ProcessManagerService.java:13408)
    at atg.process.ProcessManagerService.receiveIndividualTimerMessage(ProcessManagerService.java:12732)
    at atg.process.ProcessManagerService.receiveMessage(ProcessManagerService.java:11416)
    at atg.process.ProcessManagerService.receiveMessage(ProcessManagerService.java:11341)
    at atg.dms.patchbay.ElementManager.deliverMessage(ElementManager.java:316)
    at atg.dms.patchbay.InputPort.onMessage(InputPort.java:190)
    at atg.dms.patchbay.InputDestination.onMessage(InputDestination.java:397)
    at atg.dms.patchbay.InputDestinationConsumer.processMessageDelivery(InputDestinationConsumer.java:501)
    at atg.dms.patchbay.InputDestinationConsumer.runXATransactions(InputDestinationConsumer.java:371)
    at atg.dms.patchbay.InputDestinationConsumer.run(InputDestinationConsumer.java:245)
    at java.lang.Thread.run(Thread.java:662) 

10:34:32,527 INFO  [ScenarioManager] DEBUG [message]: message ID:170000 failed a total of 1 times so far 
10:34:32,543 ERROR [MessagingManager] An error occurred while MessageSink with nucleus name "/atg/scenario/ScenarioManager" was receiving a Message from input port "IndividualTimers": javax.jms.JMSException: CONTAINER:atg.process.ProcessException; SOURCE:java.lang.NullPointerException 
10:34:32,558 INFO [ScenarioManager] DEBUG received message on port IndividualTimers message: jms-msg:ID:170000 
10:34:32,558 INFO  [ScenarioManager] DEBUG [message]: not processing message ID:170000 after 1 failed delivery attempts

请帮忙解决这个问题! 谢谢!

1 个答案:

答案 0 :(得分:2)

您收到NullPointerException,因为DefaultEmailInfo未正确配置。

请查看Sending Targeted E-mail周围的章节以及文档中的SendMail action

您可能缺少一项或多项必需的配置更改。