spring導入hibernate4出現org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.springframework.orm.hibernate4.LocalSessionFactoryBean] for bean with name 'sessionFactory'


今天在使用過程中遇到了這個問題,在百度上找了好多帖子,最后發現都沒有完整的解決方案,花費了點時間終於將問題搞定,把解決方案貼出來,供大家使用與查閱!

提示的主要錯誤信息是“caused by:java.lang.NoclassDefFoundError:org/springframework/dao/support/persistenceExceptionTranslator”

原因是缺少org.springframework.transaction-3.2.4.RELEASE.jar包(spring3),導入后即可解決。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



猜您在找 spring整合hibernate無法創建Bean----org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'studentDao' defined in file Spring AOP 報錯org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'XXXXXX' defined in class path resource.......... org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurationPropertiesBeans' defined in class path resource org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.jdbc.datasource.DataSourceTransactionManager#0' defined in class path resource [spring-mybat 錯誤/異常:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/beans_common.xml]...的解決方法 使用security報錯:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityFilterChain' defined in class path resource org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'multipartResolver': Failed to introspect bean class [org.springframework.web.multipart.commons.CommonsMultipartR spring3+structs2整合hibernate4時報org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void sy.dao.impl.UserDaoImpl.setSessionFactory(org.hibernate.SessionFactory); ssm整合時出現 org.springframework.beans.factory.BeanCreationException :Error creating bean with name ‘XXX’ 異常的原因及解決方法
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM