Failure when running deployNodes - corda

Sporadically, I get the following error message from running the Corda deployNodes task:
* What went wrong:
Execution failed for task ':deployNodes'.
> classLoader.getResourceAsStream(storeResourceName) must not be null
How can I fix this issue?

This issue is caused by a zombie Java process. Try killing any Java processes and trying again.

Related

Execution failed for task ':app:mergeDebugJavaResource'. - Gradle Task assemble

so I was trying to run my flutter project and then I got this error :
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugJavaResource'.
> java.nio.file.FileSystemException: C:\Users\ASUS\Desktop\Programmin\Flutter\app_with_firebase\build\app\intermediates\merged_java_res\debug\out.jar: The process cannot access the file because it is being used by another process.
* 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 3s
Exception: Gradle task assembleDebug failed with exit code 1
I tried to do : File > Invalidate Chaches/Restart in Android studio, but it won't solve the problem. I also tried to do flutter clean, then flutter run, but It still shows me the same error.
I have no idea what to do now, any help is appreciated.
Thank you !
I did a bit more digging with SysInternals and jps and it turns out that the Kotlin Language Server wasn't releasing the lock on the build folder. For me, uninstalling the VS Code fwcd Kotlin extension (and replacing with a different Kotlin language extension, if required) was enough to fix the issue.
On Android Studio, all I can suggest is disabling/uninstalling the Kotlin plugin and seeing if that fixes it for you.

Cordova Execution failed for task ':app:transformClassesWithDexBuilderForDebug'

I am getting this error in Cordova, i use the cordova-plugin-firebasex without any problem, when i add the plugin cordova-plugin-admob-free it gives this error and fails to build. I have been trying to solve it for days, i'm using cordova version 9, any help would be great !
What went wrong:
Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users**.gradle\caches\transforms-1\files-1.1\play-services-gass-11.0.4.aar\7c8749a76f488f62bc9294a2b72be741\jars\classes.jar
I had the same issue and fixed it by editing platforms/android/project.properties
Change
cordova.system.library.16=com.google.android.gms:play-services-base:11.0.4
cordova.system.library.17=com.google.android.gms:play-services-ads:11.0.4
To
cordova.system.library.16=com.google.android.gms:play-services-base:+
cordova.system.library.17=com.google.android.gms:play-services-ads:+

Corda throws error trying to generate the basic nodes

Am trying to generate the basic nodes- PartyA, PartyB and Notary on Ubuntu 14 by running ./gradlew deployNodes or even ./gradlew clean deployNodes. The error reads:
... still waiting. If this is taking longer than usual, check the node logs.
Error while generating node info file /cordapp-template-java/build/nodes/Notary/logs
Error while generating node info file /cordapp-template-java/build/nodes/PartyB/logs
Error while generating node info file /cordapp-template-java/build/nodes/PartyA/logs
Task :deployNodes FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':deployNodes'.
Error while generating node info file. Please check the logs in /cordapp-template-java/build/nodes/Notary/logs.
Error while generating node info file. Please check the logs in /cordapp-template-java/build/nodes/Notary/logs.
The error logs do not provide any indication of error.
I have personally run into the above question myself. From what I saw, it seems it was a random incident on the Unix based machine.
The issue was resolved after I moved the project to the different location. It is absurd. But I have never ran into this issue ever again.

Execution fails for task "runExampleClientRPCJava"

I'm following the CorDapp example tutorial from the main website and am running into problems when trying to run the example RPC client via the command line on Linux
When running the gradle task ./gradlew runExampleClientRPCJava , I get the following errors.
> Task :java-source:runExampleClientRPCJava
I 13:47:55 1 RPCClient.logElapsedTime - Startup took 7722 msec
Exception in thread "main" ActiveMQNotConnectedException[errorType=NOT_CONNECTED message=AMQ119007: Cannot connect to server(s). Tried with all available servers.]
at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:787)
at net.corda.client.rpc.internal.RPCClientProxyHandler.start(RPCClientProxyHandler.kt:191)
at net.corda.client.rpc.internal.RPCClient$start$1.invoke(RPCClient.kt:123)
at net.corda.client.rpc.internal.RPCClient$start$1.invoke(RPCClient.kt:86)
at net.corda.core.internal.InternalUtils.logElapsedTime(InternalUtils.kt:191)
at net.corda.core.internal.InternalUtils.logElapsedTime(InternalUtils.kt:183)
at net.corda.client.rpc.internal.RPCClient.start(RPCClient.kt:109)
at net.corda.client.rpc.CordaRPCClient.start(CordaRPCClient.kt:135)
at net.corda.client.rpc.CordaRPCClient.start(CordaRPCClient.kt:120)
at com.example.client.ExampleClientRPC.main(ExampleClientRPC.java:38)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':java-source:runExampleClientRPCJava'.
> Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 1
* 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
I can see that it can't connect to any of the servers. Does anyone know why this is and how to solve it? Has anyone run into the same problem?
The error message indicates that the client is not able to connect to the node in question. This is most likely because the node it is trying to connect to has failed to start.
Try restarting the node and trying to connect again.

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.

Resources