while sending email getting following error - java 6 tomcat 6 -
javax.mail.messagingexception: exception reading response; nested exception is: javax.net.ssl.sslhandshakeexception: sun.security.validator.validatorexception: pkix path building failed: sun.security.provider.certpath.suncertpathbuilderexception: unable find valid certification path requested target
javax.mail.messagingexception can occur due many reasons. since have not posted code , virtually impossible correctly caused this.
looking @ second part of error "pkix path building failed: sun.security.provider.certpath.suncertpathbuilderexception: unable find valid certification path requested target"
now again cannot 100% certainty probable these kind of error related certificate . ie java runtime doesn’t trust certificate.
normally java verifies certificates through standard chain of trust mechanism. if chain terminates certificate java doesn’t trust, java complain in way described above.
the solution if case 1. download certificate remote smtp server 2. import certificate local truststore
detailed information these available @ below link
http://springinpractice.com/2012/04/29/fixing-pkix-path-building-issues-when-using-javamail-and-smtp
also check following links
error in javamail : pkix path building failed unable find valid certification path requested target
how ignore server cert error in javamail
how solve error: unable find valid certification path requested target error in java?
Comments
Post a Comment