首页 > 解决方案 > 运行corda时单元测试失败示例CorDapp(IOU)

问题描述

当我为corda示例cordapp运行单元测试时,我收到以下错误。任何想法都会有所帮助。

Caused by: java.lang.IllegalArgumentException: Could not find Party for Anonymous(DLEyNjQtQZHUgbZs7xwjivUPiaCz9pdgb49wWKaSjCTfq8)
at net.corda.core.identity.IdentityUtils.groupAbstractPartyByWellKnownParty(IdentityUtils.kt:47)
at net.corda.core.identity.IdentityUtils.groupPublicKeysByWellKnownParty(IdentityUtils.kt:21)
at net.corda.core.identity.IdentityUtils.groupPublicKeysByWellKnownParty(IdentityUtils.kt:33)
at net.corda.core.flows.CollectSignaturesFlow.call(CollectSignaturesFlow.kt:107)
at net.corda.core.flows.CollectSignaturesFlow.call(CollectSignaturesFlow.kt:64)
at net.corda.core.flows.FlowLogic.subFlow(FlowLogic.kt:290)
at com.example.flow.ExampleFlow$Initiator.call(ExampleFlow.java:112)
at com.example.flow.ExampleFlow$Initiator.call(ExampleFlow.java:33)
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:96)
at net.corda.node.services.statemachine.FlowStateMachineImpl.run(FlowStateMachineImpl.kt:44)
at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1092)
at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:788)
at co.paralleluniverse.fibers.RunnableFiberTask.doExec(RunnableFiberTask.java:100)
at co.paralleluniverse.fibers.RunnableFiberTask.run(RunnableFiberTask.java:91)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at net.corda.node.utilities.AffinityExecutor$ServiceAffinityExecutor$1$thread$1.run(AffinityExecutor.kt:62)

我可以按照指南创建 IOU,但是单元测试失败。我从官网下载了代码,没有做任何更改。

标签: corda

解决方案


这个问题通过重新下载解决了corda-3.2.jar


推荐阅读