Exception in thread "main" java.lang.NoSuchMethodError: org.hibernate.SessionFactory.openSession()Lorg/hibernate/classic/Session;
at org.springframework.orm.hibernate3.SessionFactoryUtils.doGetSession(SessionFactoryUtils.java:324)
at org.springframework.orm.hibernate3.SessionFactoryUtils.getSession(SessionFactoryUtils.java:235)
at org.springframework.orm.hibernate3.HibernateTemplate.getSession(HibernateTemplate.java:457)
参见:
http://m.oschina.net/blog/114244
http://godo121.iteye.com/blog/1473563
主要因为用的是spring3.2.1+hibernate4.2.1。
hibernate4.2.1与hibernate3有所不同
本文详细介绍了在使用Spring 3.2.1与Hibernate 4.2.1进行整合时遇到的NoSuchMethodError错误,并提供了排查和解决该问题的方法,包括分析错误原因和调整配置以确保两者兼容性。
757

被折叠的 条评论
为什么被折叠?



