Вопрос

I have a requirement to send an email after registration of a new user my ATG application.

I have created a template jsp and created a scenario in ATG for that.

I also configured config/atg/scenario/IndividualEmilSender.properties with below key-value-

contextPathPrefix=/teststore
siteHttpServerName=localhost
siteHttpServerPort=8080

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

$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

But getting following exception-

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

Please help to resolve this! Thanks!

Это было полезно?

Решение

You are getting a NullPointerException because your DefaultEmailInfo is not configured correctly.

Have a look at the chapter around Sending Targeted E-mail as well as the SendMail action in the documentation.

It is likely that you are missing one or more of the required configuration changes.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top