CordaFTP Unable to transfer Large files because of

2019-08-07 17:58发布

I'm using this demo.CordaFTPdemo to get hands-on attachment. However, I figured out that large files cannot be transferred and are giving an exception

java.lang.IllegalArgumentException: Missing validated user from the Artemis message

ServerSession doesn't set validated users when called from slowPacketHandler in ServerSessionPacketHandler.

JIRA Here The thing is when I update the build.gradle to force to version 2.5.0 for Artemis. it just doesn't work. when I checked the gradle dependencies tree it has 2.5.0, then why is it that Corda jar is picking up 2.2.0 in classpath is unknown I can see it in the nodes logs. I've already deleted it ./gradle folder and cleared all cached and tried. below is my chaned build.gradle :

buildscript {
    ext.corda_release_version = '3.1-corda'
    ext.corda_gradle_plugins_version = '3.1.0'
    ext.quasar_version = '0.7.9'
    ext.junit_version = '4.12'
    ext.spring_boot_version = '2.0.2.RELEASE'
    ext.corda_release_group = 'net.corda'
    ext.kotlin_version = '1.1.60'

    ext.username = "corda"
    ext.password = "corda_initial_password"
    ext.client_port = 10009

    repositories {
        mavenLocal()
        mavenCentral()
        jcenter()
    }

    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"
        classpath "io.spring.gradle:dependency-management-plugin:1.0.5.RELEASE"

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

apply plugin: 'kotlin'
apply plugin: "io.spring.dependency-management"
apply plugin: 'net.corda.plugins.cordapp'
apply plugin: 'net.corda.plugins.cordformation'
apply plugin: 'net.corda.plugins.quasar-utils'

dependencyManagement {
    dependencies {
        dependencySet(group: 'org.apache.activemq', version: '2.5.0') {
            entry 'artemis-amqp-protocol'
            entry 'artemis-commons'
            entry 'artemis-core-client'
            entry 'artemis-jdbc-store'
            entry 'artemis-jms-client'
            entry 'artemis-journal'
            entry 'artemis-native'
            entry 'artemis-selector'
            entry 'artemis-server'
        }
    }
}

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

dependencies {
    compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
    testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
    testCompile "junit:junit:$junit_version"

    // Corda integration dependencies
    cordaCompile "$corda_release_group:corda-core:$corda_release_version"
    cordaCompile "$corda_release_group:corda-finance:$corda_release_version"
    cordaCompile "$corda_release_group:corda-jackson:$corda_release_version"
    cordaCompile "$corda_release_group:corda-rpc:$corda_release_version"
    cordaCompile "$corda_release_group:corda-node-api:$corda_release_version"
    cordaCompile "$corda_release_group:corda-webserver-impl:$corda_release_version"
    cordaRuntime "$corda_release_group:corda:$corda_release_version"
    cordaRuntime "$corda_release_group:corda-webserver:$corda_release_version"
    testCompile "$corda_release_group:corda-test-utils:$corda_release_version"
    testCompile "$corda_release_group:corda-node-driver:$corda_release_version"

    // GraphStream: For visualisation (required by TemplateClientRPC app)
    compile "org.graphstream:gs-core:1.3"
    compile("org.graphstream:gs-ui:1.3") {
        exclude group: "bouncycastle"
    }

    // CorDapp dependencies
    // Specify your cordapp's dependencies below, including dependent cordapps

    compile "io.reactivex:rxjava:1.2.4"
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
    kotlinOptions {
        languageVersion = "1.1"
        apiVersion = "1.1"
        jvmTarget = "1.8"
        javaParameters = true   // Useful for reflection.
    }
}

def copyConfigTask(nodeName) {
    return tasks.create("copy${nodeName}", Copy) {
        from "${nodeName}.json"
        into "./build/nodes/${nodeName}/"
        rename {
            "cordaftp.json"
        }
    }
}

task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar', copyConfigTask("CorpA"), copyConfigTask("CorpB")]) {
    directory "./build/nodes"
    node {
        name "O=R3Corp,OU=corda,L=London,C=GB"
        notary = [validating : false]
        p2pPort 10002
        rpcSettings {
            address("localhost:10003")
            adminAddress("localhost:10043")
        }
        cordapps = []
    }
    node {
        name "O=CorpA,L=Paris,C=FR"
        p2pPort 10005
        rpcSettings {
            address("localhost:10006")
            adminAddress("localhost:10046")
        }
        extraConfig = [
                jvmArgs : [ "-Xmx1g"],
                attachmentContentCacheSizeMegaBytes: 100
        ]
        cordapps = []
        // TODO: Replace username / password with vars such that we can DRY the username, password
        rpcUsers = [[ "user": "corda", "password": "corda_initial_password", "permissions": ["ALL"]]]
    }
    node {
        name "O=CorpB,L=Rome,C=IT"
        p2pPort 10008
        rpcSettings {
            address("localhost:10009")
            adminAddress("localhost:10049")
        }
        extraConfig = [
                jvmArgs : [ "-Xmx1g"],
                attachmentContentCacheSizeMegaBytes: 100
        ]
        cordapps = []
        // TODO: Ditto
        rpcUsers = [[ "user": "corda", "password": "corda_initial_password", "permissions": ["ALL"]]]
    }
}

task(runClientB, dependsOn: 'classes', type: JavaExec) {
    classpath = sourceSets.main.runtimeClasspath
    main = 'net.corda.cordaftp.SenderKt'
    args "localhost:$client_port", "$username", "$password", "build/nodes/CorpB/cordaftp.json"
}

1条回答
手持菜刀,她持情操
2楼-- · 2019-08-07 18:25

This appears to be a bug in Corda 3.1 OS. I have reported it here: https://github.com/corda/corda/issues/3649.

查看更多
登录 后发表回答