Giter VIP home page Giter VIP logo

bootcamp-cordapp's Issues

bootcamp.TokenState is not a net.corda.core.contracts.ContractState

I am using JDK 1.8 version and following all the README.md steps.
On running the nodes, pop up windows come for Notary, PartyA, PartyB and PartyC properly.

Terminal for PartyA - trying to issue the amount to PartyC

Fri Jun 12 11:13:47 IST 2020>>> start TokenIssueFlowInitiator owner: PartyC, amount: 1000
Starting

Terminal for PartyC - trying to check the vault of PartyC

Fri Jun 12 11:16:17 IST 2020>>> run vaultQuery contractStateType: bootcamp.TokenState
RPC failed: net.corda.core.CordaRuntimeException: java.lang.IllegalArgumentException: bootcamp.TokenState is not a net.corda.core.contracts.ContractState

This error is actually coming for all the nodes.

TokenState.java - This file has TokenState implementing ContractState

@BelongsToContract(TokenContract.class)
public class TokenState implements ContractState {
    private final Party issuer;
    private final Party owner;
    private final int amount;
    private final List<AbstractParty> participants;

    public TokenState(Party issuer, Party owner, int amount){
        this.issuer = issuer;
        this.owner = owner;
        this.amount = amount;
        this.participants = new ArrayList<>();
        participants.add(issuer);
        participants.add(owner);
    }

    @NotNull
    @Override
    public List<AbstractParty> getParticipants() {
        return Arrays.asList(issuer, owner);
    }

    public Party getIssuer() {
        return issuer;
    }

    public Party getOwner() {
        return owner;
    }

    public int getAmount() {
        return amount;
    }
}

What could be the issue here?

Warning:Class 'ProjectImportedOKTest' not found in module 'bootcamp-cordapp-4'

Sorry to bother you....I really encounter trouble.
In the begining, when I want to run ProjectImportedOKTest, the intellJ idea will tell me:
2019-08-30 20-04-49 的屏幕截图

next, I choose
Use classpath of module:bootcamp-cordapp-4
JRE to be 1.8,
like the next picture, however, the intellJ idea will still tell me:

Warning:Class 'ProjectImportedOkTest' not found in module 'bootcamp-cordapp-4'
If I choose the other options, the intellJ idea will still warn me, could you tell me how to solve it?
2019-08-30 20-10-09 的屏幕截图
sorry to bother, not only I'm a beginner of corda, but also one of java.

☠ The piece of art was not found in ArtFlowInitiator Project

Hi

I am facing the issue in calling the Art project code.

start ArtFlowInitiator title: isha, artist: PartyA, newOwner: PartyB

 Error says this

`[ERROR] 15:15:10+0530 [Node thread-1] proxies.ExceptionSerialisingRpcOpsProxy.log - Error during RPC invocation [errorCode=1j2bz3l, moreInformationAt=https://errors.corda.net/OS/4.0/1j2bz3l] {actor_id=internalShell, actor_owning_identity=O=Notary, L=London, C=GB, actor_store_id=NODE_CONFIG, fiber-id=10000001, flow-id=ebeb4248-260d-4af3-9cda-06a579efc8ab, invocation_id=5eede5df-7c2e-44f9-b4d5-b2446cfe01d8, invocation_timestamp=2019-03-27T09:45:09.482Z, origin=internalShell, session_id=99f38c9a-cfee-4f1e-b324-2baafb0c9b63, session_timestamp=2019-03-27T09:42:57.390Z, thread-id=140}
[ERROR] 15:15:10+0530 [Node thread-1] proxies.ExceptionSerialisingRpcOpsProxy.log - Error during RPC invocation [errorCode=1j2bz3l, moreInformationAt=https://errors.corda.net/OS/4.0/1j2bz3l] {actor_id=internalShell, actor_owning_identity=O=Notary, L=London, C=GB, actor_store_id=NODE_CONFIG, fiber-id=10000001, flow-id=ebeb4248-260d-4af3-9cda-06a579efc8ab, invocation_id=5eede5df-7c2e-44f9-b4d5-b2446cfe01d8, invocation_timestamp=2019-03-27T09:45:09.482Z, origin=internalShell, session_id=99f38c9a-cfee-4f1e-b324-2baafb0c9b63, session_timestamp=2019-03-27T09:42:57.390Z, thread-id=140}
[ERROR] 15:15:10+0530 [Node thread-1] proxies.ExceptionSerialisingRpcOpsProxy.log - Error during RPC invocation [errorCode=1j2bz3l, moreInformationAt=https://errors.corda.net/OS/4.0/1j2bz3l] {actor_id=internalShell, actor_owning_identity=O=Notary, L=London, C=GB, actor_store_id=NODE_CONFIG, fiber-id=10000001, flow-id=ebeb4248-260d-4af3-9cda-06a579efc8ab, invocation_id=5eede5df-7c2e-44f9-b4d5-b2446cfe01d8, invocation_timestamp=2019-03-27T09:45:09.482Z, origin=internalShell, session_id=99f38c9a-cfee-4f1e-b324-2baafb0c9b63, session_timestamp=2019-03-27T09:42:57.390Z, thread-id=140}
[ERROR] 15:15:10+0530 [Node thread-1] proxies.ExceptionSerialisingRpcOpsProxy.log - Error during RPC invocation [errorCode=1j2bz3l, moreInformationAt=https://errors.corda.net/OS/4.0/1j2bz3l] {actor_id=internalShell, actor_owning_identity=O=Notary, L=London, C=GB, actor_store_id=NODE_CONFIG, fiber-id=10000001, flow-id=ebeb4248-260d-4af3-9cda-06a579efc8ab, invocation_id=5eede5df-7c2e-44f9-b4d5-b2446cfe01d8, invocation_timestamp=2019-03-27T09:45:09.482Z, origin=internalShell, session_id=99f38c9a-cfee-4f1e-b324-2baafb0c9b63, session_timestamp=2019-03-27T09:42:57.390Z, thread-id=140}
[ERROR] 15:15:10+0530 [Node thread-1] proxies.ExceptionSerialisingRpcOpsProxy.log - Error during RPC invocation [errorCode=1j2bz3l, moreInformationAt=https://errors.corda.net/OS/4.0/1j2bz3l] {actor_id=internalShell, actor_owning_identity=O=Notary, L=London, C=GB, actor_store_id=NODE_CONFIG, fiber-id=10000001, flow-id=ebeb4248-260d-4af3-9cda-06a579efc8ab, invocation_id=5eede5df-7c2e-44f9-b4d5-b2446cfe01d8, invocation_timestamp=2019-03-27T09:45:09.482Z, origin=internalShell, session_id=99f38c9a-cfee-4f1e-b324-2baafb0c9b63, session_timestamp=2019-03-27T09:42:57.390Z, thread-id=140}
[ERROR] 15:15:10+0530 [Node thread-1] proxies.ExceptionSerialisingRpcOpsProxy.log - Error during RPC invocation [errorCode=1j2bz3l, moreInformationAt=https://errors.corda.net/OS/4.0/1j2bz3l] {actor_id=internalShell, actor_owning_identity=O=Notary, L=London, C=GB, actor_store_id=NODE_CONFIG, fiber-id=10000001, flow-id=ebeb4248-260d-4af3-9cda-06a579efc8ab, invocation_id=5eede5df-7c2e-44f9-b4d5-b2446cfe01d8, invocation_timestamp=2019-03-27T09:45:09.482Z, origin=internalShell, session_id=99f38c9a-cfee-4f1e-b324-2baafb0c9b63, session_timestamp=2019-03-27T09:42:57.390Z, thread-id=140}
[ERROR] 15:15:10+0530 [Node thread-1] proxies.ExceptionSerialisingRpcOpsProxy.log - Error during RPC invocation [errorCode=1j2bz3l, moreInformationAt=https://errors.corda.net/OS/4.0/1j2bz3l] {actor_id=internalShell, actor_owning_identity=O=Notary, L=London, C=GB, actor_store_id=NODE_CONFIG, fiber-id=10000001, flow-id=ebeb4248-260d-4af3-9cda-06a579efc8ab, invocation_id=5eede5df-7c2e-44f9-b4d5-b2446cfe01d8, invocation_timestamp=2019-03-27T09:45:09.482Z, origin=internalShell, session_id=99f38c9a-cfee-4f1e-b324-2baafb0c9b63, session_timestamp=2019-03-27T09:42:57.390Z, thread-id=140}

➡️ Starting
🚫 Done
☠ The piece of art was not found.
`

Can you please help me with the issue.

Offline Use Is Misleading

The section in the README "Updating for offline use" is redundant.

Once you have run the project once all your dependencies will be cached locally by gradle anyway.

This section is misleading and redundant and should be removed.

You should also remove the following lines in the build.gradle

https://github.com/corda/bootcamp-cordapp/blob/v4/build.gradle#L16
flatDir { dirs "lib/dependencies" }

https://github.com/corda/bootcamp-cordapp/blob/v4/build.gradle#L20
classpath fileTree(dir: 'lib/dependencies', include: '*.jar')

https://github.com/corda/bootcamp-cordapp/blob/v4/build.gradle#L35
flatDir { dirs "${project.rootProject.projectDir}/lib/dependencies" }

https://github.com/corda/bootcamp-cordapp/blob/v4/build.gradle#L66
compileClasspath fileTree(dir: 'lib/dependencies', include: '*.jar')

https://github.com/corda/bootcamp-cordapp/blob/v4/build.gradle#L131-L139

task gatherDependencies(type: Copy) {
    into "lib/dependencies"
    from buildscript.configurations.classpath
    from configurations.runtime
    from configurations.compile
    from configurations.testCompile
    from configurations.testRuntime
    from configurations.quasar
}

build.gradle Needs Cleaning Up

Feel free to split this out into lots of smaller issues.

Referring to the v4 branch.

The wrong version of corda is specified:

corda_release_version = '4.0-SNAPSHOT'
corda_gradle_plugins_version = '4.0.37'

There are unnecessary repos.

mavenLocal() is only useful for R3 developers using snapshots.

flatDir { dirs "lib/dependencies" } is completely unnecessary see #6 for further details

This whole section should be removed
https://github.com/corda/bootcamp-cordapp/blob/v4/build.gradle#L52-L63

sourceSets {
    main {
        resources {
            srcDir "../config/dev"
        }
    }
    test {
        resources {
            srcDir "../config/test"
        }
    }
}

In this particular case there is only one module so you don't need it anyway.

In the general case it causes circular dependencies in IDEs and confusion with users as evidenced on Slack.
The only purpose of it is to not duplicate logging config.

https://github.com/corda/bootcamp-cordapp/blob/v4/build.gradle#L83
deployNodesJava can just be deployNodes like the kotlin project.

https://github.com/corda/bootcamp-cordapp/blob/v4/build.gradle#L84
directory "./build/nodes" is the default so doesn't need to be specified.

https://github.com/corda/bootcamp-cordapp/blob/v4/build.gradle#L90
"$project.group:cordapp:$project.version" the project name is not cordapp

There is no gradle.properties specifying the project group, name, version.

There is no need to repeat the cordapp[] section in each node when you could do:

    nodeDefaults {
        projectCordapp {
            deploy = true
        }
    }

Why are there no rpc settings for the notary?

minor bootcamp repo readme issues following 15/8/2019 bootcamp

It would be convenient if the web resources links were clickable. e.g.
"Key Concepts docs (docs.corda.net/key-concepts.html)"

In "Running our CorDapp" the deployNodes gradle target is wrong
says:
macOS: ./gradlew deployNodesJava
should be:
macOS: ./gradlew deployNodes

possibly same for windows - can't comment :)

Unable to generate CorDapp jar from local project

Hi, I was following the bootcamp videos and on video 17 Corda Bootcamp 17 - Flows Exercises I ran into this error why running FlowTests.

I did try to edit configurations as the video suggests, but still the same error (which is different than the error presented in the video).
Also worth noting that I only get the same error after adding the configuration if I try to run an individual test. If I try to run the entire class, I get the message "Test events were not received".

Any idea on what might be the reason?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.