首页 > 解决方案 > 将 Corda 节点迁移到 Corda 4.3 时休眠

问题描述

在升级到 Corda Open Source 4.3 时,我在节点启动时遇到了这个错误。这是 Corda 要求的使用 Hibernate 5.4.3。

[ERROR] 2019-12-18T16:17:25,820Z [main] internal.NodeStartupLogging. - Exception during node startup: Could not create Hibernate configuration: 
The [com.foo.BarSchema$NotificationState] and [com.foo.v2.BarSchema$NotificationState] entities share the same JPA entity name: [BarSchema$NotificationState] which is not allowed! [errorCode=3elmpn, moreInformationAt=https://errors.corda.net/OS/4.3/3elmpn]
net.corda.nodeapi.internal.persistence.HibernateConfigException: Could not create Hibernate configuration: 
The [com.foo.BarSchema$NotificationState] and [com.foo.v2.BarSchema$NotificationState] entities share the same JPA entity name: [BarSchema$NotificationState] which is not allowed!

标签: hibernatecorda

解决方案


这是由 Hibernate 中的一个已知问题引起的,如下所述:https ://hibernate.atlassian.net/browse/HHH-13060

正如评论中所建议的,设置实体名称注释可以解决异常。


推荐阅读