惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
Vercel News
Vercel News
月光博客
月光博客
S
SegmentFault 最新的问题
A
About on SuperTechFans
Microsoft Security Blog
Microsoft Security Blog
U
Unit 42
Google DeepMind News
Google DeepMind News
Engineering at Meta
Engineering at Meta
B
Blog RSS Feed
Y
Y Combinator Blog
云风的 BLOG
云风的 BLOG
N
Netflix TechBlog - Medium
小众软件
小众软件
WordPress大学
WordPress大学
G
Google Developers Blog
Recent Announcements
Recent Announcements
H
Hackread – Cybersecurity News, Data Breaches, AI and More
P
Proofpoint News Feed
Blog — PlanetScale
Blog — PlanetScale
MongoDB | Blog
MongoDB | Blog
F
Fortinet All Blogs
博客园 - 【当耐特】
I
InfoQ

博客园 - 萧风的风

mac系统下Eclipse + pydev配置python Interpreter spring 整合mongodb报NoSuchMethodError错误 mybatis在spring(Controller) 中的事务配置问题 IT经理工作职责 淘宝数据魔方技术架构解析 使用 python 开发 Web Service 安装配置Django开发环境(Eclipse + Pydev) 又拍网架构-又一个用到python的网站 SQL SERVER分页写法 nhibernate的分页方法 SQL Server 2008 收缩日志 清空删除大日志文件 访问IIS时,名称以无效字符开头。。。解决方案 IIS fastcgi 超时处理 Delphi错误:Stack overflow的解决方法 某公司面试是在的解决方法 jsforum研究。一个比较简单的论坛。 关于eclipse无法自动编译的问题 Myeclipse 文件夹src下的内容、WEB-INF\classes下的内容 - 萧风的风 - 博客园 OSChina底层数据库操作的类(QueryHelper)源码
令人崩溃的nhibernate配置
萧风的风 · 2011-11-11 · via 博客园 - 萧风的风

晚上有空拿nhibernate学习了一下,满以为跟着教程随便搞一搞,总能跑一个小Sample吧?

嘿,没戏

按教程配出来了hbm.xml, 写出Entity类,配好数据库的连接,Run一下,一直报

Unable to locate persister for the entity named 

这个折腾了好久。。。

整整搞到快凌晨两点。。。

后来终于发现是hibernate.cfg.xml中未加上这一行

<mapping assembly="nhibernateSample" />

 郁闷啊,这个是从nhibernate的目录中拷过来的啊,教程中也完全没有提到这回事。。。。

后面又陆续报了几个错误,不过都还好,轻松搞定。

 看来这种开源的东东,确实文档跟不上啊。。。