1.Clone Sample like "git clone https://github.com/corda/samples"
2.Open Corda-Sample by Intellij
3.Chose"Run Example Cordapp - Kotlin" And Run
4.Open "build.gradle"(Clients/src) And Run "runPartyAServer" and "runPartyBServer"
5.Access "http://localhost:50005/" And "Create IOU"
6.Exception occured.
java.io.NotSerializableException: com.example.flow.ExampleFlow$Initiator was not found by the node, check the Node containing the CorDapp that implements com.example.flow.ExampleFlow$Initiator is loaded and on the Classpath
How can I solve this Exception?
Are you running nodes?
This command is example 「cordapp-example」,
./cordapp-example/workflows-kotlin/build/nodes/runnodes
If the build folder does not exist, build it.
This command is build command, (Please run 「cordapp-example」directory)
./gradlew clean deployNodes
Cheers!
Related
When I try to run my appium scripts on the pom file ( with mvn verify or mvn test)
I get a
java.lang.RuntimeException: java.lang.NoSuchMethodException: jdk.proxy2.$Proxy12.proxyClassLookup()
On the line that instantiates my locators:
PageFactory.initElements(new AppiumFieldDecorator(driver, Duration.ofSeconds(15)), this);
When I run the test directly from InteliJ or run the testng.xml file, the test succeeds
Full pom.xml: https://pastebin.com/V0FbehMh
Full error stacktrace: https://pastebin.com/11TvTq7a
testng.xml: https://pastebin.com/8XZtCfRt
Related classes: https://pastebin.com/ynFizC9T
What can be the problem, when everything is fine running from test class / testng.xml, but suddenly failing when running with maven in command line
it's a bit embarrassing, (because i remembered I did this before)
After doing an mvn clean, and an mvn compile again,
Then the issue disappeared. something probably got stuck somewhere and needed a clean again..
When trying to perform to perform flow test using intellij IDE V2019.2 test fails and show the following error
command line is too long. shorten command line
Then tried to change other options in shorten command line and retested.
Then it shows java.lang.IllegalArgumentException: There are no CorDapps containing the package com.kba.flows on the classpath. Make sure the package name is correct and that the CorDapp is added as a gradle dependency.
The "IllegalArgumentException" error is thrown when the CorDapps is not present in the classpath. See below -
when (jars.size) {
0 -> throw IllegalArgumentException("There are no CorDapps containing the package $scanPackage on the classpath. Make sure " +
"the package name is correct and that the CorDapp is added as a gradle dependency.")
Please check if the CorDapp jar is present in the classpath.
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.
I am getting below error while building Corda Version 1 (branch name - release-V1)
Task :core:test
net.corda.core.flows.ContractUpgradeFlowTest > 2 parties contract upgrade using RPC FAILED
java.util.concurrent.TimeoutException at ContractUpgradeFlowTest.kt:123
329 tests completed, 1 failed
FAILURE: Build failed with an exception.
Please help...
You can build the project without running the tests by using the command ./gradlew build -x test or gradlew.bat build -x test.
The integration tests can occasionally time-out, so I wouldn't be concerned by this issue. We are working to fix this.
In general, you shouldn't need to build Corda itself. The binaries for release-V1 are published to Maven, so will be downloaded automatically. You should probably work from the templates:
https://github.com/corda/cordapp-template-java
https://github.com/corda/cordapp-template-kotlin
I've been using MbUnit for unit testing for a while, along with Nhibernate and Sqlite.
I am now trying to setup a CI server with Jenkins - I have successfully managed to configure Jenkins to pull the code from github and compile it using MSBuild everytime anyone pushes to github. Finally I want to run tests on the code on each successful build.
The tests all run successfully when run from within Visual Studio without any problem whatsoever, I can run each test individually or the whole project and they all run OK. However when I call Gallio.Echo.exe from command line all the tests that have to do with Sqlite fails.
This is what I've been doing to run the test from command line:
"C:\Program Files\Gallio\bin\Gallio.Echo.exe" /report-type:Html /verbosity:quiet "D:\MyProject\MyProject.Tests\bin\Debug\*.Tests.dll"
(ps: There seems to be absolutely no documentation about gallio tools - have I been looking in all the wrong palces? I want to find more about the command line arguments that I can pass)
The tests fail with this:
Gallio Echo - Version 3.3 build 454
Get the latest version at http://www.gallio.org/
Initializing the runtime and loading plugins.
Verifying test files.
Initializing the test runner.
Running the tests.
[failed] Fixture MyProject.Tests/VerificationTests
Set Up
FluentNHibernate.Cfg.FluentConfigurationException: An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.
---> NHibernate.HibernateException: Could not create the driver from NHibernate.Driver.SQLite20Driver, NHibernate, Version=3.3.1.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4.
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed.
HResult: -2147024809
at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
at NHibernate.Driver.ReflectionBasedDriver..ctor(String providerInvariantName, String driverAssemblyName, String connectionTypeName, String commandTypeName)
at NHibernate.Driver.SQLite20Driver..ctor()
--- End of inner exception stack trace ---
I've tried a few solutions mentioned around on SO but haven't been able to solve it. The only close thing was this answer but I am not sure what the user means by adding to config files.
Anyone has any idea why the tests fail from command line but are okay when run from within VS please?
Thanks.