java.lang.ClassNotFoundException : org. bouncycaSTLe.asn1.ASN1Encodable 与 itextpdf-5.5.6

标签 java itextpdf

我正在使用 itextpdf-5.5.6.jar 和 bcprov-jdk15on-1.48.jar,并收到此异常:

java.lang.ClassNotFoundException: org.bouncycastle.asn1.ASN1Encodable
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at com.itextpdf.text.pdf.PdfEncryption.<init>(PdfEncryption.java:149)
at com.itextpdf.text.pdf.PdfReader.readDecryptedDocObj(PdfReader.java:1013)
at com.itextpdf.text.pdf.PdfReader.readDocObj(PdfReader.java:1411)
at com.itextpdf.text.pdf.PdfReader.readPdf(PdfReader.java:721)
at com.itextpdf.text.pdf.PdfReader.<init>(PdfReader.java:181)
at com.itextpdf.text.pdf.PdfReader.<init>(PdfReader.java:395)
at com.itextpdf.text.pdf.PdfReader.<init>(PdfReader.java:415)
at ca.zdata.pdf.populate.PdfFormEditor.getPopulatedForm(PdfFormEditor.java:182)

行内:

PdfReader reader = new PdfReader(is);

"is"在哪里 - ByteArrayInputStream

请帮忙。

最佳答案

IText 5.5.6 依赖于 1.49 上的 bcprov-jdk15,而不是 1.48。参见 here .

关于java.lang.ClassNotFoundException : org. bouncycaSTLe.asn1.ASN1Encodable 与 itextpdf-5.5.6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31438033/

相关文章:

java - 尝试使用非静态方法引用非静态字段会导致错误

java - 默认情况下包含 Jackson JsonView 属性

java - BeanUtils.populate 是否有递归版本?

java - 如果元素未出现在 selenium webdriver java 中,如何重新加载页面

java - iTextPdf:动态改变单元格宽度

java - 使用 itext 重新排序 PDF 页面

java - SOLR tika 处理器无法完美抓取我的 PDF 文件

java - 如何创建在每个元音后面添加破折号的方法?

itext - 签署 PDF - 内存消耗

java - iTextPDF : Set page size of PDF according to the size of the image to be inserted