java[R3 Corda]找不到com的合同附件。样板IOUContractnull
当我运行教程时:Hello, World!
Pt。2-合同约束有错误:
Cannot find contract attachments for com.template.IOUContractnull.
我从模板开始,然后完成helloword1。你好,我跑得很好
...build\nodes\PartyA\logs\node-clay-PC.log
--- Transition of flow [3d6b6d20-bc45-4e71-831a-b0cddd89b50d] ---
Timestamp: 2019-07-02T11:57:54.562Z
Event: Error(exception=net.corda.core.transactions.MissingContractAttachments: Cannot find contract attachments for com.template.IOUContractnull. See https://docs.corda.net/api-contract-constraints.html#debugging)
Actions:
RollbackTransaction
ScheduleEvent(event=DoRemainingWork)
Continuation: ProcessEvents
Diff between previous and next state:
checkpoint.errorState:
Clean
Errored(errors=[FlowError(errorId=-9033011467502490789, exception=net.corda.core.transactions.MissingContractAttachments: Cannot find contract attachments for com.template.IOUContractnull. See https://docs.corda.net/api-contract-constraints.html#debugging)], propagatedIndex=0, propagating=false)
isFlowResumed:
true
false
# 1 楼答案
您可能需要将其更改为:
我在Kotlin中完成了教程,并发现以下内容也适用于设置合同ID:
# 2 楼答案
在我的例子中,我没有在我的契约类签名中添加
implements Contract
(它实现了一个extends Contract
的接口)。我刚加了个符号,效果很好# 3 楼答案
请参阅以下文档的“调试”部分- https://docs.corda.net/api-contract-constraints.html
文件-
在日志中,合同名称记录为“com.template.IOUContractnull”而不是“com.template.IOUContract”
请检查IOUContract类中的ID值