java - iTunes 自动摄取错误 : the trustAnchors parameter must be non-empty

标签 java ssl reporting app-store-connect

我刚刚为 iTunes Connect 下载了新的自动摄取报告工具,但我得到了以下堆栈跟踪:

javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1611)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1574)
    at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1557)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1150)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1127)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:423)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:850)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
    at Autoingestion.main(Autoingestion.java:61)
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:75)
    at sun.security.validator.Validator.getInstance(Validator.java:178)
    at sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:129)
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:225)
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:270)
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:973)
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:142)
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:533)
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:471)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:904)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1116)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1143)
    ... 6 more
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200)
    at java.security.cert.PKIXParameters.<init>(PKIXParameters.java:120)
    at java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:104)
    at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:73)
    ... 17 more

我正在使用 java 1.6 并运行以下命令(已删除敏感值):

java Autoingestion me@domain.com asdf1234 XXXXXXXX Sales Daily Summary 20110901

有什么想法吗?

最佳答案

事实证明,我的 Linux 机器的 Java 分发版没有包含必要 SSL 证书的 cacerts 文件的副本。我从我的 Mac 上抓取了一个副本并将其安装在我的 Linux 服务器上,它现在运行良好。

我在这篇 SO 帖子中找到了答案:java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty on Linux, or why is the default truststore empty

关于java - iTunes 自动摄取错误 : the trustAnchors parameter must be non-empty,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7328417/

相关文章:

java - Google App Engine 的报告框架

design-patterns - 使用 db4o 报告

java - 通用方法语法 <Type>method()

java - Spring Boot Rest Security 基本身份验证密码编码器不会在登录时加密密码

java - While循环随机循环。无法弄清楚为什么。

ssl - openssl s_client-cert : Proving a client certificate was sent to the server

docker - 我从域名注册中心获得了免费的 ssl 证书并将其安装在 nginx 上。续订如何进行?

java - 提高 Lombok @Data 代码覆盖率

c# - 按需读取智能卡

java - birt 报告中的嵌套循环