首页 > 解决方案 > 索引 0 {} 处缺少参数名称

问题描述

我尝试在bootcamp-cordapp基础上编写一个 demo - deliverydemo ,并参考cordapp-example我自己的订单流程。通过命令“build/nodes/runnodes”启动 Party AC 和 Notary 后:

  1. TokenIssueFlow 有效。
  2. 我可以通过 CLI 中的“流列表”命令查看我的订单流。但是在尝试启动我的订单流程时得到“索引 0 {} 处缺少参数名称”。

Thu Jul 26 09:41:51 CST 2018>>> 流程开始 OrderPlaceFlow$OrderPlaceRequestFlow 买方:PartyB,卖方:PartyC,salesPrice:12.9,预付款:0.1 流程开始 OrderPlaceFlow$OrderPlaceRequestFlow 买方:PartyB,卖方:PartyC,salesPrice:12.9, downPayments:0.1:异常:无法解析为命令:方法 lambda$call$6 在索引 0 处缺少参数名称 Thu Jul 26 09:41:55 CST 2018>>> E 09:41:55+0800 [pool-8- thread-8] command.CRaSHSession.execute - 评估请求时出错'流程开始 OrderPlaceFlow$OrderPlaceRequestFlow 买方:PartyB,卖方:PartyC,sellingPrice:12.9,downPayments:0.1'流程开始 OrderPlaceFlow$OrderPlaceRequestFlow 买方:PartyB,卖方:PartyC,salesPrice :12.9,downPayments:0.1:异常:无法解析为命令:方法 lambda$call$6 在索引 0 处缺少参数名称 {} net.corda.client.jackson.StringToMethodCallParser$UnparseableCallException$ReflectionDataMissing:无法解析为命令:方法 lambda$call$6 在 net.corda 的索引 0 处缺少参数名称。 client.jackson.StringToMethodCallParser.paramNamesFromMethod(StringToMethodCallParser.kt:131) ~[corda-jackson-corda-3.0.jar:?]


Thu Jul 26 09:38:32 CST 2018>>> 流列表 com.cienet.deliverydemo.order.OrderPlaceFlow$OrderPlaceRequestFlow com.cienet.deliverydemo.token.TokenIssueFlow net.corda.core.flows.ContractUpgradeFlow$Authorise net.corda。 core.flows.ContractUpgradeFlow$Deauthorise net.corda.core.flows.ContractUpgradeFlow$Initiate

2018 年 7 月 26 日星期四 09:38:34 CST>>>


public OrderPlaceRequestFlow(Party buyer, Party seller, float sellingPrice, float downPayments) {
    this.buyer = buyer;
    this.seller = seller;
    this.sellingPrice = sellingPrice;
    this.downPayments = downPayments;
}

标签: corda

解决方案


我仍然不知道为什么,但这在构建干净并通过以下方式重新构建后起作用:

./gradlew clean
./gradlew test
./gradlew deployNodesJava -Poffline=true

推荐阅读