Exception while testing BoxDeveloperEditionAPIConnection
I am getting the following exception in BoxDeveloperEditionAPIConnection at runtime:
USER_ID :----
DeveloperEditionEntityType.USER :user
boxConfig :com.box.sdk.BoxConfig@13221655
accessTokenCache :com.box.sdk.InMemoryLRUAccessTokenCache@2f2c9b19
Exception in thread "main" java.lang.NoClassDefFoundError: org/bouncycastle/operator/OperatorCreationException
at box.caseroads.BoxDeveloperEditionAPIConnectionAsEnterpriseUser.main(BoxDeveloperEditionAPIConnectionAsEnterpriseUser.java:43)
Caused by: java.lang.ClassNotFoundException: org.bouncycastle.operator.OperatorCreationException
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 1 more
I am using the following JARS to compile and run...
bcprov-jdk15on-160.jar
bcprov-ext-jdk15on-160.jar
box-java-sdk-2.26.0.jar
jose4j-0.6.5.jar
minimal-json-0.9.1.jar
any help will be appreciated?
-
Hi ,
When I last saw this issue in one of my Java samples, the following dependencies in my build.gradle file resolved the problem:
compile 'org.bouncycastle:bcprov-jdk15on:1.52' compile 'org.bouncycastle:bcpkix-jdk15on:1.52'
The version is out of date, but those should help resolve the error.
- Jon
Post is closed for comments.
Comments
1 comment