Reputation: 21
I can't seem to get a clean build of example-cordapp to run.
I am following the following tutorial: https://docs.corda.net/tutorial-cordapp.html#opening-the-example-cordapp-in-intellij
After the gradle build runs I get the following warning (unsure if related):
Duplicate content roots detected: Path [C:/Users/Andrew/Desktop/CordaProjects/samples/cordapp-example/config/dev] of module [cordapp-example.clients.main] was removed from modules [cordapp-example.workflows-java.main, cordapp-example.workflows-kotlin.main]
I then keep getting the following error when I attempt to run the "Run Example Cordapp" configuration, pressing the green arrow just as instructed. It brings up a window that asks me to specify the module. I use cordapp-example, but it produces the following error:
Class 'com.example.test.NodeDriverKt' not found in module cordapp-example
I have already done a clean rebuild of Java, Intellij, and I have recloned the repo. I'm not sure where to go from here. I followed the tutorial exactly.
I have also attempted the advice given here, only to get the same error: error Class 'com.example.NodeDriverKt' not found in module 'cordapp-example'
Any help on this would be greatly appreciated
Upvotes: 1
Views: 610
Reputation: 65
Please change the code in following file samples/cordapp-example/workflows-kotlin/src/test/kotlin/com/example/test/NodeDriver.kt Hope it works for you
fun main(args: Array<String>) {
val user = User("user1", "test", permissions = setOf("ALL"))
driver(DriverParameters(waitForAllNodesToFinish = true)) {
val nodeFutures = listOf(
startNode(
providedName = CordaX500Name("PartyA", "London", "GB"),
customOverrides = mapOf("rpcSettings.address" to "localhost:10008", "rpcSettings.adminAddress" to "localhost:10048", "webAddress" to "localhost:10009"),
rpcUsers = listOf(user)),
startNode(
providedName = CordaX500Name("PartyB", "New York", "US"),
customOverrides = mapOf("rpcSettings.address" to "localhost:10011", "rpcSettings.adminAddress" to "localhost:10051", "webAddress" to "localhost:10012"),
rpcUsers = listOf(user)),
startNode(
providedName = CordaX500Name("PartyC", "Paris", "FR"),
customOverrides = mapOf("rpcSettings.address" to "localhost:10014", "rpcSettings.adminAddress" to "localhost:10054", "webAddress" to "localhost:10015"),
rpcUsers = listOf(user)))
val (nodeA, nodeB, nodeC) = nodeFutures.map { it.getOrThrow() }
startWebserver(nodeA)
startWebserver(nodeB)
startWebserver(nodeC)
}
Upvotes: 1