NotaryFlow $ Client未注册Corda义务代码中的错误

时间:2018-09-29 00:11:32

标签: corda

我正在使用Corda Enterprise 3.1和R3的Obligation示例代码在Linux服务器环境中进行一些测试。当我尝试执行流时,从启动该流的节点的日志中的公证人那里获得了异常。我在下面粘贴了日志条目。所有节点都被识别为有效节点,但是该消息似乎表明未注册公证流程的客户端。我在哪里注册?我要注册什么?

正在执行的代码是:

val flowHandle = service.proxy.startFlowDynamic(
                IssueObligation.Initiator::class.java,
                issueAmount,
                lenderIdentity,
                true
        )

日志显示此堆栈跟踪:

[INFO ] 2018-09-27T23:07:51,522Z [nioEventLoopGroup-2-2] netty.AMQPChannelHandler.invoke - Handshake completed with subject: O=Notary, L=London, C=GB {allowedRemoteLegalNames=O=Notary, L=London, C=GB, localCert=O=PartyB, L=New York, C=US, remoteAddress=xxxxx:10102, remoteCert=O=Notary, L=London, C=GB, serverMode=false}
[INFO ] 2018-09-27T23:07:51,524Z [nioEventLoopGroup-2-2] bridging.AMQPBridgeManager$AMQPBridge.invoke - Bridge Connected {bridgeName=internal.peers.DLCYA2tcXLrUnF9bkTMwouBuHooVn416Dc8Gk8JBaze4Gk -> xxxxx:10102, legalNames=O=Notary, L=London, C=GB, maxMessageSize=10485760, queueName=internal.peers.DLCYA2tcXLrUnF9bkTMwouBuHooVn416Dc8Gk8JBaze4Gk, target=xxxxx:10102}
[INFO ] 2018-09-27T23:07:51,530Z [nioEventLoopGroup-2-2] engine.ConnectionStateMachine.invoke - Connection local open org.apache.qpid.proton.engine.impl.ConnectionImpl@2e08c638 {localLegalName=O=PartyB, L=New York, C=US, remoteLegalName=O=Notary, L=London, C=GB, serverMode=false}
[INFO ] 2018-09-27T23:07:56,988Z [flow-worker] corda.flow.run - Flow threw exception... sending to flow hospital {actor_id=user1, actor_owningIdentity=O=PartyB, L=New York, C=US, actor_store_id=NODE_CONFIG, fiber-id=10396171, flow-id=af75a3d3-402c-45e2-89af-48dce5b11998, invocation_id=1399fb77-c4ed-4a09-972b-76c6ffb09bdc, invocation_timestamp=2018-09-27T23:07:49.588Z, session_id=d3c04d4a-f722-4cbd-95ec-dd2f744a36cd, session_timestamp=2018-09-27T23:05:30.595Z, thread-id=201, tx_id=2D94EABC8EBE902AC24A64A2562C293A1FB26747D0A04821A497FD333944F220}
net.corda.core.flows.UnexpectedFlowEndException: class net.corda.core.flows.NotaryFlow$Client is not registered
            at net.corda.node.services.statemachine.FlowStateMachineImpl.processEventsUntilFlowIsResumed(FlowStateMachineImpl.kt:166) ~[corda-node-3.1.jar:?]
            at net.corda.node.services.statemachine.FlowStateMachineImpl.suspend(FlowStateMachineImpl.kt:396) ~[corda-node-3.1.jar:?]
            at net.corda.core.flows.FlowLogic.sendAndReceiveWithRetry$core(FlowLogic.kt:245) ~[corda-core-3.1.jar:?]
            at net.corda.core.flows.NotaryFlow$Client.sendAndReceiveNonValidating(NotaryFlow.kt:140) ~[corda-core-3.1.jar:?]
            at net.corda.core.flows.NotaryFlow$Client.notarise(NotaryFlow.kt:94) ~[corda-core-3.1.jar:?]
            at net.corda.core.flows.NotaryFlow$Client.call(NotaryFlow.kt:65) ~[corda-core-3.1.jar:?]
            at net.corda.core.flows.NotaryFlow$Client.call(NotaryFlow.kt:45) ~[corda-core-3.1.jar:?]

1 个答案:

答案 0 :(得分:0)

这是由于未配置公证人。结果,它没有为NotaryFlow$Client安装响应程序流。

您收到的跟踪错误net.corda.core.transactions.FilteredTransaction cannot be cast to net.corda.core.transactions.SignedTransaction.表示,请求公证的节点将公证人错误地标识为无效的,而不是有效的。结果,它发送了错误的交易类型。