读书人

hibernate 异常 解决办法illegal acce

发布时间: 2012-10-14 14:55:07 作者: rapoo

hibernate 错误 解决方法illegal access to loading collection
最开始出现No row with the given identifier exists错误,后来发现是手动清空表时忘记删除关联表了
然后出现这个错误illegal access to loading collection,
Google了半天,后来小小一改就解决了,也不知为什么,呵呵
将pojo中的private Set student = new HashSet(0);
改为private Set student = new HashSet();就行了,不知为什么,呵呵
希望高人路过,哈哈

读书人网 >Access

热点推荐