Hibernate——报错:org.hibernate.mapping.UnionSubclass cannot be cast to org.hibernate.mapping.RootClass
来源:互联网 发布:arm linux gcc 4.5.1 编辑:程序博客网 时间:2024/06/05 18:20
在使用Hibernate时,出现了如下错误:
Caused by: java.lang.ClassCastException: org.hibernate.mapping.UnionSubclass cannot be cast to org.hibernate.mapping.RootClass
错误原因在于:
在父类中定义并配置了主键之后,又在子类中重复定义并配置了主键。
结果方法:
删除子类中主键及其配置。
1 0
- Hibernate——报错:org.hibernate.mapping.UnionSubclass cannot be cast to org.hibernate.mapping.RootClass
- hibernate - org.hibernate.type.StringType cannot be cast to org.hibernate.type.VersionType
- org.hibernate.type.StringType cannot be cast to org.hibernate.type.VersionType
- org.hibernate.hql.ast.HqlToken cannot be cast to org.hibernate.hql.ast.HqlToken
- JPA问题解决(1)--org.hibernate.jpa.internal.QueryImpl cannot be cast to javax.management.Query报错问题
- org.hibernate.mapping.Column.java
- org.hibernate.mapping.Table.java
- java.lang.ClassCastException: org.hibernate.impl.SessionFactoryImpl cannot be cast to org.springfram
- Caused by: java.lang.ClassCastException: org.hibernate.type.StringType cannot be cast to org.hiberna
- org.springframework.orm.hibernate4.SessionHolder cannot be cast to org.springframework.orm.hibernate
- Caused by: java.lang.ClassCastException: org.hibernate.type.StringType cannot be cast to org.hiberna
- org.springframework.orm.hibernate4.SessionHolder cannot be cast to org.springframework.orm.hibernate
- java.lang.ClassCastException: org.hibernate.impl.QueryImpl cannot be cast to java.util.List
- org.hibernate.impl.QueryImpl cannot be cast to java.util.List
- 【Error】org.hibernate.ejb.HibernatePersistence cannot be cast to javax.persist
- java.lang.ClassCastException: org.hibernate.impl.QueryImpl cannot be cast to UserActivity
- org.hibernate.transaction.JDBCTransaction cannot be cast to javax.transaction.Transaction
- java.lang.ClassCastException: org.hibernate.impl.SQLQueryImpl cannot be cast to java.util.List
- Unity3D学习笔记(十九)敌人AI
- Windows命令:Net使用详解
- swift部分控件学习 源码集合
- Android上实现仿IOS弹性ScrollView
- Unity3D学习笔记(二十)用键盘选取/切换目标生物
- Hibernate——报错:org.hibernate.mapping.UnionSubclass cannot be cast to org.hibernate.mapping.RootClass
- HDU 1754 I Hate It(区间最值问题&线段树)
- 感受5.12汶川大地震
- 第一次被狗咬
- 南非世界杯-我在南非(二)
- 我的博客今天2岁187天啦!
- 构想我的新浪博客
- 我对网赚的看法(教程,经典,注册…
- 其实减肥很容易