Pessoal, bom dia! Estou na 2’ parte do curso loja virtual 3 e fiz o mesmo exatamente como o curso. A loja não apresenta erros ao subir o servidor e realiza a venda dos livros, porém, não envia o e-mail ao usuário e apresenta o log abaixo.
Obs: criei e configurei uma conta gmail para tal e mesmo com ssl ligado e com portas 465 ou 587
15:05:38,570 ERROR [org.jboss.as.ejb3.invocation] (Thread-9 (ActiveMQ-client-global-threads-1764101507)) WFLYEJB0034: EJB Invocation failed on component EnviaEmailCompra for method public void br.com.casadocodigo.loja.service.EnviaEmailCompra.onMessage(javax.jms.Message): javax.ejb.EJBTransactionRolledbackException: javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;
nested exception is:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
15:05:38,570 ERROR [org.jboss.as.ejb3.invocation] (Thread-9 (ActiveMQ-client-global-threads-1764101507)) WFLYEJB0034: EJB Invocation failed on component EnviaEmailCompra for method public void br.com.casadocodigo.loja.service.EnviaEmailCompra.onMessage(javax.jms.Message): javax.ejb.EJBTransactionRolledbackException: javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;
nested exception is:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;
nested exception is: