观察员将现金结果重新发布到错误“ java.util.NoSuchElementException:集合中没有与谓词匹配的元素”。

时间:2018-11-30 15:26:49

标签: corda

我设置了Corda网络,如下所示:

2个银行节点

1个中央银行节点(观察员)

1名公证人

我已从中央银行向每个银行节点发行现金。 对于发行现金使用“ CashIssueAndPaymentFlow”。我也可以多次向同一节点发行现金。

然后尝试从一个银行节点到中央银行为观察者的另一银行节点进行交易。

交易完成后,当我尝试向任何银行节点发行现金时,出现以下错误:

java.util.NoSuchElementException: Collection contains no element matching the predicate.
        at net.corda.node.services.keys.PersistentKeyManagementService.getSigningKeyPair(PersistentKeyManagementService.kt:110) ~[corda-node-3.3-corda.jar:?]
        at net.corda.node.services.keys.PersistentKeyManagementService.sign(PersistentKeyManagementService.kt:101) ~[corda-node-3.3-corda.jar:?]
        at net.corda.core.transactions.TransactionBuilder.toSignedTransaction(TransactionBuilder.kt:224) ~[corda-core-3.3-corda.jar:?]
        at net.corda.core.node.ServiceHub$DefaultImpls.signInitialTransaction(ServiceHub.kt:219) ~[corda-core-3.3-corda.jar:?]
        at net.corda.core.node.ServiceHub$DefaultImpls.signInitialTransaction(ServiceHub.kt:233) ~[corda-core-3.3-corda.jar:?]
        at net.corda.node.services.api.ServiceHubInternal$DefaultImpls.signInitialTransaction(ServiceHubInternal.kt) ~[corda-node-3.3-corda.jar:?]
        at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl.signInitialTransaction(AbstractNode.kt:836) ~[corda-node-3.3-corda.jar:?]
        at net.corda.core.node.ServiceHub$DefaultImpls.signInitialTransaction(ServiceHub.kt:255) ~[corda-core-3.3-corda.jar:?]
        at net.corda.node.services.api.ServiceHubInternal$DefaultImpls.signInitialTransaction(ServiceHubInternal.kt) ~[corda-node-3.3-corda.jar:?]
        at net.corda.node.internal.AbstractNode$ServiceHubInternalImpl.signInitialTransaction(AbstractNode.kt:836) ~[corda-node-3.3-corda.jar:?]
        at net.corda.finance.flows.CashPaymentFlow.call(CashPaymentFlow.kt:66) ~[corda-finance-3.3-corda.jar:?]
        at net.corda.finance.flows.CashPaymentFlow.call(CashPaymentFlow.kt:26) ~[corda-finance-3.3-corda.jar:?]
        at net.corda.core.flows.FlowLogic.subFlow(FlowLogic.kt:290) ~[corda-core-3.3-corda.jar:?]
        at net.corda.finance.flows.CashIssueAndPaymentFlow.call(CashIssueAndPaymentFlow.kt:41) ~[corda-finance-3.3-corda.jar:?]
        at net.corda.finance.flows.CashIssueAndPaymentFlow.call(CashIssueAndPaymentFlow.kt:24) ~[corda-finance-3.3-corda.jar:?]
        at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:96) [corda-node-3.3-corda.jar:?]
        at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:44) [corda-node-3.3-corda.jar:?]
        at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1092) [quasar-core-0.7.9-jdk8.jar:0.7.9]
        at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:788) [quasar-core-0.7.9-jdk8.jar:0.7.9]

用简单的话来说,就是从中央银行发行的现金,并且还保留中央银行作为观察员。几次交易后,再次尝试发行现金会出现上述错误。

用于上述功能的Corda版本是V3.3。

为此提供一些指导。

1 个答案:

答案 0 :(得分:0)

第二次运行时问题流将失败,这似乎很奇怪。 您是否对拍卖cordapp做了很多修改?此外,您能否分享实现这一目标的步骤?

您能在最新版本的Corda上重现吗?

对于任何想知道的人,这里引用的代码示例似乎就是这个示例:https://github.com/corda/samples-java/tree/master/Advanced/auction-cordapp