关于castle和Could not find the dialect in the configuration错误
最近试了试castle,NND,老是报“Could not find the dialect in the configuration”,明明配的没问题,上网搜索所有教程都是这么配的。后来在一国外的网站解决NHibernate的问题的帖子,看的一哥们说把hibernate去了试试,当时也没试(关键是那帖子说这个办法没解决问题)。囧rz,今天试了试,居然解决问题了。估计可能和castle的版本有关系(顺便说一下castle网站的源码的例子也是不对的,NND)。希望遇到同样错误的哥们能搜到此文章。
原配置:
<configSections>
<section name="activerecord" type="Castle.ActiveRecord.Framework.Config.ActiveRecordSectionHandler, Castle.ActiveRecord" />
</configSections>
<activerecord>
<config>
<add key="hibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver" />
<add key="hibernate.dialect" value="NHibernate.Dialect.MsSql2000Dialect" />
<add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider" />
<add key="hibernate.connection.connection_string" value="UID=sa;Password=sa;Initial Catalog=ARDemo;Data Source=." />
</config>
</activerecord>
正确配置:
<configSections>
<section name="activerecord" type="Castle.ActiveRecord.Framework.Config.ActiveRecordSectionHandler, Castle.ActiveRecord" />
</configSections>
<activerecord>
<config>
<add key="connection.driver_class" value="NHibernate.Driver.SqlClientDriver" />
<add key="dialect" value="NHibernate.Dialect.MsSql2000Dialect" />
<add key="connection.provider" value="NHibernate.Connection.DriverConnectionProvider" />
<add key="proxyfactory.factory_class" value="NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle" />
<add key="connection.connection_string" value="UID=sa;Password=sa;Initial Catalog=ARDemo;Data Source=." />
</config>
</activerecord>
关于castle和Could not find the dialect in the configuration错误的更多相关文章
- NHibernate常见问题及解决方法
NHibernate常见问题及解决方法 曾经学过NHibernate的,但是自从工作到现在快一年了却从未用到过,近来要巩固一下却发现忘记了许多,一个"in expected: <end ...
- Mybatis Physical Pagination
1. Requirements: when we use the sql like "select * from targetTable", we get all records ...
- hibernate4 使用及 新特性
hibernate4.x已经在官网出现一段时间了.下载地址: http://hibernate.org/orm/downloads/ 使用hibernate4所需要的jar包 在lib\require ...
- NHibernate的常见问题及解决方案
问题1 : 异常:in expected: <end-of-text> (possibly an invalid or unmapped class name was used in th ...
- com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'user'
1.错误描述 2014-7-12 21:06:05 com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource getPoolManager 信息: I ...
- SSH执行hql报错:Caused by: org.hibernate.hql.ast.QuerySyntaxException: user is not mapped [from user where username = ?]
报错信息: ERROR Dispatcher:38 - Exception occurred during processing request: user is not mapped [from u ...
- 第三次 orm自动建表及遇到的问题
Hibernate支持自动建表,在开发阶段很方便,可以保证hbm与数据库表结构的自动同步. 方法很简单,在hibernate.cfg.xml内加入 <property name="hi ...
- 慕课网Hibernate初探之一对多映射实验及总结
慕课网Hibernate初探之一对多映射实验及总结 一.本课核心 * 1.如何在MyEclipse中使用Hibernate * 2.如何实现Hibernate中一对多的映射 * 3.如何创建Sessi ...
- hibernate 出错 集合
Lazy="false"反而出错 错误信息: “System.Configuration.ConfigurationErrorsException”类型的异常在 Spring.Co ...
随机推荐
- 为什么Web 设计会‘死’?
高质量的Web 模板,成熟的Design Pattern,人工智能的引用,移动技术的冲击是否标志着Web Design 结束的时代已经到来? Web Design 最终也未避免与“死亡”这个词的关联, ...
- latex数字加粗后变宽
latex的数字默认用的是Times New Roman字体,这个字体有个不优美之处就是加粗后会变宽,如下图所示: 平常倒是也无所谓.昨天在把实验数据整理进表格时,为了凸显每个数据集上各个实验方法的优 ...
- atitit.查看预编译sql问号 本质and原理and查看原生sql语句
atitit.查看预编译sql问号 本质and原理and查看原生sql语句 1. 预编译原理. 1 2. preparedStatement 有三大优点: 1 3. How to look gene ...
- atitit.提升2--3倍开发效率--cbb体系的建设..
atitit.提升开发效率--cbb体系的建设.. #--提升倍数,大概2--3倍.. #---cbb的内容 知识的,expt的,经验的技术的部件的问题库的角度.. #---cbb的层次,tech l ...
- piap.excel 微软 时间戳转换mssql sql server文件时间戳转换unix 导入mysql
piap.excel 微软 时间戳转换mssql sql server文件时间戳转换unix 导入mysql 需要不个mssql的sql文件导入mysql.他们的时间戳格式不同..ms用的是自定义的时 ...
- Lucene.net入门学习(结合盘古分词)
Lucene简介 Lucene是apache软件基金会4 jakarta项目组的一个子项目,是一个开放源代码的全文检索引擎工具包,即它不是一个完整的全文检索引擎,而是一个全文检索引擎的架构,提供了完整 ...
- 从混战到三足鼎立,外卖O2O下一个谁先出局?
来自第三方数据挖掘和分析机构权威iiMedia Research(艾媒咨询)发布的<2016Q3中国在线餐饮外卖市场专题研究报告>显示,2016Q3中国在线餐饮外卖市场活跃用户分布方面,美 ...
- phpstorm的安装和破解
1.什么是phpstorm? PhpStorm是一个轻量级且便捷的PHP IDE,其旨在提高用户效率,可深刻理解用户的编码,提供智能代码补全,快速导航以及即时错误检查.但是phpstorm是商业软件, ...
- XCode打包脚本
#!/bin/bash #for debug#请将 TARGET-NAME 改成项目的 TARGET 名称#放置于 .xcodeproj 同级目录中执行 target_name="xx&qu ...
- Transistor 晶体管 场效应 双极型 达林顿 CMOS PMOS BJT FET
Transistor Tutorial Summary Transistor Tutorial Summary Bipolar Junction Transistor Tutorial We can ...