【发布时间】:2020-06-16 02:30:10
【问题描述】:
在新提议的事务上收集签名时,Corda 由于命名空间冲突而抛出了OverlappingAttachmentsException。错误消息似乎是正确的,因为在node_attachments 表中有两个附件包含相同的合同命名空间。
net.corda.core.contracts.TransactionVerificationException$OverlappingAttachmentsException:
Multiple attachments define a file at com/foo/company/<state>/api/v2/orderdetails.class., transaction: 1C1985615C0B53F228B22B2C4F05CE039CC6C577A87E3B2FC9AA2CB00ED5FC43
at net.corda.core.serialization.internal.AttachmentsClassLoader.checkAttachments(AttachmentsClassLoader.kt:272) ~[corda-core-4.3.jar:?]
at net.corda.core.serialization.internal.AttachmentsClassLoader.<init>(AttachmentsClassLoader.kt:132) ~[corda-core-4.3.jar:?]
at net.corda.core.serialization.internal.AttachmentsClassLoaderBuilder$withAttachmentsClassloaderContext$serializationContext$1.apply(AttachmentsClassLoader.kt:325) ~[corda-core-4.3.jar:?]
at net.corda.core.serialization.internal.AttachmentsClassLoaderBuilder$withAttachmentsClassloaderContext$serializationContext$1.apply(AttachmentsClassLoader.kt:298) ~[corda-core-4.3.jar:?]
at java.util.HashMap.computeIfAbsent(HashMap.java:1127) ~[?:1.8.0_212]
at java.util.Collections$SynchronizedMap.computeIfAbsent(Collections.java:2672) ~[?:1.8.0_212]
at net.corda.core.serialization.internal.AttachmentsClassLoaderBuilder.withAttachmentsClassloaderContext(AttachmentsClassLoader.kt:323) ~[corda-core-4.3.jar:?]
at net.corda.core.serialization.internal.AttachmentsClassLoaderBuilder.withAttachmentsClassloaderContext$default(AttachmentsClassLoader.kt:319) ~[corda-core-4.3.jar:?]
at net.corda.core.transactions.LedgerTransaction.internalPrepareVerify$core(LedgerTransaction.kt:146) ~[corda-core-4.3.jar:?]
at net.corda.core.transactions.LedgerTransaction.verify(LedgerTransaction.kt:136) ~[corda-core-4.3.jar:?]
at net.corda.core.flows.CollectSignaturesFlow.call(CollectSignaturesFlow.kt:103) ~[corda-core-4.3.jar:?]
at net.corda.core.flows.CollectSignaturesFlow.call(CollectSignaturesFlow.kt:67) ~[corda-core-4.3.jar:?]
Corda 在验证期间从哪里加载附件文件?我的印象是 Corda 只会从部署到节点的 cordapps 文件夹的 cordapps 中加载验证合同,而不会尝试使用保存在 node_attachments 表中的合同。
如果 Corda 确实从节点库中加载了合约,那么在部署新合约 cordapp 的任何时候它都应该有一个唯一的包命名空间吗?
作为参考,此错误发生在测试 cordapp 升级到 Corda 4.3 的过程中。
【问题讨论】:
标签: corda