Https 无法解析PKIX路径生成失败

Https 无法解析PKIX路径生成失败,https,certificate,ibm-mobilefirst,mobilefirst-adapters,Https,Certificate,Ibm Mobilefirst,Mobilefirst Adapters,我尝试使用下面的代码连接到https web服务 adapter.xml: <connectivity> <connectionPolicy xsi:type="http:HTTPConnectionPolicyType"> <protocol>https</protocol> <domain>somewhere.com</domain> <port>443

我尝试使用下面的代码连接到https web服务

adapter.xml:

<connectivity>
    <connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
        <protocol>https</protocol>
        <domain>somewhere.com</domain>
        <port>443</port>    
        <connectionTimeoutInMilliseconds>30000</connectionTimeoutInMilliseconds>
        <socketTimeoutInMilliseconds>30000</socketTimeoutInMilliseconds>
        <maxConcurrentConnectionsPerNode>50</maxConcurrentConnectionsPerNode>
    </connectionPolicy>
</connectivity>
很遗憾,当我尝试调用适配器时出现此错误:

{
   "errors": [
      "Runtime: Http request failed: 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"
   ],
   "info": [
   ],
   "isSuccessful": false,
   "warnings": [
   ]
}
我已经添加了从浏览器访问的WS的公共证书,并将其从证书详细信息中获取到程序文件C:\Program Files\Java\jdk\U version\jre\lib\security中的Java文件夹中,但是问题仍然存在


有什么建议吗?

使用MobileFirst平台时,您遵循的说明不正确。 按照Worklight 6.2中描述的步骤操作,但也适用于MFPF 6.3及更高版本

不要从浏览器导出证书,因为此操作会添加浏览器元数据和其他不应存在的构件。而是使用OpenSSL之类的工具来获取文档中描述的证书 然后,证书应该存储在应用服务器的密钥库中,而不是存储在Java的JVM中。
在程序文件中的java文件夹中?什么?嗨,伊丹,请看我的最新帖子。你在哪里读到的?这是你应该放的地方?这是参考资料。是的,伊丹,我同意。我已经从JVM中删除了cert,并将cert添加到conf文件夹中的MFP默认密钥库中。但我使用了从浏览器中提取的证书。在使用openSSL导入证书后,我会让您知道结果。Idan,它可以与这两种解决方案一起使用,但正如您所建议的,我导入使用openSSL提取的证书。谢谢我使用Firefox中的命令行导出了我的证书,然后导入并验证了它是否在我的mfp密钥库中,如中所述,但我仍然有javax.net.ssl.SSLHandshakeException异常。有什么问题吗?
{
   "errors": [
      "Runtime: Http request failed: 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"
   ],
   "info": [
   ],
   "isSuccessful": false,
   "warnings": [
   ]
}