首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

各位帮看看这是什么错啊解决思路

2012-04-04 
各位帮看看这是什么错啊我打开tomcat5.5是就报这个错啊, 我用的是ssh框架Error creating bean with name

各位帮看看这是什么错啊
我打开tomcat5.5是就报这个错啊, 我用的是ssh框架

Error creating bean with name 'sessionFactory' defined in file [C:\Program Files\Java\Tomcat 5.5\webapps\ROOT\WEB-INF\classes\applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: An association from the table user_role refers to an unmapped class: com.oa01.entity.Roles

[解决办法]
An association from the table user_role refers to an unmapped class: com.oa01.entity.Roles

先确定是否有这个实体 : com.oa01.entity.Roles
看里面是不是对应错了,本身为com.oa02.entity.Roles 的,却成了 com.oa01.entity.Roles

其次看你user_role实体的映射文件,看字段和属性是否对应,然后在实体里看属性名和映射文件的属性名是否对应!
[解决办法]
你的角色表role.hbm.xml没有在配置文件里面配置,所以找不到!

热点排行