相关疑难解决方法(0)

iText/BouncyCastle ClassNotFound org.bouncycastle.asn1.DEREncodable and org.bouncycastle.tsp.TimeStampTokenInfo

我正在尝试使用iText Java.当您运行示例" 如何签名 "时,会发生以下错误:

Caused by: java.lang.ClassNotFoundException: org.bouncycastle.tsp.TimeStampTokenInfo
Run Code Online (Sandbox Code Playgroud)

根据"iText入门 - 如何使用iText签名PDF",我必须使用BouncyCastle.

我从BouncyCastle下载页面 下载了文件:bcprov-jdk15on-147.jar .
并添加到项目中:Java Build Path/Libraries/Add External JARs ...

我添加了以下行:

Security.addProvider(new BouncyCastleProvider());
Run Code Online (Sandbox Code Playgroud)

运行该示例时,会发生相同的错误.
所以我下载了另一个文件:bcpkix-jdk15on-147.jar,标题为"PKIX/CMS/EAC/PKCS/OCSP/TSP/OPENSSL"
并添加到项目中:Java Build Path/Libraries/Add External JARs ...
现在我有了两个罐子.

运行该示例时,会发生以下错误:

Caused by: java.lang.ClassNotFoundException: org.bouncycastle.asn1.DEREncodable
Run Code Online (Sandbox Code Playgroud)

我尝试下载文件"bcprov-ext-jdk15on-147.jar",但没有解决问题.

我在Windows 7 64位上使用iText 5.2.1和eclipse.

java cryptography bouncycastle exception itext

20
推荐指数
4
解决办法
7万
查看次数

标签 统计

bouncycastle ×1

cryptography ×1

exception ×1

itext ×1

java ×1