Corda 4.3 compilation issues - corda

Trying to compile Corda from scratch. I cloned version 4.3 from Github. Details and error codes below.I am using Oracle java version 1.8. I have asked this question on slack as well but didn't find anyone who has faced this issue before.
Task :node-api-tests:test
net.corda.nodeapitests.internal.crypto.X509UtilitiesTest > create valid server certificate chain FAILED
java.security.cert.CertificateException at X509UtilitiesTest.kt:166
net.corda.nodeapitests.internal.crypto.X509UtilitiesTest > create valid self-signed CA certificate FAILED
java.security.cert.CertificateException at X509UtilitiesTest.kt:131
46 tests completed, 2 failed
Task :node-api-tests:test FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ‘:node-api-tests:test’.

So it looks like you're trying to build Corda's source code. Most of the time you really won't need to do this. I'd recommend instead just taking a look at the Corda samples as they use gradle which will download the jars and compile the samples for you.
Here's a link to some of those sample repo's so you can try building off of them.
https://github.com/corda/samples-kotlin
https://github.com/corda/samples-java
All of them compile and run the same way so it shouldn't be too difficult to get running.
./gradlew deployNodes
and then
./build/nodes/runnodes

Related

cannot create luminus project with sqlite and clojurescript support

I am trying to create a luminus project with sqlite and cljs support with this command:
lein new dbscript +sqlite +cljs
but I keep getting this error message all the time:
Failed to resolve version for dbscript:lein-template:jar:RELEASE: Could not find metadata dbscript:lein-template/maven-metadata.xml in local (/home/jonas/.m2/repository)
Failed to read artifact descriptor for dbscript:lein-template:jar:RELEASE
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
Could not find template dbscript on the classpath.
and I cannot find any solution to this. Any suggestions?

Azure DevOps App Center task error: Test chunking failed

I have lately been trying to upload our UI-tests to App Center through an Azure DevOps pipeline task and seem to always run into this error. The same error also occurs if I try to run the CLI command locally. Our project is a cross platform Xamarin.Forms app using the Xamarin.UITest test framework.
The specified error:
Test chunking failed: Specified method is not supported.
Preparing tests... failed.
Error: Cannot prepare UI Test artifacts using command: C:\Users\VssAdministrator.nuget\packages\xamarin.uitest\3.0.7\tools\test-cloud.exe prepare "D:/a/1/b/Debug/Project.dev.apk" --assembly-dir "D:\a\1\s\ Project.UITest\bin\Debug" --artifacts-dir "D:\a\1\a\AppCenterTest".
Test chunking failed, please try again. If you can't work out how to fix this issue, please contact support.
##[error]Error: D:\a_tasks\AppCenterTest\1.152.3\node_modules.bin\appcenter.cmd failed with return code: 3
Any help is most appreciated.

Dotnet Core NuGet package dependency build issue on Azure DevOps

With no changes at all to source code or pipelines, I am now experiencing an issue where none of my build pipelines work anymore in Azure DevOps. The package that is being referenced isn't a dependency for this project, nor has it ever been. I can't work out what's causing this or how I can go about troubleshooting.
2018-11-26T10:25:14.2812751Z Restoring packages for C:\Agent\_work\19\s\OrchestrateIT.Web\OrchestrateIT.csproj...
2018-11-26T10:25:14.7577515Z C:\Program Files\dotnet\sdk\2.1.400\NuGet.targets(114,5): error : Unable to load the service index for source https://orchestrate-it.pkgs.visualstudio.com/_packaging/Shared_DBUpdate/nuget/v3/index.json. [C:\Agent\_work\19\s\OrchestrateIT.DataImportScheduler\OrchestrateIT.DataImportScheduler.csproj]
2018-11-26T10:25:14.7577910Z C:\Program Files\dotnet\sdk\2.1.400\NuGet.targets(114,5): error : Response status code does not indicate success: 401 (Unauthorized). [C:\Agent\_work\19\s\OrchestrateIT.DataImportScheduler\OrchestrateIT.DataImportScheduler.csproj]
2018-11-26T10:25:14.7579439Z 0 Warning(s)
2018-11-26T10:25:14.7579628Z 1 Error(s)
2018-11-26T10:25:14.7579743Z
2018-11-26T10:25:14.7579902Z Time Elapsed 00:00:02.18
2018-11-26T10:25:14.7906687Z ##[error]Error: C:\Program Files\dotnet\dotnet.exe failed with return code: 1
Local (manual) build works fine. I have already tried clearing Nuget cache and VSTS agent cache. A quick workaround might be to solve the authorisation issue (even though the package isn't required) however I'm not sure how to go about doing this.
Any advice would be greatly appreciated.
Even though my Personal Access Token had not expired, for some reason I needed to remove and add this package back to my sources with the same PAT. This resolved the authentication issue and therefore resolved the build issue.
It is still unclear to me as to why this package is being considered as a dependency for this project though.

Facing issue while building Corda Version 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

MbUnit tests pass when run directly from visual studio, but fails when run via command line

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.

Resources