Execution fails for task "runExampleClientRPCJava" - corda

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.

Related

Getting a problem in connecting firebase with android studio

FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\Public\s******n\android\build.gradle' line: 37
* What went wrong:
A problem occurred evaluating root project 'android'.
> Could not find method implementation() for arguments [com.google.android.gms:play-services:12.0.1] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
* 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 6s
Exception: Gradle task assembleDebug failed with exit code 1
I don't know how to connect it, can somebody help me ?

Flutter: Execution failed for task ':firebase_core:compileDebugJavaWithJavac'

I would like to ask some help regarding flutter.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':firebase_core:compileDebugJavaWithJavac'.
> Could not create service of type DefaultGeneralCompileCaches using GradleScopeCompileServices.createGeneralCompileCaches().
> Unexpected lock protocol found in lock file. Expected 3, found 0.
* 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
This is the error I am getting , I've never seen anything like this before. Other apps runs perfectly fine so there's no value in adding flutter doctor if you want to see some other code lemme know down in the comment.
It seems like you are facing this issue when the android gradle build is running. As per the error output, this might get you back on track.
Try deleting the gradle cache located under
Windows:
C:\Users\user\.gradle
Mac/Linux:
/Users/prabhath/.gradle
folder and rerun the build.
Hope this will solve your problem.

':firebase_core:compileDebugJavaWithJavac'

I cannot build the app after the upgrade flutter. Getting the following error "Execution failed for task ':firebase_core:compileDebugJavaWithJavac'.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':firebase_core:compileDebugJavaWithJavac'.
Failed to calculate the value of task ':firebase_core:compileDebugJavaWithJavac' property 'options.generatedSourceOutputDirectory'.
Querying the mapped value of map(java.io.File property(org.gradle.api.file.Directory, property(org.gradle.api.file.Directory, fixed(class org.gradle.api.internal.file.DefaultFilePropertyFactory$FixedDirectory, C:\Users\ahmed azami\Desktop\social_app\build\firebase_core\generated\ap_generated_sources\debug\out))) org.gradle.api.internal.file.DefaultFilePropertyFactory$ToFileTransformer#a5453a7) before task ':firebase_core:compileDebugJavaWithJavac' has completed is not supported
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 5m 47s
Exception: Gradle task assembleDebug failed with exit code 1strong text
I think it is due to androidX. Just append these 2 lines at the end of gradle.properties
android.enableJetifier=true
android.useAndroidX=true

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.

On running the emulator getting this error: Cause: invalid type code: 1D

Recently i installed android studio, and when i run the app for the first time it ran without any error but now, when i run it, it has given the error i.e.
Cause: invalid type code: 1D
and
Executing tasks: [:app:assembleDebug] in project /home/dell/AndroidStudioProjects/disha
FAILURE: Build failed with an exception.
* What went wrong:
Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
* 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 95ms
Please help.
To resolve this error please make the changes below:
Install Java SDK version: 14 or above.
JDK Download link: https://www.oracle.com/java/technologies/javase-jdk14-downloads.html
And in gradle-wrapper.properties please use grade version 6.3 or above.

Resources