Quantcast

Error while using Email BC

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Error while using Email BC

Akshay
This post has NOT been accepted by the mailing list yet.
Hello,

We are trying to send very simple example of sending plain email from OpenESB using Gmail SMTP server settings. While sending email below exception occurs :
Case 1 Settings in WSDL:
 <email:SMTPaddress emailServer="smtp.gmail.com"  useSSL="false" port="587"  userName="xx" password="xx"/>
Error :
2016-04-13T22:53:18.822+0530 SEVERE [com.sun.jbi.binding.email.EmailBCExchangeHandler] (sun-email-binding-thread-5) 530 5.7.0 Must issue a STARTTLS command first. rw2sm52519561pab.30 - gsmtp

com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. rw2sm52519561pab.30 - gsmtp

        at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2108)
        at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1609)
        at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1117)
        at com.sun.jbi.binding.email.protocol.send.smtp.SMTPMessageSender.sendMail(SMTPMessageSender.java:99)
        at com.sun.jbi.binding.email.EmailBCExchangeHandler.handleExchange(EmailBCExchangeHandler.java:138)
        at com.sun.jbi.component.toolkit.lifecycle.impl.AcceptPoller.run(AcceptPoller.java:156)
        at java.lang.Thread.run(Thread.java:722)

Case 2 Settings in WSDL:
 <email:SMTPaddress emailServer="smtp.gmail.com"  useSSL="false" port="587"  userName="xx" password="xx"/>
Error :
2016-04-14T07:33:01.508+0530 SEVERE [com.sun.jbi.binding.email.EmailBCExchangeHandler] (sun-email-binding-thread-2) Could not connect to SMTP host: smtp.gmail.com, port: 587
javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 587;
  nested exception is:
        java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1961)
        at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:654)
        at javax.mail.Service.connect(Service.java:317)
        at javax.mail.Service.connect(Service.java:176)
        at javax.mail.Service.connect(Service.java:125)
        at com.sun.jbi.binding.email.protocol.send.smtp.SMTPMessageSender.sendMail(SMTPMessageSender.java:98)
        at com.sun.jbi.binding.email.EmailBCExchangeHandler.handleExchange(EmailBCExchangeHandler.java:138)
        at com.sun.jbi.component.toolkit.lifecycle.impl.AcceptPoller.run(AcceptPoller.java:156)
        at java.lang.Thread.run(Thread.java:722)
Caused by: java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
        at javax.net.ssl.DefaultSSLSocketFactory.throwException(SSLSocketFactory.java:198)
        at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:218)
        at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:346)
        at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:237)
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1927)
        ... 8 more
Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
        at java.security.Provider$Service.newInstance(Provider.java:1262)
        at sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
        at sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
        at javax.net.ssl.SSLContext.getInstance(SSLContext.java:156)
        at javax.net.ssl.SSLContext.getDefault(SSLContext.java:97)
        at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:121)
        at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:345)
        ... 10 more
Caused by: java.security.PrivilegedActionException: java.io.FileNotFoundException: E:\IntegrationSW\OpenESB-SE-3.0.5\OE-Instance\keystore.jks (The system cannot find the file specified)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.security.ssl.SSLContextImpl$DefaultSSLContext.getDefaultKeyManager(SSLContextImpl.java:571)
        at sun.security.ssl.SSLContextImpl$DefaultSSLContext.<init>(SSLContextImpl.java:486)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
        at java.lang.Class.newInstance0(Class.java:372)
        at java.lang.Class.newInstance(Class.java:325)
        at java.security.Provider$Service.newInstance(Provider.java:1238)
        ... 16 more
Caused by: java.io.FileNotFoundException: E:\IntegrationSW\OpenESB-SE-3.0.5\OE-Instance\keystore.jks (The system cannot find the file specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:138)
        at java.io.FileInputStream.<init>(FileInputStream.java:97)

Would you please let me know does anybody face this issue while sending emails ? Which settings needs to be change.

Regards,
Akshay
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Error while using Email BC

Akshay
This post has NOT been accepted by the mailing list yet.
Hello Team,

Any inputs here ?

Regards,
Akshay
Loading...