Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Handling “javax.net.ssl.SSLHandshakeException” in Java for AEM inter-server communication. | AEM Community Blog Seeding

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,157 likes

Total Posts

6,247 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,157 likes

Total Posts

6,247 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

28-01-2021

BlogImage.jpg

Handling “javax.net.ssl.SSLHandshakeException” in Java for AEM inter-server communication. by Umesh Thakur

Abstract

I was setting up one dispatcher flush agent in one of my publisher server to implement a real scenario. After entering values in all the required fields, when I click on the Test Connection on the result page it says “Replication test failed“

After looking into the stack trace I was surprised and clueless as the required certificate was present and active on my dispatcher server.
Stack trace:
Error while sending 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
After doing some google, I came to know that though you have certificate present there on your application server and not expired as well, java(JRE) installed, on which your AEM instance is running, is not recognising because those certificates were self signed.

Now the question is, how to make java to trust the certificate?
Lets find out the answer
To make your Java Runtime Environment trust the certificate, you will have to import the certificate into the JRE certificate store.
Steps to import the certificate to the JRE certificate Store:
First, you need to download the certificate in your local machine after opening the site in any browser. Path for the certificate can be different in different browser. like in Chrome you can find it in, Chrome Customise →More Tools →Developer Tool →Security Tab → View Certificate button. Then drag the certificate in somewhere in your machine.

Read Full Blog

Handling “javax.net.ssl.SSLHandshakeException” in Java for AEM inter-server communication.

Q&A

Please use this thread to ask the related questions.

AEM AEMEBlogSeeding Experience Manager