ssl - java.net.SocketException: java.security.NoSuchAlgorithmException : Error constructing implementation -
i getting exception while executing below code
public static void main( string[] args ) { system.getproperties().put("https.proxyhost","www-proxy.idc.myproxy.com"); system.getproperties().put("https.proxyport", "80"); system.setproperty( "javax.net.ssl.keystore","d:\\motorweb.p12"); // path .p12 file system.setproperty( "javax.net.ssl.keystorepassword","******"); // password of p12 file system.setproperty( "javax.net.ssl.keystoretype", "pkcs12" ); // default jks, we're using pkcs12 try { url url = new url( "https://*******************?reference=43888db2" ); // parse xml dom tree document document = documentbuilderfactory.newinstance().newdocumentbuilder().parse( url.openstream() ); // serialize out console transformerfactory.newinstance().newtransformer().transform( new domsource( document ), new streamresult( system.out ) ); } catch ( exception e ) { e.printstacktrace(); } } it working fine, don't know happen , started giving me , error below: refereed similar post.. dint got solution had not set arguments @ vm level.
java.net.socketexception: java.security.nosuchalgorithmexception: error constructing implementation (algorithm: default, provider: sunjsse, class: sun.security.ssl.sslcontextimpl$defaultsslcontext) @ javax.net.ssl.defaultsslsocketfactory.throwexception(unknown source) @ javax.net.ssl.defaultsslsocketfactory.createsocket(unknown source) @ sun.net.www.protocol.https.httpsclient.afterconnect(unknown source) @ sun.net.www.protocol.https.abstractdelegatehttpsurlconnection.connect(unknown source) i got root cause of error. while importing .p12 file giving me , error -->file invalid use following: personal information exchange. how can fix this?
Comments
Post a Comment