[Mono-aspnet-list] Fluent NHibernate & Mono 2.8

Pablo Ruiz pablo.ruiz at gmail.com
Mon Jan 17 17:50:13 EST 2011


Hi Chris,

I have no clue whats going on there, as I have not tried NH/FHN on mono with
net4 profile yet.. If we are to trust the exception message looks like some
ADO.NET methods are missing from net4 profile.. but this seems little
weird... ¿?

Regarding the net3.5, I have a few projects with mono 2.6.7 + MVC1 + FHN 1.0
+ NH 2.1.2 + PostgreSQL and mono 2.8.1 + MVC2 + FHN 1.1 + NH 2.1.2 + PSQL
(via Npgsql) running fine (in fact more than fine ;))..

On Mon, Jan 17, 2011 at 11:13 PM, Chris Thielen <cthielen at gmail.com> wrote:

> Thanks Pablo.
>
> Do you have issues compiling Fluent NHibernate 1.1 itself? I can compile
> the Example program and run it against the pre-compiled assemblies but
> trying to re-compile Fluent NHibernate itself crashes the compiler. I've
> filed it as a bug: https://bugzilla.novell.com/show_bug.cgi?id=665001 .
>
> You mentioned I should check the Internal Exception with regards to the
> Example program throwing an exception: PotentialReasons is empty and I do
> not see the Internal Exception anywhere. Additionally, I'm receiving errors
> below that:
>
> Missing method
> System.Data.Common.DbConnection::EnlistTransaction(Transaction) in assembly
> /Library/Frameworks/Mono.framework/Versions/2.8.1/lib/mono/gac/System.Data/4.0.0.0__b77a5c561934e089/System.Data.dll,
> referenced in assembly
> /Users/cthielen/Downloads/jagregory-fluent-nhibernate-bd94ea5/src/Examples.FirstProject/bin/Debug/System.Data.SQLite.dll
>
> Unhandled Exception: FluentNHibernate.Cfg.FluentConfigurationException: An
> invalid or incomplete configuration was used while creating a
> SessionFactory. Check PotentialReasons collection, and InnerException for
> more detail.
>
>  ---> FluentNHibernate.Cfg.FluentConfigurationException: An invalid or
> incomplete configuration was used while creating a SessionFactory. Check
> PotentialReasons collection, and InnerException for more detail.
>
>  ---> NHibernate.HibernateException: Method not found:
> 'System.Data.Common.DbConnection.EnlistTransaction'. --->
> System.MissingMethodException: Method not found:
> 'System.Data.Common.DbConnection.EnlistTransaction'.
>   at NHibernate.Connection.DriverConnectionProvider.GetConnection ()
> [0x00000] in <filename unknown>:0
>   --- End of inner exception stack trace ---
>   at NHibernate.Tool.hbm2ddl.SchemaExport.Execute (System.Action`1
> scriptAction, Boolean export, Boolean justDrop) [0x00000] in <filename
> unknown>:0
>   at NHibernate.Tool.hbm2ddl.SchemaExport.Execute (Boolean script, Boolean
> export, Boolean justDrop) [0x00000] in <filename unknown>:0
>   at NHibernate.Tool.hbm2ddl.SchemaExport.Create (Boolean script, Boolean
> export) [0x00000] in <filename unknown>:0
>   at Examples.FirstProject.Program.BuildSchema
> (NHibernate.Cfg.Configuration config) [0x00000] in <filename unknown>:0
>   at FluentNHibernate.Cfg.FluentConfiguration.BuildConfiguration ()
> [0x00000] in <filename unknown>:0
>   --- End of inner exception stack trace ---
>   at FluentNHibernate.Cfg.FluentConfiguration.BuildConfiguration ()
> [0x00000] in <filename unknown>:0
>   at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory ()
> [0x00000] in <filename unknown>:0
>
>
>   --- End of inner exception stack trace ---
>   at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory ()
> [0x00000] in <filename unknown>:0
>   at Examples.FirstProject.Program.CreateSessionFactory () [0x00000] in
> <filename unknown>:0
>   at Examples.FirstProject.Program.Main () [0x00000] in <filename
> unknown>:0
>
> Curiously, and to my delight at having some way of getting it working,
> re-compiling the Example project for .NET 3.5 seems to work! Given the
> errors above, would you say this is a compatibility error between the SQLite
> driver and .NET 4?
>
> Christopher Thielen
>
>
>
> On Sat, Jan 15, 2011 at 3:41 PM, Pablo Ruiz <pablo.ruiz at gmail.com> wrote:
>
>> Btw, I just reported the issue with a sample code demostrating the issue:
>> https://bugzilla.novell.com/show_bug.cgi?id=664799
>>
>>
>> On Sat, Jan 15, 2011 at 7:44 PM, Pablo Ruiz <pablo.ruiz at gmail.com> wrote:
>>
>>> Same problem here.
>>>
>>> Looks like a 2.8.2 problem, as it goes away when downgrading back to
>>> 2.8.1.
>>>
>>> On Sat, Jan 15, 2011 at 9:03 AM, Chris Thielen <cthielen at gmail.com>wrote:
>>>
>>>> Hi everybody,
>>>>
>>>> I'm new to C#, MVC 2, Mono, and .NET in general but I'm a seasoned
>>>> programmer in other languages / frameworks. I've been tasked with learning
>>>> and using ASP.NET MVC 2 at work and though I've got the basics down,
>>>> I'm having trouble with some common add-on libraries I'm hoping somebody on
>>>> the list will know about.
>>>>
>>>> In particular, some teams at work use Fluent NHibernate, which seems
>>>> like a really nice, strongly-typed ORM solution for .NET and fits in nicely
>>>> with MVC 2. My problem is, it doesn't seem to compile / work on my system.
>>>>
>>>> I'm running MonoDevelop 2.4.1 with Mono 2.8.2 on OS X 10.6.6. I've
>>>> downloaded the latest Fluent NHibernate (v1.1 as of this writing) and when I
>>>> attempt to compile the example / library, I get the following error:
>>>>
>>>> Building: Examples.FirstProject (Debug)
>>>>
>>>> Performing main compilation...
>>>> /Library/Frameworks/Mono.framework/Versions/2.8.2/bin/gmcs /noconfig
>>>> "/out:/Users/cthielen/Downloads/jagregory-fluent-nhibernate-bd94ea5/src/Examples.FirstProject/bin/Debug/Examples.FirstProject.exe"
>>>> "/r:/Library/Frameworks/Mono.framework/Versions/2.8.2/lib/mono/2.0/System.dll"
>>>> "/r:/Library/Frameworks/Mono.framework/Versions/2.8.2/lib/mono/2.0/System.Core.dll"
>>>> "/r:/Library/Frameworks/Mono.framework/Versions/2.8.2/lib/mono/2.0/System.Data.dll"
>>>> "/r:/Users/cthielen/Downloads/fluentnhibernate-NH2/Antlr3.Runtime.dll"
>>>> "/r:/Users/cthielen/Downloads/fluentnhibernate-NH2/Castle.Core.dll"
>>>> "/r:/Users/cthielen/Downloads/fluentnhibernate-NH2/Castle.DynamicProxy2.dll"
>>>> "/r:/Users/cthielen/Downloads/fluentnhibernate-NH2/Iesi.Collections.dll"
>>>> "/r:/Users/cthielen/Downloads/fluentnhibernate-NH2/log4net.dll"
>>>> "/r:/Library/Frameworks/Mono.framework/Versions/2.8.2/lib/mono/2.0/Npgsql.dll"
>>>> "/r:/Users/cthielen/Downloads/fluentnhibernate-NH2/FluentNHibernate.dll"
>>>> "/r:/Users/cthielen/Downloads/fluentnhibernate-NH2/NHibernate.ByteCode.Castle.dll"
>>>> "/r:/Users/cthielen/Downloads/fluentnhibernate-NH2/NHibernate.dll" /nologo
>>>> /warn:4 /debug:+ /debug:full /optimize- /codepage:utf8 "/define:DEBUG;TRACE"
>>>>  /main:Examples.FirstProject.Program /t:exe
>>>> "/Users/cthielen/Downloads/jagregory-fluent-nhibernate-bd94ea5/src/Examples.FirstProject/Entities/Employee.cs"
>>>> "/Users/cthielen/Downloads/jagregory-fluent-nhibernate-bd94ea5/src/Examples.FirstProject/Entities/Product.cs"
>>>> "/Users/cthielen/Downloads/jagregory-fluent-nhibernate-bd94ea5/src/Examples.FirstProject/Entities/Store.cs"
>>>> "/Users/cthielen/Downloads/jagregory-fluent-nhibernate-bd94ea5/src/Examples.FirstProject/Mappings/EmployeeMap.cs"
>>>> "/Users/cthielen/Downloads/jagregory-fluent-nhibernate-bd94ea5/src/Examples.FirstProject/Mappings/LocationMap.cs"
>>>> "/Users/cthielen/Downloads/jagregory-fluent-nhibernate-bd94ea5/src/Examples.FirstProject/Mappings/ProductMap.cs"
>>>> "/Users/cthielen/Downloads/jagregory-fluent-nhibernate-bd94ea5/src/Examples.FirstProject/Mappings/StoreMap.cs"
>>>> "/Users/cthielen/Downloads/jagregory-fluent-nhibernate-bd94ea5/src/Examples.FirstProject/Program.cs"
>>>> "/Users/cthielen/Downloads/jagregory-fluent-nhibernate-bd94ea5/src/Examples.FirstProject/Properties/AssemblyInfo.cs"
>>>> Compilation failed: 1 error(s), 0 warnings
>>>>
>>>> error CS0011: Could not load type
>>>> 'FluentNHibernate.Mapping.ComponentPartBase`2[T,FluentNHibernate.Mapping.ComponentMap`1[T]]'
>>>> from assembly 'FluentNHibernate, Version=1.2.0.694, Culture=neutral,
>>>> PublicKeyToken=8aa435e3cb308880'.
>>>>
>>>>
>>>> Build complete -- 1 error, 0 warnings
>>>>
>>>> Now, I understand this list is about ASP.NET development on Mono and
>>>> not necessarily related to Fluent NHibernate, but my general inclination
>>>> from reading around online is that, when it comes to a Mono compatibility
>>>> issue, it's sometimes best to confront the Mono community first, before
>>>> contacting developers who may or may not care about Mono compatibility.
>>>>
>>>> Does anybody know what might be going on here? Does anybody use Fluent
>>>> NHibernate on Mono?
>>>>
>>>> Christopher Thielen
>>>>
>>>> _______________________________________________
>>>> Mono-aspnet-list mailing list
>>>> Mono-aspnet-list at lists.ximian.com
>>>> http://lists.ximian.com/mailman/listinfo/mono-aspnet-list
>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-aspnet-list/attachments/20110117/69a6fa68/attachment-0001.html 


More information about the Mono-aspnet-list mailing list