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 "Run vaultQuery contractStateType: com.template.contract.SellOrderContract$SellOrderState" #54

Open
Arth-Ro opened this issue Mar 13, 2019 · 0 comments

Comments

@Arth-Ro
Copy link

Arth-Ro commented Mar 13, 2019

Since I upgraded to v4.0 I get an error :

When I run run vaultQuery contractStateType: com.template.contract.SellOrderContract$SellOrderState

If there are no SellOrderStates in the vault everything is fine I get the List with no states.
If there is one I get : RPC failed: java.lang.IllegalStateException: Jackson didn't provide serialisers for [ISIN]

And ISIN is just a String defined in the state.

Once again this was working in v3.2

To reproduce :

  • Start a node with corda release v4.
  • open the node's shell,
  • without commiting any state : run vaultQuery contractStateType:
    -> should return an empty set
  • run a flow that will commit a state to the vault (ideally with a String argument)
  • run vaultQuery contractStateType:
    -> That should return the serialization issue
gradle files : 
   buildscript {
      ext {
        corda_release_group = 'net.corda'
        corda_release_version = '4.0'
        corda_gradle_plugins_version = '4.0.42'
        kotlin_version = '1.2.71'
        junit_version = '4.12'
        quasar_version = '0.7.10'
        spring_boot_version = '2.0.2.RELEASE'
        spring_boot_gradle_plugin_version = '2.0.2.RELEASE'
        slf4j_version = '1.7.25'
        log4j_version = '2.11.2'
        corda_platform_version = '4'
    }

    repositories {
        mavenCentral()
        jcenter()
        maven {
            url 'https://ci-artifactory.corda.r3cev.com/artifactory/corda-releases'
        }
        mavenLocal()
    }

    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "net.corda.plugins:cordapp:$corda_gradle_plugins_version"
        classpath "net.corda.plugins:cordformation:$corda_gradle_plugins_version"
        classpath "net.corda.plugins:quasar-utils:$corda_gradle_plugins_version"
    }
 }

 allprojects {
    apply plugin: 'kotlin'

    repositories {
        jcenter()
        mavenCentral()
        maven { url 'https://ci-artifactory.corda.r3cev.com/artifactory/corda-releases' }
        maven { url 'https://jitpack.io' }
        mavenLocal()
     }

    configurations {
        compile {
            // We want to use SLF4J's version of these bindings: jcl-over-slf4j
            // Remove any transitive dependency on Apache's version.
            exclude group: 'commons-logging', module: 'commons-logging'
        }
    }

//    tasks.withType(JavaCompile) {
//        options.compilerArgs << "-parameters" // Required for shell commands.
//    }

    jar {
        // CorDapps do not configure a Node's logging.
        exclude '**/log4j2*.xml'
    }
 }

 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

 apply plugin: 'kotlin'
 apply plugin: 'net.corda.plugins.cordapp'

 jar.baseName = "cordapp-liquidshare-contracts"

 cordapp {
    targetPlatformVersion corda_platform_version.toInteger()
    minimumPlatformVersion corda_platform_version.toInteger()
    contract {
        name "Liquidshare CorDapp"
        vendor "Liquidshare"
        licence "Apache License, Version 2.0"
        versionId 1
    }
 }

 dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

    // Corda dependencies.
    cordaCompile "$corda_release_group:corda-core:$corda_release_version"

    testCompile "$corda_release_group:corda-node-driver:$corda_release_version"
 }


 tasks.withType(KotlinCompile) {
    kotlinOptions {
        languageVersion = "1.2"
        apiVersion = "1.2"
        jvmTarget = "1.8"
        javaParameters = true   // Useful for reflection.
    }
 }
`
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

1 participant