I have created a SSLClient and SSLServer and also created the keystore as \"server.jks\" for SSLServer and \"client.jks\" for SSLClient. fi
finally i able to solve my exception itself. Actually i was doing a silly mistakes out there that was :- In both server and client file i was using the same property as
Before it was :-
For SSLServer :-
System.setProperty("javax.net.ssl.keyStore","server.jks");
System.setProperty("javax.net.ssl.keyStorePassword", "123456");
For SSLClient :-
System.setProperty("javax.net.ssl.keyStore","client.jks");
System.setProperty("javax.net.ssl.keyStorePassword", "123456");
Now it is :-
For SSLServer :-
System.setProperty("javax.net.ssl.keyStore","server.jks");
System.setProperty("javax.net.ssl.keyStorePassword", "123456");
For SSLClient :-
System.setProperty("javax.net.ssl.trustStore","client.jks");
System.setProperty("javax.net.ssl.trustStorePassword", "123456");
I had to use javax.net.ssl.trustStore instead of i was using javax.net.ssl.keyStore in client and javax.net.ssl.trustStorePassword instead of i was using javax.net.ssl.keyStorePassword in client also. So after correcting it my exception has been removed and it started working. thanks