到 Google 资讯主页   
EasyJF首页   资料   源码   软件    论坛   网站    
   使用帮助    
    该信息为本站MyRSS系统缓存内容,部分图片及附件有可能无法正常使用.easyjf.combeginner.blogjava.net无关,不对该信息负责.通过http://www.blogjava.net/freeatom/archive/2007/12/09/166445.html访问该信息的原始内容.
页面功能  【加入收藏】 【推荐给朋友】 【字体:  】 【关闭】   
Error Creating SessionFactory 异常
作者:Exiler 来源:beginner.blogjava.net  发布时间:2007-12-11 10:57:57.24

类似Hibernate异常:
%%%% Error Creating SessionFactory %%%%
org.hibernate.MappingException: Could not read mappings from resource:
这种错误出现的情况只有在人为改动了Hibernate生成的文件的时候出现。

情况有两种
1:hibernate.cfg.xml中,属性<mapping resource="./Permission.hbm.xml" />里面"./Permission.hbm.xml"所指定的路径不正确,即改动了生成实体的配置文件的位置。
2:Permission.hbm.xml中,<class name="db_DAO.Permission" table="ACEGI_PERMISSION" schema="POSTTEST">其中属性class name="db_DAO.Permission"指定的Permission类名错误,即:改动了生成实体类的类名或者包名。

如果上述两种情况改动后仍然报错,clean一下项目后OK

Exiler 2007-12-09 15:08 发表评论

 
相关文章
 
页面功能  【加入收藏】 【推荐给朋友】 【字体:  】 【关闭】   


EasyJF.com 2006 隐私政策 使用EasyJF前必读