`enclave:enclaveClassName` task fails in documentation samples
CluEleSsUK opened this issue · comments
Apologies is this isn't the right place to log issues with the conclave.net docs - I couldn't see anywhere on the site itself, so if ought to be elsewhere please point me in the direction!
I'm following the the "Writing your first enclave" tutorial on the docs.conclave.net website and have got to this step: https://docs.conclave.net/writing-hello-world.html#run-what-weve-got-so-far
When running ./gradlew host:run
, I get the following exception:
Execution failed for task ':enclave:enclaveClassName'.
> Could not initialize class nonapi.io.github.classgraph.utils.FileUtils
The relevant part of the stacktrace appears to be:
Caused by: java.lang.NoClassDefFoundError: Could not initialize class nonapi.io.github.classgraph.utils.FileUtils
at nonapi.io.github.classgraph.classpath.ClasspathOrder.addClasspathEntry(ClasspathOrder.java:343)
at nonapi.io.github.classgraph.classpath.ClasspathOrder.addClasspathEntries(ClasspathOrder.java:389)
at nonapi.io.github.classgraph.classpath.ClasspathFinder.<init>(ClasspathFinder.java:160)
at io.github.classgraph.Scanner.<init>(Scanner.java:166)
at io.github.classgraph.ClassGraph.scanAsync(ClassGraph.java:1244)
at io.github.classgraph.ClassGraph.scanAsync(ClassGraph.java:1272)
at io.github.classgraph.ClassGraph.scan(ClassGraph.java:1297)
at io.github.classgraph.ClassGraph.scan(ClassGraph.java:1337)
at io.github.classgraph.ClassGraph.scan(ClassGraph.java:1350)
at com.r3.conclave.plugin.enclave.gradle.EnclaveClassName.action(EnclaveClassName.kt:25)
at com.r3.conclave.plugin.enclave.gradle.ConclaveTask.run(ConclaveTask.kt:26)
The output of ./gradlew -v
for me is:
------------------------------------------------------------
Gradle 6.8
------------------------------------------------------------
Build time: 2021-01-08 16:38:46 UTC
Revision: b7e82460c5373e194fb478a998c4fcfe7da53a7e
Kotlin: 1.4.20
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM: 1.8.0_292 (AdoptOpenJDK 25.292-b10)
OS: Mac OS X 10.16 x86_64
I have docker installed and have also tried with -PenclaveMode="mock"
to no avail.
Many thanks in advance!
Also my docker version in case it's relevant: Docker version 20.10.5, build 55c4c88
Hey @CluEleSsUK, I imagine it's because you're using a different version of the gradle wrapper to the version of gradle that our plugin uses, 6.6.1. They've probably made some internal change which means that internal class is no longer there. Can you try reverting the wrapper version back to 6.6.1. Thanks.
Worked a charm! Many thanks!