Hi guys.
i'm using hibernate with java, it's ok.
But when i try to use NHibernate with .Net don't work.
I'm tired for searching any way for solve this question, but didn't find...
i'm getting this exception:
Code:
System.ArgumentNullException was unhandled
  Message="Value cannot be null.\r\nParameter name: stream"
  Source="mscorlib"
  ParamName="stream"
  StackTrace:
       at System.IO.StreamReader..ctor(Stream stream, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
       at System.IO.StreamReader..ctor(Stream stream)
       at MySql.Data.MySqlClient.SchemaProvider.GetReservedWords()
       at MySql.Data.MySqlClient.SchemaProvider.GetSchemaInternal(String collection, String[] restrictions)
       at MySql.Data.MySqlClient.ISSchemaProvider.GetSchemaInternal(String collection, String[] restrictions)
       at MySql.Data.MySqlClient.SchemaProvider.GetSchema(String collection, String[] restrictions)
       at MySql.Data.MySqlClient.MySqlConnection.GetSchema(String collectionName, String[] restrictionValues)
       at MySql.Data.MySqlClient.MySqlConnection.GetSchema(String collectionName)
       at NHibernate.Dialect.Schema.MySQLDataBaseSchema.GetReservedWords() in c:\CSharp\NH2.1.x\nhibernate\src\NHibernate\Dialect\Schema\MySQLMetaData.cs:line 27
       at NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.GetReservedWords(Dialect dialect, IConnectionHelper connectionHelper) in c:\CSharp\NH2.1.x\nhibernate\src\NHibernate\Tool\hbm2ddl\SchemaMetadataUpdater.cs:line 47
       at NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.Update(ISessionFactory sessionFactory) in c:\CSharp\NH2.1.x\nhibernate\src\NHibernate\Tool\hbm2ddl\SchemaMetadataUpdater.cs:line 17
       at NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg, IMapping mapping, Settings settings, EventListeners listeners) in c:\CSharp\NH2.1.x\nhibernate\src\NHibernate\Impl\SessionFactoryImpl.cs:line 169
       at NHibernate.Cfg.Configuration.BuildSessionFactory() in c:\CSharp\NH2.1.x\nhibernate\src\NHibernate\Cfg\Configuration.cs:line 1134
       at FirstSolution.Form1.Form1_Load(Object sender, EventArgs e) in D:\Testes\nhibernate\FirstSolution\FirstSolution\Form1.cs:line 52
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at System.Windows.Forms.Form.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
       at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
       at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
       at System.Windows.Forms.Control.set_Visible(Boolean value)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at FirstSolution.Program.Main() in D:\Testes\nhibernate\FirstSolution\FirstSolution\Program.cs:line 17
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
I don't have more ideas for resolve this problem...
My configuration is in app.config, and i put only one mapping for my test in code.
Configuration cfg = new Configuration().Configure();
cfg.AddFile("MyTable.hbm.xml");
ISessionFactory factory = cfg.BuildSessionFactory();//Error here
Thanks in advanced for any help.