java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider

Apache's JIRA Issue Tracker | Ken Krugler | 7 years ago
  1. 0

    [SOLR-1819] Upgrade to Tika 0.7 - ASF JIRA

    apache.org | 12 months ago
    java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider
  2. 0

    See title.

    Apache's JIRA Issue Tracker | 7 years ago | Tricia Jenkins
    java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider
  3. 0

    While processing a bunch of PDFs off the web, I ran into a ClassNotFoundException thrown inside of PDFBox: java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider at org.apache.pdfbox.pdmodel.PDDocument.openProtection(PDDocument.java:1092) at org.apache.pdfbox.pdmodel.PDDocument.decrypt(PDDocument.java:573) at org.apache.pdfbox.util.PDFTextStripper.writeText(PDFTextStripper.java:235) at org.apache.pdfbox.util.PDFTextStripper.getText(PDFTextStripper.java:180) at org.apache.tika.parser.pdf.PDF2XHTML.process(PDF2XHTML.java:56) at org.apache.tika.parser.pdf.PDFParser.parse(PDFParser.java:69) at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:120) at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:101) at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:114) at bixo.parser.SimpleParser.parse(SimpleParser.java:153) Caused by: java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.BouncyCastleProvider at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:303) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) I believe the issue is that the PDFBox pom.xml declares the dependency on the missing BouncyCastleProvider jar as "optional". <dependency> <groupId>bouncycastle</groupId> <artifactId>bcprov-jdk14</artifactId> <version>136</version> <optional>true</optional> </dependency> As explained in the Maven documentation, this means that Tika needs to explicitly include the jar: http://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html I see a few other optional dependencies in the PDFBox pom.xml, but perhaps the only one that's really critical is the above.

    Apache's JIRA Issue Tracker | 7 years ago | Ken Krugler
    java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    ViewPager Injection not working

    GitHub | 2 years ago | airblaster
    java.lang.ClassNotFoundException: android.view.ViewGroup
  6. 0

    Debug Logging

    GitHub | 2 years ago | airblaster
    java.lang.ClassNotFoundException: android.view.ViewGroup

  1. andyglick 2 times, last 3 days ago
  2. richard77 1 times, last 6 days ago
  3. musketyr 2 times, last 6 days ago
  4. michallos 2 times, last 6 days ago
  5. batwalrus76 2 times, last 7 days ago
67 more registered users
28 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException

    org.bouncycastle.jce.provider.BouncyCastleProvider

    at java.net.URLClassLoader$1.run()
  2. Java RT
    ClassLoader.loadClass
    1. java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    2. java.security.AccessController.doPrivileged(Native Method)
    3. java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    4. java.lang.ClassLoader.loadClass(ClassLoader.java:303)
    5. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    6. java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    6 frames