java - SSL certificate issue in SOAP webservice from Windows commandline -
when run java project on eclipse, able access application server thru soap web service. getting ssl certificate issue while running jar file command prompt. verified imported certificate. wondering why failing on command prompt only. needs configured? please advise.
c:\users\admin\desktop>java -jar javaapp.jar [ljava.lang.stacktraceelement;@4ec6a292 javax.net.ssl.sslhandshakeexception: sun.security.validator.validatorexception: pkix path building failed: sun.security.provider.certpath.suncertpathbuilderexception: unable find valid certification path requested target @ sun.security.ssl.alerts.getsslexception(unknown source) @ sun.security.ssl.sslsocketimpl.fatal(unknown source) @ sun.security.ssl.handshaker.fatalse(unknown source) @ sun.security.ssl.handshaker.fatalse(unknown source) @ sun.security.ssl.clienthandshaker.servercertificate(unknown source) @ sun.security.ssl.clienthandshaker.processmessage(unknown source) @ sun.security.ssl.handshaker.processloop(unknown source) @ sun.security.ssl.handshaker.process_record(unknown source) @ sun.security.ssl.sslsocketimpl.readrecord(unknown source) @ sun.security.ssl.sslsocketimpl.performinitialhandshake(unknown source ) @ sun.security.ssl.sslsocketimpl.writerecord(unknown source) @ sun.security.ssl.appoutputstream.write(unknown source) @ java.io.bufferedoutputstream.flushbuffer(unknown source) @ java.io.bufferedoutputstream.flush(unknown source) @ java.io.filteroutputstream.flush(unknown source) @ org.apache.commons.httpclient.methods.stringrequestentity.writereques t(stringrequestentity.java:150) @ org.apache.commons.httpclient.methods.entityenclosingmethod.writerequ estbody(entityenclosingmethod.java:495) @ org.apache.commons.httpclient.httpmethodbase.writerequest(httpmethodb ase.java:1973) @ org.apache.commons.httpclient.httpmethodbase.execute(httpmethodbase.j ava:993) @ org.apache.commons.httpclient.httpmethoddirector.executewithretry(htt pmethoddirector.java:397) @ org.apache.commons.httpclient.httpmethoddirector.executemethod(httpme thoddirector.java:170) @ org.apache.commons.httpclient.httpclient.executemethod(httpclient.jav a:396) @ org.apache.commons.httpclient.httpclient.executemethod(httpclient.jav a:324) @ com.thunderhead.utility.thunderheadrelease.sendhttppostrequest(thunde rheadrelease.java:280) @ com.thunderhead.utility.thunderheadrelease.main(thunderheadrelease.ja va:108) caused by: sun.security.validator.validatorexception: pkix path building failed: sun.security.provider.certpath.suncertpathbuilderexception: unable find vali d certification path requested target @ sun.security.validator.pkixvalidator.dobuild(unknown source) @ sun.security.validator.pkixvalidator.enginevalidate(unknown source) @ sun.security.validator.validator.validate(unknown source) @ sun.security.ssl.x509trustmanagerimpl.validate(unknown source) @ sun.security.ssl.x509trustmanagerimpl.checktrusted(unknown source) @ sun.security.ssl.x509trustmanagerimpl.checkservertrusted(unknown sour ce) ... 21 more caused by: sun.security.provider.certpath.suncertpathbuilderexception: unable find valid certification path requested target @ sun.security.provider.certpath.suncertpathbuilder.build(unknown sourc e) @ sun.security.provider.certpath.suncertpathbuilder.enginebuild(unknown source) @ java.security.cert.certpathbuilder.build(unknown source) ... 27 more status code : -1 status code:-1 post request failed - null
the exception means jvm not validate server certificate.
needed include root certificate of server certificate in trust store used jvm , ensure using right jvm
the default truststore located in jre/lib/security/cacerts
of jvm home. can configured -djavax.net.ssl.truststore=/path/to/trusstore
Comments
Post a Comment