0

I am implementing some iText7.1.11 java code into an IBM WebSphere environment, and upon WebSphere deployment, it errors out because it needs some Bouncycastle JAR's. According to the pom.xml, iText7.1.11 has a Bouncycastle dependency to version 1.64. Can someone guide me to a working URL of all of the necessary Bouncycastle JAR's for 1.64? I am doing some TIFF to PDF conversion in iText7, nothing to do with crypto at all, but WebSphere is asking me for it, as it parses the code module and wants to avoid potential runtime errors.

Garet
  • 1
  • 1
  • Thank you very much for the URL's. I was able to get the 2 jar's, and attempted to deploy to WebSphere again. – Garet Jun 16 '20 at 18:01
  • Was able to get the 2 jars and try to deploy to WebSphere again.3 errors remain.What am I missing? bcpkix-jdk15on-164.jar, META-INF.versions.9.module-info java.lang.ClassFormatError: JVMCFRE067 unknown constant pool entry tag; class=META-INF/versions/9/module-info, offset=70 bcprov-jdk15on-164.jar, META-INF.versions.9.module-info java.lang.ClassFormatError: JVMCFRE067 unknown constant pool entry tag; class=META-INF/versions/9/module-info, offset=70 bcprov-jdk15on-164.jar, org.bouncycastle.pqc.crypto.qtesla.QTeslaKeyEncodingTests java.lang.NoClassDefFoundError: junit.framework.TestCase – Garet Jun 16 '20 at 18:08
  • Update…I got past the first 2 errors by using these 2 JAR’s: bcpkix-jdk15to18-1.64.jar bcprov-jdk15to18-1.64.jar How do I resolve this: java.lang.RuntimeException: [Error parsing code module ,bcprov-jdk15to18-1.64.jar, org.bouncycastle.pqc.crypto.qtesla.QTeslaKeyEncodingTests java.lang.NoClassDefFoundError: junit.framework.TestCase – Garet Jun 16 '20 at 20:19

1 Answers1

0

BouncyCastle JARs are available on maven repositories. You can find maven artifact JAR and links to its dependencies on corresponding page at https://search.maven.org/

In particular for BouncyCastle there are only two jars in total, which are required for iText: https://search.maven.org/artifact/org.bouncycastle/bcpkix-jdk15on/1.64/jar https://search.maven.org/artifact/org.bouncycastle/bcprov-jdk15on/1.64/jar

What's changed in iText7 7.1.10 release

Before version 7.1.10, iText7 used to have <optional> flag set to BouncyCastle dependencies in pom.xml. This potentially lead to the runtime NoClassDefFoundError exceptions if one utilized API related to encryption/digital signatures without adding explicit dependency to BouncyCastle. In certain scenarios (like attempt to open encrypted PDF) this can be quite unexpected, so starting from 7.1.10 it was decided to make dependency non-optional.

Amedee Van Gasse
  • 7,280
  • 5
  • 55
  • 101
  • 1
    I have changed your links from the Mvnrepository mirror to the official Maven Central repository. I recommend always to use Maven Central, because that is backed by a company (Sonatype), while Mvnrepository is run by just one tech enthusiast out of Buenos Aires, and all respect for his work, but if he runs under a bus tomorrow then who will maintain Mvnrepository? – Amedee Van Gasse Jun 16 '20 at 08:26