You probably need to add the server certificate to your trusted Java key
store for the JVM that you're using for the STAF HTTP Java service. You
can google for more information on the "unable to
find valid certification path to requested target" error that you're
seeing (e.g.
https://blogs.oracle.com/gc/entry/unable_to_find_valid_certification).
Also, is any additional error information logged in the JVMLog file for
the HTTP service?
e.g. /usr/local/staf/data/STAF/lang/java/jvm/<JVMName>/JVMLog.1
where <JVMName> is the JVMName used when registering the HTTP service
(e.g. in the /usr/local/staf/bin/STAF.cfg file) or STAFJVM1 by default.
--------------------------------------------------------------
Sharon Lucas
IBM Austin, luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313
From: Cyril SANTUNE <cyril.sant...@gmail.com>
To: staf-users@lists.sourceforge.net
Date: 09/19/2014 11:13 AM
Subject: [staf-users] service http: https request failed
Hi,
My https request fails with the http service.
It seems to have certificate path problem.
See the following error:
C:\tmp\cli>staf local HTTP REQUEST METHOD get URL
https://www.google.com followredirect RETURNNOCONTENT
Error submitting request, RC: 4004
Additional info
---------------
Error getting target url
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
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
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown
Source)
at sun.security.ssl.ClientHandshaker.processMessage(Unknown
Source)
at sun.security.ssl.Handshaker.processLoop(Unknown Source)
at sun.security.ssl.Handshaker.process_record(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown
Source)
at sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source)
at sun.security.ssl.AppOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at
org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:828)
at
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2116)
at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at
com.ibm.staf.service.http.WebSession.requestMethod(WebSession.java:1673)
at
com.ibm.staf.service.http.HTTP.handleSessionMethod(HTTP.java:1693)
at
com.ibm.staf.service.http.HTTP.handleNonSessionMethod(HTTP.java:1407)
at com.ibm.staf.service.http.HTTP.handleMethod(HTTP.java:1375)
at com.ibm.staf.service.http.HTTP.acceptRequest(HTTP.java:222)
at
com.ibm.staf.service.STAFServiceHelper.callService(STAFServiceHelper.java:349)
Caused by: sun.security.validator.ValidatorException: PKIX path
building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
at sun.security.validator.PKIXValidator.engineValidate(Unknown
Source)
at sun.security.validator.Validator.validate(Unknown Source)
at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown
Source)
at
sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown
Source)
... 23 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target
at
sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown
Source)
at java.security.cert.CertPathBuilder.build(Unknown Source)
... 29 more
I have no problem with http resquest.
------------------------------------------------------------------------------
Slashdot TV. Video for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------
Slashdot TV. Video for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users