NHbernate2.1.2hibernate-cfg.xml:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration  xmlns="urn:nhibernate-configuration-2.2" >
    <session-factory name="NHibernate.Test">
      <property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property>
      <property name="connection.connection_string">
        Database=db_nhibernate;Data Source=192.168.1.98;User Id=root;Password=root;pooling=false;CharSet=utf8;port=3306
      </property>
      <property name="dialect">NHibernate.Dialect.MySQLDialect</property>
      <property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property>
    <mapping assembly="NHbernateDemo.Model"/>
  </session-factory>
</hibernate-configuration>
加入MySql.Data.dll到bin文件下之后
执行如下代码:
ISessionFactory factory = new NHibernate.Cfg.Configuration().Configure().BuildSessionFactory();
异常:
未处理 System.ArgumentNullException
  Message="值不能为空。\r\n参数名: stream"
  Source="mscorlib"
  ParamName="stream"
  StackTrace:
       在 System.IO.StreamReader..ctor(Stream stream, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
       在 System.IO.StreamReader..ctor(Stream stream)
       在 MySql.Data.MySqlClient.SchemaProvider.GetReservedWords()
       在 MySql.Data.MySqlClient.SchemaProvider.GetSchemaInternal(String collection, String[] restrictions)
       在 MySql.Data.MySqlClient.ISSchemaProvider.GetSchemaInternal(String collection, String[] restrictions)
       在 MySql.Data.MySqlClient.SchemaProvider.GetSchema(String collection, String[] restrictions)
       在 MySql.Data.MySqlClient.MySqlConnection.GetSchema(String collectionName, String[] restrictionValues)
       在 MySql.Data.MySqlClient.MySqlConnection.GetSchema(String collectionName)
       在 NHibernate.Dialect.Schema.AbstractDataBaseSchema.GetReservedWords()
       在 NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.GetReservedWords(Dialect dialect, IConnectionHelper connectionHelper)
       在 NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.Update(ISessionFactory sessionFactory)
       在 NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg, IMapping mapping, Settings settings, EventListeners listeners)
       在 NHibernate.Cfg.Configuration.BuildSessionFactory()
       在 NHibernateDemo.NHbernateForm.NHbernateForm_Load(Object sender, EventArgs e) 位置 C:\Documents and Settings\chenlei\My Documents\NHibernateDemo\NHibernateDemo\NHibernateDemo\NHbernateForm.cs:行号 23
       在 System.Windows.Forms.Form.OnLoad(EventArgs e)
       在 System.Windows.Forms.Form.OnCreateControl()
       在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       在 System.Windows.Forms.Control.CreateControl()
       在 System.Windows.Forms.Control.WmShowWindow(Message& m)
       在 System.Windows.Forms.Control.WndProc(Message& m)
       在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       在 System.Windows.Forms.ContainerControl.WndProc(Message& m)
       在 System.Windows.Forms.Form.WmShowWindow(Message& m)
       在 System.Windows.Forms.Form.WndProc(Message& m)
       在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       在 System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
       在 System.Windows.Forms.Control.SetVisibleCore(Boolean value)
       在 System.Windows.Forms.Form.SetVisibleCore(Boolean value)
       在 System.Windows.Forms.Control.set_Visible(Boolean value)
       在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       在 System.Windows.Forms.Application.Run(Form mainForm)
       在 NHibernateDemo.Program.Main() 位置 C:\Documents and Settings\chenlei\My Documents\NHibernateDemo\NHibernateDemo\NHibernateDemo\Program.cs:行号 18
       在 System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       在 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       在 System.Threading.ThreadHelper.ThreadStart()
  InnerException: 
请问是什么原因?