0
votes

I am trying the update the dependencies as per the corda Enterprise provided repo but while I am trying to clean build it is giving me the following error:

java.lang.NoClassDefFoundError: org/mockito/stubbing/Answer
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)

These are dependencies I am giving in the gradle file:

 cordaCompile "$corda_release_group:corda-core:$corda_release_version"
    cordaCompile "$corda_release_group:corda-finance:$corda_release_version"
    cordaCompile "$corda_release_group:corda-jackson:$corda_release_version"
    cordaCompile "$corda_release_group:corda-rpc:$corda_release_version"
    cordaCompile "$corda_release_group:corda-node-api:$corda_release_version"

    cordaRuntime "$corda_release_group:corda:$corda_release_version"
    testCompile "$corda_release_group:corda-test-utils:$corda_release_version"
    testCompile "$corda_release_group:corda-node-driver:$corda_release_version"

    testCompile "$corda_release_group:corda-test-common:$corda_release_version"

    testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"


    // CorDapp dependencies
    // Specify your cordapp's dependencies below, including dependent CorDapps
    cordapp "$corda_release_group:corda-finance:$corda_release_version"

Apples-MacBook-Pro:ct-market manish.kumar1$ java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
1
Can you run java -version and add the output to the question, please?Joel
added the java -version output to the questionmanish

1 Answers

0
votes

You need to add Mockito as a dependency in your build.gradle file's `dependencies block:

dependencies {

    ...

    compile "org.mockito:mockito-core:$mockito_version"

    ...

}