遇到Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]异常
来源:互联网 发布:js产生不重复的随机数 编辑:程序博客网 时间:2024/05/21 07:05
你有遇到这个异常吗?该异常完整语句为:
Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file […….xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
该异常为写一个客户管理系统时遇到的,由小组合作完成的,我负责服务部分。其实这个与这个异常解决没有任何关系,闲话少说。
遇到问题百度,看到第二调解决方案是一个“小樽的雨后”的空间博文,博主可能也是新手,写的博文和我风格一样不出彩。
根据他的解决方案,果断在applicationContext.xml配置文件上下手,该异常发生在hibernate配置上,而我的项目是ssh2框架,数据持久化操作部分都在该配置文件的sessionFactory中配置,检查了下
<property name="mappingResources">
<list>
<value>com/hfxt/entity/TbDty.hbm.xml</value>
<value>com/hfxt/entity/TbService.hbm.xml</value>
<value>com/hfxt/entity/TbCustomer.hbm.xml</value>
</list>
</property>
这里没有任何问题。无法,继续找实体类及其映射配置文件,反正问题就在这里跑不掉的,果然在TbDty.java实体类中发现问题:
private Set tbServices = new HashSet(0);的getter、setter方法被我不小心注释掉了,如是:
public Set getTbServices() {
return this.tbServices;
}
public void setTbServices(Set tbServices) {
this.tbServices = tbServices;
}
取消注释,重新运行,一切ok。
总结,解决问题的思路无非两个,一是搞清楚异常的意思,是什么异常;二是根据异常的类型锁定发生异常的地方。把握这两点,解决异常就不会走弯路,顺利解决。
- 遇到Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]异常
- Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
- Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer
- Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
- Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
- Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
- Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
- 异常:Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
- Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]异常
- 异常:Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
- 出现Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]异常
- org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
- Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer] at org.sprin
- Hibernate错误Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
- Hibernate错误Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
- Hibernate错误Unable To Instantiate Default Tuplizer [Org.Hibernate.Tuple.Entity.PojoEntityTuplizer]
- Hibernate错误 Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
- Hibernate错误Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
- (转)深入了解GPU--学习教材 (摘自opengpu) . .
- hdu 1871 hdoj 1871
- 网页禁止右键代码
- 小命令大世界——linux定时运行命令脚本——crontab
- C判断闰年和四舍五入的方法
- 遇到Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]异常
- Chrome源码剖析、上--多线程模型、进程通信、进程模型
- 小命令大世界--Linux kill 杀死指定进程
- 内部类对外部内成员属性以及方法的访问
- 如何读取网络日志的方法
- 邮箱登录代码
- Nginx源码剖析之内存池,与内存管理
- ORA-29861: 域索引标记为 LOADING/FAILED/UNUSABLE
- GUI-按钮变换