hibernate - 将 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!
解决方案
这是由 Hibernate 中的一个已知问题引起的,如下所述:https ://hibernate.atlassian.net/browse/HHH-13060
正如评论中所建议的,设置实体名称注释可以解决异常。
推荐阅读
- css - 在 Atom-editor 中通过项目路径设置不同的样式
- javascript - Google Places API 自动完成性能逐渐变慢
- java - ContextLoaderListener 触发器 applicationContext.xml 文件未找到
- facebook - 适用于非企业帐户的 Instagram API
- vb.net - 通过 Outlook 使用 ical 发送会议请求
- javascript - 获取包含空格的命令参数
- r - 从坐标中检索人口普查区
- asp.net - 在 ASP.Net MVC 中重定向时将带有 QueryString 的注册用户电子邮件发送到登录页面
- c# - 在 C# 中识别对 IP 地址的 ping 请求?
- javascript - 从php代码块调用带有php变量作为参数的javascript函数