最新文章專題視頻專題問(wèn)答1問(wèn)答10問(wèn)答100問(wèn)答1000問(wèn)答2000關(guān)鍵字專題1關(guān)鍵字專題50關(guān)鍵字專題500關(guān)鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關(guān)鍵字專題關(guān)鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問(wèn)答文章1 問(wèn)答文章501 問(wèn)答文章1001 問(wèn)答文章1501 問(wèn)答文章2001 問(wèn)答文章2501 問(wèn)答文章3001 問(wèn)答文章3501 問(wèn)答文章4001 問(wèn)答文章4501 問(wèn)答文章5001 問(wèn)答文章5501 問(wèn)答文章6001 問(wèn)答文章6501 問(wèn)答文章7001 問(wèn)答文章7501 問(wèn)答文章8001 問(wèn)答文章8501 問(wèn)答文章9001 問(wèn)答文章9501
當(dāng)前位置: 首頁(yè) - 科技 - 知識(shí)百科 - 正文

SpringMVC+Hibernate3中遇到的問(wèn)題

來(lái)源:懂視網(wǎng) 責(zé)編:小采 時(shí)間:2020-11-09 11:45:16
文檔

SpringMVC+Hibernate3中遇到的問(wèn)題

SpringMVC+Hibernate3中遇到的問(wèn)題:org.springframework.beans.factory.BeanCreationException: Error creating bean with name org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/co
推薦度:
導(dǎo)讀SpringMVC+Hibernate3中遇到的問(wèn)題:org.springframework.beans.factory.BeanCreationException: Error creating bean with name org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/co

org.springframework.beans.factory.BeanCreationException: Error creating bean with name

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/config/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Could not instantiate cache implementation

……

……

……

先把這段異常信息google一把后,得到大部分的解決方案都說(shuō)是包沖突,在經(jīng)過(guò)一系列的試驗(yàn)發(fā)現(xiàn)根本就不是一回事,繼續(xù)查找下列異常信息。


Caused by: org.hibernate.HibernateException: Could not instantiate cache implementation


……

……

……

Caused by: org.hibernate.cache.NoCachingEnabledException: Second-level cache is not enabled for usage [hibernate.cache.use_second_level_cache | hibernate.cache.use_query_cache]


隱約得知緩存配置方面出現(xiàn)問(wèn)題,發(fā)現(xiàn)問(wèn)題后順著指示找到了applicationContext.xml文件中的這段配置,提示的意思大概為緩存不可用,在添加了緩存配置后一切正常。


>



${hibernate.dialect}
${hibernate.show_sql}
${hibernate.hbm2ddl.auto}


org.hibernate.cache.HashtableCacheProvider






classpath*:/com/train/entity/admin/hbm/*.hbm.xml
classpath*:/com/train/entity/common/hbm/*.hbm.xml




雖然報(bào)的異常與網(wǎng)上其他人幾乎相同,但還是有不一致的地方,對(duì)癥下藥方可藥到病除。

linux

,

聲明:本網(wǎng)頁(yè)內(nèi)容旨在傳播知識(shí),若有侵權(quán)等問(wèn)題請(qǐng)及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

SpringMVC+Hibernate3中遇到的問(wèn)題

SpringMVC+Hibernate3中遇到的問(wèn)題:org.springframework.beans.factory.BeanCreationException: Error creating bean with name org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/co
推薦度:
  • 熱門焦點(diǎn)

最新推薦

猜你喜歡

熱門推薦

專題
Top