NHibernate错误:Could not compile the mapping document的解决

用动软代码生成器的NHibernate生成模板,生成一个“XML映射模板”,老是提示Could not compile the mapping document的问题。

各种的找,就是没找到问题。

后来调试的时候,把所有的中断翻出来

发现bool这个类型不认识,再看CodeSmith的模板,里面对MS SQLServer的bit类型是转化为Boolean,

果断地把对应的hbm.xml里的bool类型换成Boolean,

终于搞定。

时间: 2024-08-28 12:44:47

NHibernate错误:Could not compile the mapping document的解决的相关文章

org.hibernate.InvalidMappingException: Could not parse mapping document from resource com/domain/book.hbm.xml 联网跑一跑

org.hibernate.InvalidMappingException: Could not parse mapping document from resource com/domain/book.hbm.xml at org.hibernate.cfg.Configuration.addResource(Configuration.java:586) at org.hibernate.cfg.Configuration.addClass(Configuration.java:633) a

Could not parse mapping document from resource cn/spt/model/Student.hbm.xml

初始hibernate, 写第一个程序 helloworld的错误: Exception in thread "main" org.hibernate.InvalidMappingException: Could not parse mapping document from resource cn/spt/model/Student.hbm.xml at org.hibernate.cfg.Configuration.addResource(Configuration.java:61

hibernate报错:could not parse mapping document from resource

昨晚在自己电脑上搭建的ssh环境运行好好的,搭建成功的时候我还小兴奋了下,然后今天放到公司的电脑上去,直接给我报了个could not parse mapping document from resource,当时我那小心肝直接碎了,并且这个错误还让我改了几个小时,最后在http://blog.csdn.net/mydeman/article/details/6134820 发现了答案,*.hbm.xml中引用了错误的DTD文件路径“http://www.hibernate.org/dtd/hi

Could not parse mapping document from file

java.lang.ExceptionInInitializerError at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccesso

Could not parse mapping document from input stream hibernate配置异常

十二月 18, 2016 4:24:29 下午 org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.B

Atitit.404错误解决标准流程and url汉字中文路径404错误resin4 resin chinese char path 404 err解决

Atitit.404错误解决标准流程and url汉字中文路径404错误resin4 resin chinese char path 404 err解决 1. #原因解析 1 2. #解决方式 2 3. 输出图片流... 2 4. --code 2 5. 参考 3 1. #原因解析 查看累挂发送d url,,,俄使用的是ff..它把url转换成个 http://localhost/img/QQ%E6%88%AA%E5%9B%BE20140401175433.jpg 发送出去..每汉字3个%字符,

【初学python】错误SSLError: [Errno 1] _ssl.c:504:的解决记录

最近在实习公司学习使用python做web自动化测试,其中使用到httplib这个模板,主要用于与待测试界面建立HTTP连接,发送数据请求,接收请求状态码和查询数据,验证功能.但是新版本的web界面改成使用https协议,原来的测试用例都变成无法跑通的状态. 将协议从HTTP改成HTTPS后,报以下错误: SSLError: [Errno 1] _ssl.c:504: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown proto

关于错误Access Violation和too many consecutive exceptions 解决方法

关于错误Access Violation和too many consecutive exceptions 解决方法 “如果DLL中用到了DELPHI的string类型,则DLL和主程序中都需要加上ShareMem”.DLL项目加ShareMem这个我知道,但主程序中也要加?这我就不明白了,为什么以前不加的时候没这个问题呢?加就加吧,果然加上后一点问题都没有.唉,真是搞不明白.最后在新建DLL项目时,DELPHI有一段注释给了我答案. library MyDll; { Important note

ECSHOP错误Redefining already defined constructor for class如何解决

本地PHP环境PHP5.4,安装ecshop2.7.3后,很多地方会报如下的错 Redefining already defined constructor for class XXX 使用和类名相同点函数名作为构造函数是php4时代的写法,php5时代的构造函数是 __construct(),ecshop为了兼容老版本的php,所以采用了上面的写法. 但是从php5.4开始,对于这样的两种写法同时出现的情况,要求必须__construct()在前,同名函数在后,所以只需要对调两个函数的位置即可