- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我目前正在开发 Mobile First 版本 8。在创建 Java 适配器以通过以下代码调用 api 时,我收到错误“java.security.cert.CertificateException:PKIX 路径构建失败移动优先 Java 适配器错误”
@GET
@Path("/unprotected")
@Produces(MediaType.TEXT_PLAIN)
@OAuthSecurity(enabled = false)
public String unprotected() {
StringBuffer content = new StringBuffer();
try {
URL url = new URL("Some Url");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("GET");
BufferedReader in =new BufferedReader(new inputStreamReader(con.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
content.append(inputLine);
logger.info("MYFind Data" + content.toString());
in.close();
con.disconnect();
} catch (Exception e) {
logger.info("" + e.getMessage());
}
return content.toString();
}
在“C:\Users\Admin\MobileFirst-8.0.0.0\mfp-server\usr\servers\mfp\logs\messages.log”的日志文件中发现错误
E CWPKI0022E:SSL 握手失败:从目标主机发送了具有SubjectDN CN=*.openweathermap.org、OU=EssentialSSL 通配符、OU=域控制验证的签名者。可能需要将签名者添加到本地信任存储 C:/Users/Admin/MobileFirst-8.0.0.0/mfp-server/usr/servers/mfp/resources/security/key.jks(位于 SSL 配置别名 defaultSSLConfig 中)。 SSL 握手异常的扩展错误消息为:PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效证书路径
00000619 com.wether.JavaAdapterMainResource I java.security.cert.CertificateException:PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效证书路径
最佳答案
错误消息非常清楚地阐明了问题:
SSL HANDSHAKE FAILURE: A signer with SubjectDN CN=*.openweathermap.org, OU=EssentialSSL Wildcard, OU=Domain Control Validated was sent from the target host. The signer might need to be added to local trust store C:/Users/Admin/MobileFirst-8.0.0.0/mfp-server/usr/servers/mfp/resources/security/key.jks
来自端点的证书由“COMODO”签名。验证 Liberty 服务器中配置的 Java cacert 和/或 keystore 是否具有根 CA。如果没有,请添加。
关于java - 在mobilefirst中调用java适配器时如何解决此错误 "java.security.cert.CertificateException:"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54531303/
我正在尝试 LDAPS 身份验证,但我忽略了 SSL 证书。 public class BlindSSLSocketFactoryTest extends SocketFactory { pr
我尝试使用 SOAPConnection 调用 https,并且我已经指向 keystore 和信任库,如下所示: System.setProperty("javax.net.ssl.keyS
我在 2 个不同的服务器上部署了 2 个应用程序,我的 GUI 应用程序在 Tomcat 上,CAS(中央身份验证)在 Websphere 上。我已经创建了 keystore 文件并在 tomcat
我正在开发我的安卓应用。我正在尝试从我的证书文件流生成 X509Certificate 实例,但得到 CertificateException ,这是我的简单代码: import java.sec
我正在尝试创建到网站 ( https://www.otten-markenshop.de/ ) 的 SSL 连接,并使用浏览器或 curl 它可以工作,但 wget 和 Java 都无法连接。我最感兴
您好,我尝试验证另一个证书,但在读取文件中的第一个证书时出现错误: //Get Public Key BasicX509Credential publicCredential = new BasicX
我的 IntelliJ 需要很长时间才能启动。因此,当我检查启动日志时,我可以看到它们与 jetbrains 证书有关: Caused by: java.security.cert.Certifica
我正在尝试使用 Retrofit 调用此 API:https://api.wheretheiss.at/v1/satellites/25544 这是建立连接的代码: retrieveButton.se
据我所知,在大多数情况下,此异常说明证书所有者 CN(公用名)与 url 中的主机名不匹配。但是在我的情况下,它们确实匹配,但仍然会出现异常。 远程服务器证书层次结构是: 带有 CN=sms.main
这个问题已经有答案了: Resolving javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException
我正在尝试使用 java 读取 URL try{ HttpURLConnection c = (HttpURLConnection) new URL(args[0]).openConnecti
我总是收到 java.security.cert.CertificateException: No subject alternative names present 异常(exception),但是
我有一个在 WebLogic 12.2.1 中运行的 JAX-RS Web 服务。我能够使用浏览器通过 HTTP 和 HTTPS 调用该服务。由于 SSL 证书是自签名的,因此在浏览器中出现提示时我必
堆栈跟踪是: Caused by: java.security.cert.CertificateException: No subject alternative names present at s
我正在运行 kafka 2.13-2.4.1 并在用 java 编写的 kafka 客户端(消费者)和 kafka 集群(3 个节点,每个节点有一个代理)之间配置 SSL 连接。我通过Confluen
问题是当我尝试使用 Java 在 Active Directory (AD) 中创建用户时出现此异常,但当我想从现有用户获取值时则没有问题。我需要一种解决方案,使其不仅在我的计算机本地工作,而且在全局
我开始在访问 https://ws.plimus.com/ 时遇到问题与 async-http-client几天之前。我收到“一般 SSLEngine 问题”消息,在堆栈跟踪中我可以看到它是由 jav
在我们的 QC 服务器上,我们完成了以下步骤: openssl genrsa -out server.key 2048 openssl req -new -out server.csr -key se
我需要一些帮助来修复项目中的证书异常。我收到 java.security.cert.CertificateException: Certificate data canot be processed
我正在尝试将自签名证书导入受信任的证书,以便默认浏览器接受与使用它的网站的连接。 使用 https://github.com/bitfireAT/cadroid 中的代码它归结为通过 X509Trus
我是一名优秀的程序员,十分优秀!