我正在使用这个演示。CordaFTPdemo可获得实际操作的附件。然而,我发现大文件无法传输,并给出了一个异常
java.lang.IllegalArgumentException: Missing validated user from the Artemis message
ServerSession doesn't set validated users when called from slowPacketHandler in ServerSessionPacketHandler.
JIRA在这里问题是当我更新build.gradle以强制为阿尔忒弥斯版本2.5.0时。它就是不起作用。当我检查渐变依赖项时树,它有2.5.0,那么为什么Corda jar在类路径中拾取2.2.0是未知的——我可以在节点日志中看到它。我已经删除了它/gradle文件夹,并清除所有缓存并尝试。下面是我的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"
}
这似乎是Corda 3.1操作系统中的一个错误。我在这里报告过:https://github.com/corda/corda/issues/3649.