从其他应用程序调用wso2 API时显示错误“sun.security.validator.validatorexception:pkix路径生成失败”

wvt8vs2t  于 2021-06-29  发布在  Java
关注(0)|答案(0)|浏览(199)

我正在尝试调用wso2api来在wso2identity服务器中创建新用户。wso2 api如下:使用java调用服务时,出现如下错误:

curl -v -k --user admin:admin --data "{"schemas":[],"name": { "familyName":"family_name","givenName":"given_name"},"userName":"user_name","password":"pass_word", "emails":[{"primary":true,"value":"im@example.net","type":"work"},{"primary":false,"value":"im2@gmail.com","type":"home"} ] }" --header "ContentType:application/json" https://localhost:9443/wso2/scim/Users

错误消息是:
原因:javax.net.ssl.sslhandshakeexception:sun.security.validator.validatorexception:pkix路径生成失败:sun.security.provider.certpath.suncertpathbuilderexception:无法在sun.security.ssl.alerts.getsslexception(alerts)中找到请求目标的有效证书路径。java:192)在sun.security.ssl.sslsocketimpl.fatal(sslsocketimpl。java:1946)在sun.security.ssl.handshaker.fatalse(握手器。java:316)在sun.security.ssl.handshaker.fatalse(握手器。java:310)在sun.security.ssl.clienthandshaker.servercertificate(clienthandshaker。java:1640)在sun.security.ssl.clienthandshaker.processmessage(clienthandshaker。java:223)在sun.security.ssl.handshaker.processloop(握手器。java:1037)在sun.security.ssl.handshaker.process\u record(handshaker。java:965)在sun.security.ssl.sslsocketimpl.readrecord(sslsocketimpl。java:1064)在sun.security.ssl.sslsocketimpl.performitialhandshake(sslsocketimpl。java:1367)在sun.security.ssl.sslsocketimpl.starthandshake(sslsocketimpl。java:1395)在sun.security.ssl.sslsocketimpl.startAndShake(sslsocketimpl。java:1379)在org.apache.http.conn.ssl.sslconnectionsocketfactory.createlayeredsocket(sslconnectionsocketfactory)上。java:436)在org.apache.http.conn.ssl.sslconnectionsocketfactory.connectsocket(sslconnectionsocketfactory)。java:384)在org.apache.http.impl.conn.defaulthttpclientconnectionoperator.connect(defaulthttpclientconnectionoperator。java:142)在org.apache.http.impl.conn.poolighttpclientconnectionmanager.connect(poolighttpclientconnectionmanager。java:376)在org.apache.http.impl.execchain.mainclientexec.estightroute(mainclientexec。java:393)在org.apache.http.impl.execchain.mainclientexec.execute(mainclientexec。java:236)在org.apache.http.impl.execchain.protocolexec.execute(protocolexec。java:186)在org.apache.http.impl.execchain.retryexec.execute(retryexec。java:89)在org.apache.http.impl.execchain.redirectexec.execute(redirectexec。java:110)在org.apache.http.impl.client.internalhttpclient.doexecute(internalhttpclient。java:185)在org.apache.http.impl.client.closeablehttpclient.execute(closeablehttpclient。java:83)在org.apache.http.impl.client.closeablehttpclient.execute(closeablehttpclient。java:56)在org.jboss.resteasy.client.jaxrs.engines.manualclosingapachehttpclient43engine.invoke(manualclosingapachehttpclient43engine)。java:268)
我已经创建了一个keystore文件(client.keystore)并复制到src/main/resources/meta-inf/resources/文件夹中,但问题仍然存在。如果有人面临这个问题,请提出解决办法。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题