Eager to Code, Enjoy to Debug ~ Embark into Each Stage with Your Heart

SSL Certificate is not imported properly – ‘unable to find valid certification path to requested target’

Posted by: Chyne on: June 5, 2009

How do you know whether the SSL certificate has been imported successfully and whether the failure of mail server is related to the problem of SSL certificate?

I guessed the following errors are obvious to tell you that the mail server is unable to find the certification path for the request:

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
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:441)
at javax.mail.Service.connect(Service.java:233)
at javax.mail.Service.connect(Service.java:134)

In order to have the further confirmation that you had obtained and imported the server’s public key successfully, you can try the following steps to troubleshoot the problem:

• You can run the ‘ps -ef | grep java’ to check whether the java process is running with the following option:-

-Djavax.net.ssl.trustStore=/path/to/keystore.

• You can view the keystore by issuing the command ‘keystore -list

To fix the problem of SSL certificate not being imported properly, you can try the following workaround:

• Run the command ‘java InstallCert hostname’ to generate a file with the SSL certificate.

Copy the ./ jssecacerts to $JAVA_HOME/jre/lib/security.

There is an interesting blog regarding with this issue that discussed about the causes and also the detailed solution of the problem. The blog also attached with the InstallCert program that enables you to download to compile and run the program to generate the certificate: http://blogs.sun.com/andreas/entry/no_more_unable_to_find

Leave a Reply

Email Subscription

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Friday’s Java Snack


In Java, "thread" means:

  • An instance of class java.lang.Thread
  • A thread of execution


An instance of Thread is just an object that has variables and methods, and lives and dies on the heap.
 
A thread of execution is an individual process that has its own call stack (one thread per call stack).

 

June 2009
M T W T F S S
« May   Jul »
1234567
891011121314
15161718192021
22232425262728
2930  

Archives


  • system_forex_: I like this website very much. This is such a outstanding web. And it is not like other money oriented website, the message here is genuinely impo
  • Faruk: its very very very fine solution perfect
  • blackhawk: Nice tip -- thanks for sharing

StatCounter

free hit counters