0

I am using itext library to know whether the pdf file is protected or not. i am also add boncycastle library to my class path but it still showing error:

Caused by: java.lang.ClassNotFoundException: org.bouncycastle.asn1.DEREncodable
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 7 more

1 Answers1

1

Put this library in your classpath bcprov-jdk15on-1.47.jar

UPDATE

Mind your bouncy castle dependencies version according to the IText version you are using. To double check it with maven repositories. eg. here or here

PbxMan
  • 7,525
  • 1
  • 36
  • 40
  • +1; but please inspect the maven pom for the preferred Bouncy Castle version. E.g. version 5.5.0 documents a dependency on BC 1.49. – mkl Mar 31 '14 at 10:16