吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 1685|回复: 7
收起左侧

[求助] 运行一个demo文件,报错这么多,求解

  [复制链接]
小浩、 发表于 2022-11-15 15:14
[Asm] 纯文本查看 复制代码
"C:\Program Files\Java\jdk-11.0.2\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2020.2\lib\idea_rt.jar=57414:C:\Program Files\JetBrains\IntelliJ IDEA 2020.2\bin" -Dfile.encoding=UTF-8 -classpath C:\zjsw-zlbp-demo\target\classes;C:\zjsw-zlbp-demo\lib\gov-sdk-2.0.0.20220708-jar-with-dependencies.jar;C:\zjsw-zlbp-demo\lib\plate-extracte-1.0.8-jar.jar com.example.zlbp.Demo
Exception in thread "main" java.lang.RuntimeException: create signer fails
	at com.alipay.mychain.gov.sdk.utils.RequestBuilder.getSigner(RequestBuilder.java:198)
	at com.alipay.mychain.gov.sdk.utils.RequestBuilder.generateSignedPayload(RequestBuilder.java:88)
	at com.alipay.mychain.gov.sdk.utils.RequestBuilder.generateSignedPayload(RequestBuilder.java:74)
	at com.example.zlbp.Demo.sign(Demo.java:103)
	at com.example.zlbp.Demo.packageCount(Demo.java:79)
	at com.example.zlbp.Demo.main(Demo.java:39)
Caused by: org.bouncycastle.pkcs.PKCSException: unable to read encrypted data: 1.2.840.113549.1.5.13 not available: JCE cannot authenticate the provider BC
	at org.bouncycastle.pkcs.PKCS8EncryptedPrivateKeyInfo.decryptPrivateKeyInfo(Unknown Source)
	at com.alipay.mychain.gov.crypto.utils.Pkcs8Utils.parseEncryptedPrivateKey(Pkcs8Utils.java:80)
	at com.alipay.mychain.gov.crypto.entity.gm.Sm2Impl.<init>(Sm2Impl.java:83)
	at com.alipay.mychain.gov.crypto.factory.AsymmetricFactory.createSigner(AsymmetricFactory.java:58)
	at com.alipay.mychain.gov.sdk.utils.RequestBuilder.getSigner(RequestBuilder.java:186)
	... 5 more
Caused by: org.bouncycastle.operator.OperatorCreationException: 1.2.840.113549.1.5.13 not available: JCE cannot authenticate the provider BC
	at org.bouncycastle.openssl.jcajce.JceOpenSSLPKCS8DecryptorProviderBuilder$1.get(Unknown Source)
	... 10 more
Caused by: java.security.NoSuchProviderException: JCE cannot authenticate the provider BC
	at java.base/javax.crypto.JceSecurity.getInstance(JceSecurity.java:132)
	at java.base/javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:212)
	at org.bouncycastle.jcajce.util.NamedJcaJceHelper.createSecretKeyFactory(Unknown Source)
	at org.bouncycastle.openssl.jcajce.PEMUtilities.generateSecretKeyForPKCS5Scheme2(Unknown Source)
	... 11 more
Caused by: java.util.jar.JarException: file:/C:/zjsw-zlbp-demo/lib/plate-extracte-1.0.8-jar.jar has unsigned entries - cesi/ofd/AbsTempManager.class
	at java.base/javax.crypto.JarVerifier.verifySingleJar(JarVerifier.java:459)
	at java.base/javax.crypto.JarVerifier.verifyJars(JarVerifier.java:314)
	at java.base/javax.crypto.JarVerifier.verify(JarVerifier.java:257)
	at java.base/javax.crypto.ProviderVerifier.verify(ProviderVerifier.java:129)
	at java.base/javax.crypto.JceSecurity.verifyProvider(JceSecurity.java:191)
	at java.base/javax.crypto.JceSecurity.getVerificationResult(JceSecurity.java:217)
	at java.base/javax.crypto.JceSecurity.getInstance(JceSecurity.java:129)
	... 14 more

Process finished with exit code 1



https://www.52pojie.cn/thread-1713192-1-1.html 源文件在这里https://www.aliyundrive.com/s/YAqCLiwKcL9 阿里云

报错这么多

免费评分

参与人数 1吾爱币 +1 热心值 +1 收起 理由
T121581 + 1 + 1 遇到相同问题,求帮助

查看全部评分

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

zhuoxin99 发表于 2022-11-15 15:31
请求参数..都没有啊
xingkongyongye 发表于 2022-11-15 15:32
emmmm,这种情况我也遇到过,脑仁疼,蹲个解决办法
cq5868177 发表于 2022-11-15 15:54
三木猿 发表于 2022-11-15 16:06
百度+debug总是能解决你的问题
huaxincanmeng 发表于 2022-11-15 17:48
有可能JDK版本不一致
六天° 发表于 2022-11-18 09:53

plate-extracte-1.0.8-jar.jar这个jar包里面的bouncycastle有问题
IDEA里在project structure里面用modules的形式导入这个jar包没有问题
但是用maven导入就会报你这个错
使用maven导入的话要多导一个bouncycastle,而且位置要在plate-extracte前面

<dependency>
    <groupId>org.bouncycastle</groupId>
    <artifactId>bcpkix-jdk15on</artifactId>
    <version>1.60</version>
</dependency>
<dependency>
    <groupId>com.alipay.mychain</groupId>
    <artifactId>gov-sdk</artifactId>
    <version>2.0.0.20220708</version>
    <scope>system</scope>
    <systemPath>${basedir}/lib/gov-sdk-2.0.0.20220708-jar-with-dependencies.jar</systemPath>
</dependency>
<dependency>
    <groupId>com</groupId>
    <artifactId>plate-extracte</artifactId>
    <version>1.0.8</version>
    <scope>system</scope>
    <systemPath>${project.basedir}/lib/plate-extracte-1.0.8-jar.jar</systemPath>
</dependency>

免费评分

参与人数 1吾爱币 +1 收起 理由
小浩、 + 1 感谢回复,已经解决

查看全部评分

您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-11-28 22:38

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表