i have developed client web service uses secure certificate. downloaded certificate, added keystore , pointed keystore using system.setproperty("javax.net.ssl.keystore", "my\keystore\path\keystore.jks"); system.setproperty("javax.net.ssl.key.storepassword", "123123");
when package jar file , run, if works without issue.
but when package axis archive file , deploy in tomcat 7 , run via application giving following exception.
org.apache.axis2.axisfault: connection has been shutdown: javax.net.ssl.sslhandshakeexception: sun.security.validator.validatorexception: pkix path building failed: sun.security.provider.certpath.suncertpathbuilderexception: unable find valid certification path requested target @ org.apache.axis2.axisfault.makefault(axisfault.java:430) @ org.apache.axis2.transport.http.soapmessageformatter.writeto(soapmessageformatter.java:78) @ org.apache.axis2.transport.http.axisrequestentity.writerequest(axisrequestentity.java:84) @ org.apache.commons.httpclient.methods.entityenclosingmethod.writerequestbody(entityenclosingmethod.java:499) @ org.apache.commons.httpclient.httpmethodbase.writerequest(httpmethodbase.java:2114) @ org.apache.commons.httpclient.httpmethodbase.execute(httpmethodbase.java:1096) @ org.apache.commons.httpclient.httpmethoddirector.executewithretry(httpmethoddirector.java:398) @ org.apache.commons.httpclient.httpmethoddirector.executemethod(httpmethoddirector.java:171) @ org.apache.commons.httpclient.httpclient.executemethod(httpclient.java:397) @ org.apache.axis2.transport.http.abstracthttpsender.executemethod(abstracthttpsender.java:621) @ org.apache.axis2.transport.http.httpsender.sendviapost(httpsender.java:193) @ org.apache.axis2.transport.http.httpsender.send(httpsender.java:75) @ org.apache.axis2.transport.http.commonshttptransportsender.writemessagewithcommons(commonshttptransportsender.java:404) @ org.apache.axis2.transport.http.commonshttptransportsender.invoke(commonshttptransportsender.java:231) @ org.apache.axis2.engine.axisengine.send(axisengine.java:443) @ org.apache.axis2.description.outinaxisoperationclient.send(outinaxisoperation.java:406) @ org.apache.axis2.description.outinaxisoperationclient.executeimpl(outinaxisoperation.java:229) @ org.apache.axis2.client.operationclient.execute(operationclient.java:165) @ com.mobitel.mwt.flw.bankpurchaseservicestub.purchacefrommmr(bankpurchaseservicestub.java:191) @ com.mcashclient.mcashclient.sendinformationebus(mcashclient.java:106) @ com.edi.ediservice.sendtransaction(ediservice.java:21) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(unknown source) @ java.lang.reflect.method.invoke(unknown source) @ org.apache.axis2.rpc.receivers.rpcutil.invokeserviceclass(rpcutil.java:212) @ org.apache.axis2.rpc.receivers.rpcmessagereceiver.invokebusinesslogic(rpcmessagereceiver.java:117) @ org.apache.axis2.receivers.abstractinoutmessagereceiver.invokebusinesslogic(abstractinoutmessagereceiver.java:40) @ org.apache.axis2.receivers.abstractmessagereceiver.receive(abstractmessagereceiver.java:114) @ org.apache.axis2.engine.axisengine.receive(axisengine.java:181) @ org.apache.axis2.transport.http.httptransportutils.processhttppostrequest(httptransportutils.java:172) @ org.apache.axis2.transport.http.axisservlet.dopost(axisservlet.java:146) @ javax.servlet.http.httpservlet.service(httpservlet.java:647) @ javax.servlet.http.httpservlet.service(httpservlet.java:728) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:305) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:210) @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:222) @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:123) @ org.apache.catalina.authenticator.authenticatorbase.invoke(authenticatorbase.java:472) @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:171) @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:99) @ org.apache.catalina.valves.accesslogvalve.invoke(accesslogvalve.java:936) @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:118) @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:407) @ org.apache.coyote.http11.abstracthttp11processor.process(abstracthttp11processor.java:1004) @ org.apache.coyote.abstractprotocol$abstractconnectionhandler.process(abstractprotocol.java:589) @ org.apache.tomcat.util.net.jioendpoint$socketprocessor.run(jioendpoint.java:310) @ java.util.concurrent.threadpoolexecutor$worker.runtask(unknown source) @ java.util.concurrent.threadpoolexecutor$worker.run(unknown source) @ java.lang.thread.run(unknown source) caused by: com.ctc.wstx.exc.wstxioexception: connection has been shutdown: javax.net.ssl.sslhandshakeexception: sun.security.validator.validatorexception: pkix path building failed: sun.security.provider.certpath.suncertpathbuilderexception: unable find valid certification path requested target @ com.ctc.wstx.sw.basestreamwriter.finishdocument(basestreamwriter.java:1692) @ com.ctc.wstx.sw.basestreamwriter.close(basestreamwriter.java:288) @ org.apache.axiom.util.stax.wrapper.xmlstreamwriterwrapper.close(xmlstreamwriterwrapper.java:46) @ org.apache.axiom.om.impl.mtomxmlstreamwriter.close(mtomxmlstreamwriter.java:222) @ org.apache.axiom.om.impl.dom.childnode.serializeandconsume(childnode.java:425) @ org.apache.axis2.transport.http.soapmessageformatter.writeto(soapmessageformatter.java:74) ... 48 more caused by: javax.net.ssl.sslexception: connection has been shutdown: javax.net.ssl.sslhandshakeexception: sun.security.validator.validatorexception: pkix path building failed: sun.security.provider.certpath.suncertpathbuilderexception: unable find valid certification path requested target @ com.sun.net.ssl.internal.ssl.sslsocketimpl.checkeof(unknown source) @ com.sun.net.ssl.internal.ssl.sslsocketimpl.checkwrite(unknown source) @ com.sun.net.ssl.internal.ssl.appoutputstream.write(unknown source) @ java.io.bufferedoutputstream.flushbuffer(unknown source) @ java.io.bufferedoutputstream.flush(unknown source) @ org.apache.commons.httpclient.chunkedoutputstream.flush(chunkedoutputstream.java:191) @ com.ctc.wstx.io.utf8writer.flush(utf8writer.java:99) @ com.ctc.wstx.sw.bufferingxmlwriter.flush(bufferingxmlwriter.java:214) @ com.ctc.wstx.sw.bufferingxmlwriter.close(bufferingxmlwriter.java:194) @ com.ctc.wstx.sw.basestreamwriter.finishdocument(basestreamwriter.java:1690) ... 53 more caused by: javax.net.ssl.sslhandshakeexception: sun.security.validator.validatorexception: pkix path building failed: sun.security.provider.certpath.suncertpathbuilderexception: unable find valid certification path requested target @ com.sun.net.ssl.internal.ssl.alerts.getsslexception(unknown source) @ com.sun.net.ssl.internal.ssl.sslsocketimpl.fatal(unknown source) @ com.sun.net.ssl.internal.ssl.handshaker.fatalse(unknown source) @ com.sun.net.ssl.internal.ssl.handshaker.fatalse(unknown source) @ com.sun.net.ssl.internal.ssl.clienthandshaker.servercertificate(unknown source) @ com.sun.net.ssl.internal.ssl.clienthandshaker.processmessage(unknown source) @ com.sun.net.ssl.internal.ssl.handshaker.processloop(unknown source) @ com.sun.net.ssl.internal.ssl.handshaker.process_record(unknown source) @ com.sun.net.ssl.internal.ssl.sslsocketimpl.readrecord(unknown source) @ com.sun.net.ssl.internal.ssl.sslsocketimpl.performinitialhandshake(unknown source) @ com.sun.net.ssl.internal.ssl.sslsocketimpl.writerecord(unknown source) @ com.sun.net.ssl.internal.ssl.appoutputstream.write(unknown source) @ java.io.bufferedoutputstream.flushbuffer(unknown source) @ java.io.bufferedoutputstream.flush(unknown source) @ org.apache.commons.httpclient.chunkedoutputstream.flush(chunkedoutputstream.java:191) @ com.ctc.wstx.io.utf8writer.flush(utf8writer.java:99) @ com.ctc.wstx.sw.bufferingxmlwriter.flush(bufferingxmlwriter.java:214) @ com.ctc.wstx.sw.basestreamwriter.flush(basestreamwriter.java:311) @ org.apache.axiom.util.stax.wrapper.xmlstreamwriterwrapper.flush(xmlstreamwriterwrapper.java:50) @ org.apache.axiom.om.impl.mtomxmlstreamwriter.flush(mtomxmlstreamwriter.java:230) @ org.apache.axiom.om.impl.dom.childnode.serializeandconsume(childnode.java:423) ... 49 more caused by: sun.security.validator.validatorexception: pkix path building failed: sun.security.provider.certpath.suncertpathbuilderexception: unable find valid 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) @ com.sun.net.ssl.internal.ssl.x509trustmanagerimpl.validate(unknown source) @ com.sun.net.ssl.internal.ssl.x509trustmanagerimpl.checkservertrusted(unknown source) @ com.sun.net.ssl.internal.ssl.x509trustmanagerimpl.checkservertrusted(unknown source) ... 66 more caused by: sun.security.provider.certpath.suncertpathbuilderexception: unable find valid certification path requested target @ sun.security.provider.certpath.suncertpathbuilder.enginebuild(unknown source) @ java.security.cert.certpathbuilder.build(unknown source) ... 72 more
is there additional setting required point correctly keystore if deployed in axis archive file.
your kind guidance appreciated.
after creating , pointing trust store works.
system.setproperty("javax.net.ssl.truststore",truststorepath); system.setproperty("javax.net.ssl.truststorepassword",truststorepass);
but couldn't identify why not required when running jar file.
Comments
Post a Comment