Grails “类”;org.bouncycastle.asn1.asn1原语“';的签名者信息与同一包中其他类的签名者信息不匹配
我正在打下面的电话Grails “类”;org.bouncycastle.asn1.asn1原语“';的签名者信息与同一包中其他类的签名者信息不匹配,grails,bouncycastle,Grails,Bouncycastle,我正在打下面的电话 PdfCopy copy = null; ... copy.setEncryption(password.getBytes(), null, PdfWriter.ALLOW_PRINTING | PdfWriter.ALLOW_COPY, PdfWriter.ENCRYPTION_AES_128) 我明白了 java.lang.SecurityException:类“org.bouncycastle.asn1.ASN1Primitive”的签名者信息与同一包中其他类的签名者
PdfCopy copy = null;
...
copy.setEncryption(password.getBytes(), null, PdfWriter.ALLOW_PRINTING | PdfWriter.ALLOW_COPY, PdfWriter.ENCRYPTION_AES_128)
我明白了
java.lang.SecurityException:类“org.bouncycastle.asn1.ASN1Primitive”的签名者信息与同一包中其他类的签名者信息不匹配
这似乎与Grails和bouncy castle的早期版本有关,所以我尝试将以下内容添加到我的pom中
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>rendering</artifactId>
<version>0.4.4</version>
<scope>compile</scope>
<type>zip</type>
<exclusions>
<exclusion>
<groupId>bouncycastle</groupId>
<artifactId>bcmail-jdk14</artifactId>
</exclusion>
<exclusion>
<groupId>bouncycastle</groupId>
<artifactId>bcprov-jdk14</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Needed for rendering plugin -->
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>core-renderer</artifactId>
<version>R8</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>bouncycastle</groupId>
<artifactId>bcmail-jdk14</artifactId>
</exclusion>
<exclusion>
<groupId>bouncycastle</groupId>
<artifactId>bcprov-jdk14</artifactId>
</exclusion>
</exclusions>
</dependency>
...
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.3.2</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.47</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcmail-jdk15on</artifactId>
<version>1.47</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bctsp-jdk15</artifactId>
<version>1.46</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
org.grails.plugins
翻译
0.4.4
编译
拉链
弹跳船舱
bcmail-jdk14
弹跳船舱
bcprov-jdk14
org.xhtmlender
核心渲染器
R8
编译
弹跳船舱
bcmail-jdk14
弹跳船舱
bcprov-jdk14
...
com.itextpdf
itextpdf
5.3.2
org.bouncycastle
bcprov-jdk15on
1.47
org.bouncycastle
bcmail-jdk15on
1.47
org.bouncycastle
bctsp-jdk15
1.46
罐子
编译
但是没有骰子。。。。我正在使用Grails2.3.7,有人有什么建议吗
另外,当我运行mvn dependency:tree-Dverbose时,我看不到任何其他引用。问题与grails文档插件有关。我通过运行
grails依赖项报告发现了这一点,它在grails文档中显示了一个旧的iText依赖项
在BuildConfig中排除这一点效果很好
基本上这