Boa tarde
Estou utilizando javamail para realizar operações de envio de e-mails, meu problema é que na minha maquina local funciona, mas quando coloco a aplicação no servidor estou recebendo a seguinte exception:
tion: Can't send command to SMTP host;cat-6.0.24/logs$ javax.mail.MessagingExcep nested exception is:
uilderException: unable to find valid certification path to requested targetathB
) at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1564
) at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1551
at com.sun.mail.smtp.SMTPTransport.ehlo(SMTPTransport.java:935)
at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1562)
... 9 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:294)
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:200)
at sun.security.validator.Validator.validate(Validator.java:218)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:126)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:209)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1014)
426) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:
> at javax.mail.Service.connect(Service.java:288)
> at javax.mail.Service.connect(Service.java:169)
> at br.com.mobione.utils.mail.MailHelper.enviar(MailHelper.java:153)
:81) at br.com.mobione.utils.mail.MailHelper.enviarMailHtml(MailHelper.java
euSenha.run(EsqueceuSenha.java:87)utils.esqueceu_senha.EsqueceuSenha$EmailEsquec
> at java.lang.Thread.run(Thread.java:619)
thBuilderException: unable to find valid certification path to requested targeta
) at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174
:1611) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java
) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:187
) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:181
entHandshaker.java:1035).ssl.internal.ssl.ClientHandshaker.serverCertificate(Cli
Handshaker.java:124).net.ssl.internal.ssl.ClientHandshaker.processMessage(Client
:516) at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java
ava:454) at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.j
.java:884)at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl
SSLSocketImpl.java:1112).ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(
l.java:623)t com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImp
java:59) at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.
4) at com.sun.mail.util.TraceOutputStream.write(TraceOutputStream.java:11
65) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:
> at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
) at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1562
> ... 9 more
lid certification path to requested targetathBuilderException: unable to find va
) at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:294
ava:200) at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.j
> at sun.security.validator.Validator.validate(Validator.java:218)
tManagerImpl.java:126)et.ssl.internal.ssl.X509TrustManagerImpl.validate(X509Trus
d(X509TrustManagerImpl.java:209)ernal.ssl.X509TrustManagerImpl.checkServerTruste
d(X509TrustManagerImpl.java:249)ernal.ssl.X509TrustManagerImpl.checkServerTruste
entHandshaker.java:1014).ssl.internal.ssl.ClientHandshaker.serverCertificate(Cli
> ... 20 more
to find valid certification path to requested targetathBuilderException: unable
rtPathBuilder.java:174)ty.provider.certpath.SunCertPathBuilder.engineBuild(SunCe
> at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:238)
) at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:289
... 26 more
Algume sabe oque pode estar acontecendo, realizei uma pesquisa mas não achie muita coisa.
Obrigado.