Tush
Tush

Reputation: 11

Websphere: No recipient has been provided on the MailMessage or the 'MailHeaders.TO' header

while trying to debug an API through Postman, deployed in IBm websphere Community Edition 3.x with JDK 1.6, I am getting following error.

2017-04-26 16:14:57,779 ERROR [LoggingHandler] org.springframework.messaging.MessageHandlingException: error occurred in message handler [org.springframework.integration.mail.MailSendingMessageHandler#3]; nested exception is java.lang.IllegalStateException: No recipient has been provided on the MailMessage or the 'MailHeaders.TO' header.
    at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:139)
    at org.springframework.integration.dispatcher.BroadcastingDispatcher.invokeHandler(BroadcastingDispatcher.java:227)
    at org.springframework.integration.dispatcher.BroadcastingDispatcher.access$000(BroadcastingDispatcher.java:51)
    at org.springframework.integration.dispatcher.BroadcastingDispatcher$2.run(BroadcastingDispatcher.java:207)
    at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:55)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException: No recipient has been provided on the MailMessage or the 'MailHeaders.TO' header.
    at org.springframework.util.Assert.state(Assert.java:392)
    at org.springframework.integration.mail.MailSendingMessageHandler.applyHeadersToMailMessage(MailSendingMessageHandler.java:175)
    at org.springframework.integration.mail.MailSendingMessageHandler.convertMessageToMailMessage(MailSendingMessageHandler.java:121)
    at org.springframework.integration.mail.MailSendingMessageHandler.handleMessageInternal(MailSendingMessageHandler.java:77)
    at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:127)
    ... 7 more

API works fine with other environments but my local and Dev env.

Upvotes: 0

Views: 90

Answers (1)

Tush
Tush

Reputation: 11

One of the database was empty and after feeding related data, it got solved.

Upvotes: 0

Related Questions