码迷,mamicode.com
首页 > 系统相关 > 详细

ssh框架整合出现class not found : org.hibernate.engine.FilterDefinition.class

时间:2014-08-26 11:57:26      阅读:227      评论:0      收藏:0      [点我收藏+]

标签:class not found : org.hibernate.engine.filterdefinition.class

    今天笔者在弄整合的时候出现了一个很奇怪的问题!就是在整合的是后出现了class not found : org.hibernate.FilterDefinition.class,找了很久都说是没有添加jar包,然后我就找这个类到底有没有在hibernate中,发现这个类居然就在hibernate-core.jar中但是却不在engine包的根下,而是在engine.spi下!后来就找到原因了!原来是hibernate3和hibernate4不同了。

    在此处整合我用的是hibernate4.3.5+spring4.0.6+struts2.3.16都是目前比较新的版本!原因就在此。当然我们需要做的改动也 不需要很多,只是在配置sessionFactory class 的属性要写成org.springframework.orm.hibernate4.LocalSessionFactoryBean   注意就是将原有的hibernate3改成hibernate4就可以解决问题,当然在配置事务的时候也要注意 org.springframework.orm.hibernate4.HibernateTransactionManager 也要写成hibernate4

    希望这个能够帮助到大家!

ssh框架整合出现class not found : org.hibernate.engine.FilterDefinition.class

标签:class not found : org.hibernate.engine.filterdefinition.class

原文地址:http://8409564.blog.51cto.com/8399564/1545011

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!