javax.persistence.PersistenceException:org.hibernate.type.SerializationException:无法反序列化 [英] javax.persistence.PersistenceException: org.hibernate.type.SerializationException: could not deserialize

查看:1451
本文介绍了javax.persistence.PersistenceException:org.hibernate.type.SerializationException:无法反序列化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在hibernate中执行Criteria Query时,出现以下异常:

  javax.persistence.PersistenceException:javax.persistence .PersistenceException:org.hibernate.type.SerializationException:无法反序列化:无法反序列化

可能是什么问题是什么?



PS:虽然可能不相关,但我的hibernate版本是hibernate-4.0.1 final。

解决方案

问题是被引用的实体对实体有另一个引用,并且该关系没有被任何 @OneToMany 注释 - 像注释。


When executing a Criteria Query in hibernate, I get the following exception:

javax.persistence.PersistenceException: javax.persistence.PersistenceException: org.hibernate.type.SerializationException: could not deserialize: could not deserialize

What could be the problem?

PS: although possibly not relevant, my hibernate version is hibernate-4.0.1 final.

解决方案

The problem was that a referenced entity had another reference to an entity and the relationship was NOT annotated by any of the @OneToMany-like annotations.

这篇关于javax.persistence.PersistenceException:org.hibernate.type.SerializationException:无法反序列化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆