Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java Email Issue

0b8a5936-9166-4941-85ef-03a372275bf1Dec 15 2015 — edited Dec 15 2015

We have some discrepancy in Java Mail between staging and Production Environment. We are using spring-context-support-3.2.0.RELEASE.jar

We are triggering email web services (java springMail Web services) and we were able to send emails successfully without CC address in Staging Environment.

While in Production we are getting this following error if we try to send an Email without CC Address. [Note : SAME WAR FILE WORKS PERFECTLY IN FIT]

Production Logs:

<Dec 11, 2015 8:16:19 PM EST> <Error> <HTTP> <BEA-101017> <[ServletContext@504819268[app:sfsows module:sfsows.war path:/sfsows spec-version:2.5]] Root cause of ServletException.

org.springframework.mail.MailPreparationException: Could not prepare mail; nested exception is java.lang.NullPointerException

       at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:367)

       at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:344)

       at com.sfso.ipad.service.impl.SendEmailServiceImpl.sendEmail(SendEmailServiceImpl.java:225)

       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

       Truncated. see log file for complete stacktrace

Caused By: java.lang.NullPointerException

       at javax.mail.internet.InternetAddress.parse(InternetAddress.java:609)

       at javax.mail.internet.InternetAddress.parse(InternetAddress.java:569)

       at javax.mail.internet.InternetAddress.parse(InternetAddress.java:546)

       at org.springframework.mail.javamail.MimeMessageHelper.parseAddress(MimeMessageHelper.java:706)

       at org.springframework.mail.javamail.MimeMessageHelper.setCc(MimeMessageHelper.java:637)

       Truncated. see log file for complete stacktrace

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 12 2016
Added on Dec 15 2015
1 comment
1,763 views