= 创作分享 =
编程开发
MCr的Gradle构建失败(原因疑似为Java没有对应网站证书) ...
Anti-Sa329-Fuel

MCr的Gradle构建失败(原因疑似为Java没有对应网站证书)

Anti-Sa329-Fuel 于 2024-1-23 17:21 ( 10月前 ) [复制链接] [只看楼主] [打印]
1688 4
似乎不是因为网络原因而构建失败的,而是和Java有关。我大概看了看错误报告,其中有一句PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target。网上查了说是因为Java没有对应网站的证书。还请各位大佬帮忙看一下,并帮忙给出解决办法,麻烦越详细越好!谢谢了。
错误报告:
Executing Gradle task: eclipse
Build info: MCreator 2023.2.24119, forge-1.19.4, 64-bit, 16125 MB, Windows 10, JVM 17.0.5, JAVA_HOME: D:\MCreator\jdk, started on: 2024-01-23-17:14:28

org.gradle.tooling.GradleConnectionException: Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-7.5.1-bin.zip'.
at org.gradle.tooling.internal.consumer.DistributionFactory$ZippedDistribution.getToolingImplementationClasspath(DistributionFactory.java:135)  at org.gradle.tooling.internal.consumer.loader.CachingToolingImplementationLoader.create(CachingToolingImplementationLoader.java:41)  at org.gradle.tooling.internal.consumer.loader.SynchronizedToolingImplementationLoader.create(SynchronizedToolingImplementationLoader.java:44)  at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.onStartAction(LazyConsumerActionExecutor.java:160)  at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:142)  at org.gradle.tooling.internal.consumer.connection.CancellableConsumerActionExecutor.run(CancellableConsumerActionExecutor.java:45)  at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:61)  at org.gradle.tooling.internal.consumer.connection.RethrowingErrorsConsumerActionExecutor.run(RethrowingErrorsConsumerActionExecutor.java:38)  at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:67)  at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)  at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:49)  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)  at java.base/java.lang.Thread.run(Thread.java:833) Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)  at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:371)  at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:314)  at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:309)  at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:654)  at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:473)  at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:369)  at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:396)  at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:480)  at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:458)  at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:201)  at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172)  at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1505)  at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1420)  at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:455)  at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:426)  at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:580)  at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:187)  at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2902)  at java.base/sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2811)  at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1927)  at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589)  at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224)  at org.gradle.wrapper.Download.downloadInternal(Download.java:109)  at org.gradle.wrapper.Download.download(Download.java:89)  at org.gradle.tooling.internal.consumer.DistributionInstaller$AsyncDownload$1.run(DistributionInstaller.java:182) 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 java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:439)  at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:306)  at java.base/sun.security.validator.Validator.validate(Validator.java:264)  at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:231)  at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)  at java.base/sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:638)  ... 21 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)  at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)  at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)  at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:434)  ... 26 more

TASK EXECUTION FAILED
Task completed in 1 second
发表于 2024-1-23 17:21:40 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

回复 | 举报

该帖共收到 4 条回复!
JEDIGD
https://services.gradle.org/distributions/gradle-7.5.1-bin.zip
开梯子从这个网站下载压缩包,直接丢到C:/用户/用户名/.mcreator/gradel/wrapper/dists/gradle-7.5.1-bin/随机码/

评分

参与人数 1RF +5 收起 理由
Zaobingyu + 5 给大佬递分

查看全部评分

发表于 2024-1-24 18:13:45 | 只看该作者

回复 | 举报

ㅤ
本帖最后由 NI_GAN_MA 于 2024-2-7 15:51 编辑

给你一点7根木棍教程(通用)以下是gradle:
1. gradle-4.9(1.12.2选项2,自带的1.15.2/1.16.5)
2. gradle-7.5.1(1.12.2选项1,1.14.4~1.17.1,自带的1.18.2/1.19.2)
3. gradle-8.1.1(自带的1.19.4/1.20.1)
以及其他的:
2021.1(自带1.15.2,1.16.5):win主程序 linux主程序 mac主程序 1.12.2 选项1 1.12.2 选项2
2022.3(自带1.18.2,1.19.2):win主程序 linux主程序 mac主程序  1.14.4 1.15.2 1.16.5 1.17.1
2023.3(自带1.19.4,1.20.1):win主程序 linux主程序 mac主程序 mac(aarch64)主程序 1.18.2 1.19.2
注:
1. mac不加额外注释就是x86-64的
2. 主程序,gradle要github的木棍,后面的直接点就行
3. gradle自行下载完后放到“C:\Users(用户)\(你的用户名)\.mcreator\gradle\wrapper\dists\(你的gradle版本,就是上面链接的名称+"-bin")\(一个随机的名称)”下面


发表于 2024-1-29 20:53:12 | 只看该作者

回复 | 举报

茹莱本座(已被封禁)
QQ酱414465 发表于 2024-1-24 18:13
https://services.gradle.org/distributions/gradle-7.5.1-bin.zip
开梯子从这个网站下载压缩包,直接丢到C ...

梯子下载 github搜索wujieliulan 里面有downloads仓库 下载u.exe运行即可
发表于 2024-1-30 00:19:19 | 只看该作者

回复 | 举报

魔法海洋宝石Oilk✨
QQ酱414465 发表于 2024-1-24 18:13
https://services.gradle.org/distributions/gradle-7.5.1-bin.zip
开梯子从这个网站下载压缩包,直接丢到C ...

十分感谢,看了一堆教程没好等了快1年多。您直接给我整好了!
肃清☸
发表于 2024-8-6 20:37:33 | 只看该作者

回复 | 举报

百科目前不允许匿名发帖哦~ 请先 [ 登陆 ][ 注册 ] 吧~

本版积分规则

发新帖
  • 回复
  • 点评
  • 评分

[ MC百科(mcmod.cn) 除另有声明,所有开放公共编辑的内容均使用 BY-NC-SA 3.0 协议 ]

Minecraft百科CC协议
快速回复 返回顶部 返回列表