Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Could not find or load main class net.corda.node.Corda #66

Open
architect-tarun-narang opened this issue Feb 28, 2022 · 4 comments

Comments

@architect-tarun-narang
Copy link

Running the command on windows 10 - .\gradlew clean deployNodes throws an error - Error: Could not find or load main class net.corda.node.Corda
Logs are shared below, I tried to find any resolution on some blogs but all get in vain.

PS C:\Users\48013\Desktop\Backup\Tarun\TSG\Sample Apps\Blockchain\Corda\templates\cordapp-template-java> .
\gradlew clean deployNodes

> Task :jar
Cordapp metadata not defined for this gradle build file. See https://docs.corda.net/head/cordapp-build-sys
tems.html#separation-of-cordapp-contracts-flows-and-services

> Task :deployNodes  
Running Cordform task
Deleting C:\Users\48013\Desktop\Backup\Tarun\TSG\Sample Apps\Blockchain\Corda\templates\cordapp-template-j
ava\build\nodes
Bootstrapping local test network in C:\Users\48013\Desktop\Backup\Tarun\TSG\Sample Apps\Blockchain\Corda\t
emplates\cordapp-template-java\build\nodes
Generating node directory for Notary
Generating node directory for PartyA
Generating node directory for PartyB
Waiting for all nodes to generate their node-info files...

#### Error while generating node info file C:\Users\48013\Desktop\Backup\Tarun\TSG\Sample Apps\Blockchain\
Corda\templates\cordapp-template-java\build\nodes\PartyA\logs ####
Error: Could not find or load main class net.corda.node.Corda
#### Error while generating node info file C:\Users\48013\Desktop\Backup\Tarun\TSG\Sample Apps\Blockchain\
Corda\templates\cordapp-template-java\build\nodes\Notary\logs ####
Error: Could not find or load main class net.corda.node.Corda     
#### Error while generating node info file C:\Users\48013\Desktop\Backup\Tarun\TSG\Sample Apps\Blockchain\
Corda\templates\cordapp-template-java\build\nodes\PartyB\logs ####
Error: Could not find or load main class net.corda.node.Corda     

> 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 C:\Users\48013\Desktop\Backup\Tarun\TSG\
Sample Apps\Blockchain\Corda\templates\cordapp-template-java\build\nodes\PartyA\logs.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log out
put. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 24s
15 actionable tasks: 14 executed, 1 up-to-date

@architect-tarun-narang
Copy link
Author

Any suggestions on this would be appreciated. I further checked the logs to at this location but no luck.
image

@apiwitwutithumkitti
Copy link

Hi, I found same error. how do you fix it?

@architect-tarun-narang
Copy link
Author

Firstly, make sure you have Java8 Installed and secondly to make it work, I changed the source directory path from C:\Users\48013\Desktop\Backup\Tarun\TSG\Sample Apps\Blockchain
Corda\templates\cordapp-template-java\
TO
C:\Users\48013\cordapp-template-java\

I kept the directory path small, sounds illogical but this did the trick for me.

@apiwitwutithumkitti
Copy link

I try your trick, I change directory to shorter path. it work for me too
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants