关于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 ...
随机推荐
- Linux初学 - java环境安装
http://www.oracle.com/technetwork/java/javase/downloads/index.html 找到对应版本的jak的安装包 我这边下载的是64_rpm 下载完成 ...
- Python核心编程笔记(类)
Python并不强求你以面向对象的方式编程(与Java不同) # coding=utf8 class FooClass(object): version = 0.1 def __init__(self ...
- C#中判断一个集合是另外一个集合的子集
有这样的两个集合: string[] bigArr = new string[] { "a", "b", "c" };string[] sm ...
- Android带多选功能的PhotoPicker
最近利用闲碎的一些时间开发了一个Android库PhotoPicker,前面一篇文章也介绍了,Android高仿微信图片选择功能的PhotoPicker,之前没有加入选择多张图片的功能,现在加上之后一 ...
- 【转】Swift开源项目精选
https://github.com/ipader/SwiftGuide/blob/master/Featured.md 目录 “轮子” 工具类 存储类 网络类 图片类 界面类 框架类 “车子” 示例 ...
- JavaMail发送邮件时判断发送结果1.5.x
经常有用户在平台乱注册帐号,系统得自动清理.现在要判断一下邮件是否正确少了很多垃圾注册用户了. 测试 http://sms.reyo.cn/user/register 感谢您的反溃信息!!! 程序代码 ...
- NuGet学习笔记(转)
NuGet学习笔记(1)——初识NuGet及快速安装使用 http://kb.cnblogs.com/page/143190/ 1. NuGet是什么? NuGet is a Visual Studi ...
- Codeforces Round #379 (Div. 2) D. Anton and Chess 水题
D. Anton and Chess 题目连接: http://codeforces.com/contest/734/problem/D Description Anton likes to play ...
- 利用cmdline和gradle快速编译出apk
http://blog.csdn.net/qq_16628781/article/details/49365139 gradlew.bat clean build --info > bugtag ...
- C#集合 -- 自定义集合与代理
前面章节所讨论的集合都可以直接实例化,因此我们可以非常方便地使用这些集合类.但是如果你试图在集合添加或移除元素时添加控制,它们就不适用了.对于强类型集合,在某些情况下,你需要添加这样的控制: 添加或移 ...