2

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!

Charles
  • 50,943
  • 13
  • 104
  • 142
Hitman
  • 61
  • 7
  • Which version of ATG are you using? – radimpe Dec 04 '13 at 09:27
  • Are you, by chance, adding any attachments to your email? – radimpe Dec 04 '13 at 13:09
  • No I am not attaching anything. – Hitman Dec 05 '13 at 06:21
  • @Buddha, please stop creating so many new tags related to [tag:atg]. The [tag:atg] tag has less than 120 questions. There is no way that any of these extremely specific tags are going to actually *help* categorize questions at this point in time. In fact, adding so many tags is going to make it *actively harder* for the small number of ATG users to actually find relevant questions. – Charles Jan 26 '14 at 05:56
  • @Charles I just thought that people would use the tags if they exist, and the tags I created are various important parts of atg. however what you said is valid that they are not useful at this time. I will be more careful in future. – Buddha Jan 26 '14 at 06:08
  • @Buddha, the main problem is that people are *really bad* at picking tags, and tags have no hierarchy. Frequently, someone will see that their specific tag exists, use it, and use no others. This is a big problem in low-activity tags, because nobody will be watching the plethora of tiny, specific tags. Questions will get lost, and people won't get the answers they need. It's always best to wait for a high degree of activity before beginning to create tags for components and concepts. – Charles Jan 26 '14 at 06:25

1 Answers1

2

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.

radimpe
  • 3,197
  • 2
  • 27
  • 46