Welcome to the new Box Support website. Check out all the details here on what’s changed.

bouncycastle Operator Creation Exception in Java

Answered
New post

Comments

4 comments

  • mwiller

     The "java.lang.NoClassDefFoundError: org/bouncycastle/operator/OperatorCreationException" error may be because your program can't resolve the contents of the BounceCastle jars — this appears to be a runtime exception with trying to load their classes.  How are you loading or including them in your project?

    0
    Comment actions Permalink
  • LandC

    The code I have was developed in Netbeans. In netbeans, I've added the jars to the list of jars to be included during compilation.  I've attached a picture for reference.  BoxAPIJars.jpgIt seems odd since I have used these jars before to run code with just a developer token.  I'm wondering if somehow the real failure is related to the json file, but I'm not sure how to check.  I have confirmed that the file is being recognized by changing the actual file name without changing the code (which then prompted an run-time error). 

    0
    Comment actions Permalink
  • LandC

    Marking this as done.  Was able to troubleshoot and determine that one of my jars was corrupt.  The good news is that this error was eliminated.  The bad news is that I have a new error -- it's not emanating from the same jar.  If I can;t figure it out, I'll be posting again.  

     

    Thanks all!

    0
    Comment actions Permalink
  • Enayathulla BirurFazil

    Facing same issue 

    java.lang.NoClassDefFoundError: org/bouncycastle/operator/OperatorCreationException

     

    included the dependencies during runtime:

            runtime files('./lib/jose4j-0.9.3.jar')
                     runtime files('./lib/bcprov-jdk15on-1.70.jar')
                     runtime files('./lib/bcutil-jdk15on-1.70.jar')    

     

    Let me know if anyone know the solution for this.

    0
    Comment actions Permalink

Please sign in to leave a comment.