I am using ADF 12c and I tried to extract data from pdfs using itext 5.5.5 with dependency files bcpkix-jdk15on-1.49,bcprov-ext-jdk14-1.49 and xmlsec-1.5.1.When I deploy the application in weblogic server it shows the exception"class org.bouncycastle.asn1.ASN1Primitive overrides final method equals.(Ljava/lang/Object;)Z".How can I solve this problem?
Asked
Active
Viewed 81 times
1
-
This error message indicates that you have multiple, incompatible versions of BouncyCastle in your class path, cf. [this answer](http://stackoverflow.com/a/17213336/1729265), the first comment explains the exception message. – mkl May 26 '15 at 10:04
-
You are mixing jars for jdk 14 and jdk 15. – Paulo Soares May 26 '15 at 10:49
-
I also tried bcpkix-jdk15on-1.49, bcprov-ext-jdk15-1.49.But the problem can't be resolved. – nidheesh mohan May 26 '15 at 12:10
-
The problem isn't that you've tried multiple BC jars. The problem is that you are using multiple BC jars. You should **remove all of them** and then make sure you add one and only one (the correct one). – Bruno Lowagie May 26 '15 at 12:17
-
*I also tried ... 1.49* - You additionally have an earlier BC version on the class path. From the comment I referenced: `ASN1Primitive` is derived from `ASN1Object`. Up to BC 1.46, `ASN1Object.equals` used to be final but since 1.47 it is not final anymore. `ASN1Primitive` has been added to BC in version 1.47 and overrides `equals`. Most likely, therefore, `ASN1Object` in your case is loaded from a BC version *before 1.4/* and ASN1Primitive from a BC version *since 1.47* and this combination clashes. – mkl May 26 '15 at 12:19