org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: Cannot cache an unknown entity: org.hibernate.test.legacy.Simple
Caused by: org.hibernate.MappingException: Cannot cache an unknown entity: org.hibernate.test.legacy.Simple
at org.hibernate.cfg.Configuration.setCacheConcurrencyStrategy(Configuration.java:2023)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1568)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1540)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1514)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1449)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:601)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 37 more
出现这种异常多是在hibernate.cfg.xml中,多了以下这么一行代码:
<class-cache class="org.hibernate.test.legacy.Simple" region="Simple" usage="read-write" />
HIbernate常见异常
原创CAIHONGSHIJIE6 博主文章分类:hibernate ©著作权
文章标签 Hibernate 异常 hibernate java spring 文章分类 JavaScript 前端开发
上一篇:鸡兔同笼问题
下一篇:hadoop的下载方法
-
k8s 日常维护&常见异常码
pod日常排查状态
Pod Core 状态码 -
redis cluster 异常处理
redis cluster 异常处理
redis 重启 配置文件 -
hibernate PropertyAccessException 异常
详细异常信息: org.hibernate.PropertyAccessException: Exception occurred inside getter of com.huang.entity.Evaluation.money_ad
hibernate ssh 休闲 float PropertyAccessExcept -
hibernate异常解决
项目跑了一段时间后出现了获取Session异常org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Sessi
数据库 java spring spring boot hibernate -
开发常见异常
开发常见异常!
异常 开发