zoukankan      html  css  js  c++  java
  • 关于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>

  • 相关阅读:
    MongoDB一键安装
    Mongo基本操作
    MongoDB AUTH结果验证及开启方法
    MongoDB AUTH结果验证
    MongoDB使用
    MongoDB-安装配置
    11204RAC-dbca建库脚本
    MySQL主从同步最佳实践
    实时抓取主从的同步状态
    守护神 Supervisor
  • 原文地址:https://www.cnblogs.com/homezzm/p/3253006.html
Copyright © 2011-2022 走看看