In Corda, Could not find method networkMap exception - corda

I am following instructions on https://docs.corda.net/releases/release-V1.0/deploying-a-node.html to add a network map to the deployNodes task in
my build.gradle file. But when I run gradlew deployNodes, it gives the following error. I have tried with Cordform plugin versions 3.1.0 and 3.2.1 . Am I missing anything or any other setup that needs to be done?
FAILURE: Build failed with an exception.
* Where:
Build file '/home/ubuntu/corda/build.gradle' line: 103
* What went wrong:
A problem occurred evaluating root project 'corda'.
> Could not find method networkMap() for arguments on task ':deployNodes' of type net.corda.plugins.Cordform.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s

Corda 3 removed the concept of a special network map node that serves the role of distributing the network map to the other nodes. Instead, the network map is now a collection of signed NodeInfo files distributed via HTTP. You can read more about this change here.
As a result, the networkMap option no longer exists in Cordform.

Related

FAILURE: Build failed with an exception. * Where: Build file 'F:\Developed App\untitled1\android\build.gradle' line: 24

F:\Developed App\untitled1\android>gradlew signingReport
FAILURE: Build failed with an exception.
Where:
Build file 'F:\Developed App\untitled1\android\build.gradle' line: 24
What went wrong:
A problem occurred evaluating root project 'android'.
A problem occurred configuring project ':app'.
Could not open proj generic class cache for build file 'F:\Developed App\untitled1\android\app\build.gradle' (C:\Users\Raihan.gradle\caches\6.7\scripts\b8f
tacjwav9hf6p50aw09t36z).
> BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 60
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1s
F:\Developed App\untitled1\android>
Go to C:\Users\Raihan.gradle\caches\ and try to remove everything inside this caches folder.
Then remove untitled1/.gradle/caches/
If you're using an Android Studio, go to File -> Invalidate caches and restart
Hopefully, your problem will be solved

Execution failed for task ':java-source:deployNodes'. (Installing Corda). Any Suggestions?

I am trying to install Corda onto my local laptop. I get a build error as described below. Can anyone help?
I am running this -
~/kotlinapps/cordapp-example$ ./gradlew deployNodes --scan
Task :java-source:deployNodes Bootstrapping local network in /Users/satoshimaca/kotlinapps/cordapp-example/java-source/build/nodes
Node config files found in the root directory - generating node
directories Generating directory for Notary Generating directory for
PartyA Generating directory for PartyC Generating directory for PartyB
Nodes found in the following sub-directories: [Notary, PartyA, PartyC,
PartyB] Waiting for all nodes to generate their node-info files...
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':java-source:deployNodes'.
Node in Notary exited with 1 when generating its node-info - see logs in
/Users/satoshimaca/kotlinapps/cordapp-example/java-source/build/nodes/Notary/logs
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 2m 0s 5 actionable tasks: 5 executed
~/kotlinapps/cordapp-example$ ./gradlew deployNodes --scan Download
https://plugins.gradle.org/m2/com/gradle/build-scan-plugin/1.10.3/build-scan-plugin-1.10.3.pom
Download
https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.1.60/kotlin-gradle-plugin-1.1.60.pom
Download
https://plugins.gradle.org/m2/com/gradle/build-scan-plugin/1.10.3/build-scan-plugin-1.10.3.jar
Download
https://plugins.gradle.org/m2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.1.60/kotlin-gradle-plugin-1.1.60.jar
Task :java-source:deployNodes Bootstrapping local network in /Users/satoshimaca/kotlinapps/cordapp-example/java-source/build/nodes
Node config files found in the root directory - generating node
directories Generating directory for Notary Generating directory for
PartyA Generating directory for PartyC Generating directory for PartyB
Nodes found in the following sub-directories: [Notary, PartyA, PartyC,
PartyB] Waiting for all nodes to generate their node-info files...
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':java-source:deployNodes'.
Node in Notary exited with 1 when generating its node-info - see logs in
/Users/satoshimaca/kotlinapps/cordapp-example/java-source/build/nodes/Notary/logs
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1m 3s
5 actionable tasks: 2 executed, 3 up-to-date
Publishing a build scan to scans.gradle.com requires accepting the
Terms of Service defined at https://scans.gradle.com/terms-of-service.
Do you accept these terms? [yes, no] Gradle Cloud Services license
agreement accepted.
Publishing build scan... https://gradle.com/s/u5os3dq6zfl3a
It's hard to know what's going on here. Please post the notary node's logs under /Users/satoshimaca/kotlinapps/cordapp-example/java-source/build/nodes/Notary/logs so we can help better.
However, two possibilities are:
Old builds are corrupting the process. Run ./gradlew clean deployNodes instead of ./gradlew deployNodes
You are using an incompatible JVM version. You need to use version 8u131 or above of the Oracle JDK 8 JVM
Downgrading from JDK 10 to 8 worked for me. Here's the download link:
Oracle Java SE Development Kit

Corda 3 deployNodes - Node in Notary exited with 1 when generating its node-info

I am trying to run the Example CorDapp (https://github.com/corda/cordapp-example) on Corda 3. When I try to run the ./gradlew deployNodes step, I get the following error:
Execution failed for task ':java-source:deployNodes'.
> Node in Notary exited with 1 when generating its node-info - see logs in [REDACTED]/cordapp-example/java-source/build/nodes/Notary/logs
* Try:
Run with --info and --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':java-source:deployNodes'.
at ...
Caused by: java.lang.IllegalStateException: Node in Notary exited with 1 when generating its node-info - see logs in [REDACTED]/cordapp-example/java-source/build/nodes/Notary/logs
at net.corda.nodeapi.internal.network.NetworkBootstrapper$gatherNodeInfoFiles$future$1.invoke(NetworkBootstrapper.kt:136)
at net.corda.nodeapi.internal.network.NetworkBootstrapper$gatherNodeInfoFiles$future$1.invoke(NetworkBootstrapper.kt:44)
at net.corda.core.internal.concurrent.ValueOrException$DefaultImpls.capture(CordaFutureImpl.kt:107)
at net.corda.core.internal.concurrent.OpenFuture$DefaultImpls.capture(CordaFutureImpl.kt
at net.corda.core.internal.concurrent.CordaFutureImpl.capture(CordaFutureImpl.kt:119)
at net.corda.core.internal.concurrent.CordaFutureImplKt$fork$$inlined$also$lambda$1.run(CordaFutureImpl.kt:22)
Why is the network failing to be created?
I encountered this when old builds with old names were present in the cordapp. Looking at the logs at "/cordapp-example/java-source/build/nodes/Notary/logs/" will reveal which old node is causing problems.
Running ./gradlew clean deployNode clears the issue.
This can also be caused by having the wrong Java version. Ensure your Java version is in-line with the requirements here: https://docs.corda.net/getting-set-up.html#software-requirements.

Corda R3 DeployNodes command is failing for example cordapp

I have downloaded the source code of example cordapp from here.
I am getting following error when I give the command :
gradle deployNodes.
Please guide me on what can be done.
Note: This is Corda V3.
> Task :java-source:deployNodes
Bootstrapping local network in C:\Blockchain\cordapp-example-release-V3\java-source\build\nodes
Node config files found in the root directory - generating node directories
Generating directory for Notary
Generating directory for PartyA
Generating directory for PartyB
Generating directory for PartyC
Nodes found in the following sub-directories: [Notary, PartyA, PartyB, PartyC]
Waiting for all nodes to generate their node-info files...
Distributing all node info-files to all nodes
Gathering notary identities
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':java-source:deployNodes'.
> java.util.concurrent.ExecutionException: java.lang.RuntimeException: Unknown constant pool tag [I#5d453b56 in classfile module-info.class (element size unknown, cannot continue reading class. Please report this on the FastClasspathScanner GitHub page.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 45s
5 actionable tasks: 2 executed, 3 up-to-date
Also faced the same issue on V2 to V3 migration. I had to downgrade Gradle from 4.5.1 to 4.1 in my project to get it working again.
This is fixed in Corda 3.1. Upgrade notes here: https://docs.corda.net/upgrade-notes.html#v3-0-to-v3-1.

Getting an error when adding a 3rd-party jar file

Good day,
I have modified the cordapp-tutorial demo application by modifying the gradle file \cordapp-tutorial\java-source\build.gradle. More specifically, I am adding a jar file to compile a 3rd party library. I'm making the following change to the build.gradle script
but it causes the following error for the M14 milestone release:
:java-source:configureCordappFatJar FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':java-source:configureCordappFatJar'.
Cannot invoke method contains() on null object
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
I do not get this error when I am using milestone release M13
There was a bug in the 0.14.0 release of the Corda gradle plugins that caused this (a missing null check when checking with a dependency without a group).
The way to fix it would be to change the corda_gradle_plugins_version to 0.14.1.

Resources