I\'m trying to use iText Java. When you run the example \"how to sign\" the following error occurs:
Caused by: java.lang.ClassNotFoundException: org.bouncyca
iText marks bouncycastle dependencies as optional. If you require them, you need to add the dependencies in your own pom file.
To find out which dependency to include in your project, open the itextpdf pom.xml file of the version you are using (for example 5.3.2, here) and search for the 2 bouncycastle dependencies.
org.bouncycastle
bcprov-jdk15on
1.47
true
org.bouncycastle
bcmail-jdk15on
1.47
true
Copy them into your pom file and remove the optional option.
com.itextpdf
itextpdf
5.3.2
org.bouncycastle
bcprov-jdk15on
1.47
org.bouncycastle
bcmail-jdk15on
1.47