I'm facing the same problem as Bryan stated, with the same
configuration.
Any ideas?

On Jun 23, 12:50 am, Bryan Murphy <bmurphy1...@gmail.com> wrote:
> Hey guys,
> I'm running into the a problem compiling our hbm files under Mono v2.4 and
> NHibernate v2.1.0 beta 2.  Looking through the code, it looks like the
> problem is how the XmlSerializer interprets AbstractDecoratable and the
> culprits are the properties MappedMetaData and InheritableMetaData.  The
> exception I'm getting is below.
>
> Thanks,
> Bryan
>
> NHibernate.MappingException: Could not compile the mapping document:
> **SNIP**.Domain.hbm.xml ---> System.InvalidOperationException: There was an
> error reflecting type 'NHibernate.Cfg.MappingSchema.HbmMapping'. --->
> System.InvalidOperationException: To be XML serializable, types which
> inherit from ICollection must have an implementation of
> Add(System.Collections.Generic.KeyValuePair`2[[System.String, mscorlib,
> Version=2.0.0.0, Culture=neutral,
> PublicKeyToken=b77a5c561934e089],[NHibernate.Mapping.MetaAttribute,
> NHibernate, Version=2.1.0.2002, Culture=neutral,
> PublicKeyToken=aa95f207798dfdb4]]) at all levels of their inheritance
> hierarchy. System.Collections.Generic.IDictionary`2[[System.String,
> mscorlib, Version=2.0.0.0, Culture=neutral,
> PublicKeyToken=b77a5c561934e089],[NHibernate.Mapping.MetaAttribute,
> NHibernate, Version=2.1.0.2002, Culture=neutral,
> PublicKeyToken=aa95f207798dfdb4]] does not implement
> Add(System.Collections.Generic.KeyValuePair`2[[System.String, mscorlib,
> Version=2.0.0.0, Culture=neutral,
> PublicKeyToken=b77a5c561934e089],[NHibernate.Mapping.MetaAttribute,
> NHibernate, Version=2.1.0.2002, Culture=neutral,
> PublicKeyToken=aa95f207798dfdb4]]).
>   at System.Xml.Serialization.TypeData.get_ListItemType () [0x00230] in
> /root/mono2.4/mono-2.4/mcs/class/System.XML/System.Xml.Serialization/TypeData.cs:342
>   at System.Xml.Serialization.TypeData.get_ListItemTypeData () [0x00016] in
> /root/mono2.4/mono-2.4/mcs/class/System.XML/System.Xml.Serialization/TypeData.cs:274
>   at System.Xml.Serialization.TypeData..ctor (System.Type type,
> System.String elementName, Boolean isPrimitive,
> System.Xml.Serialization.TypeData mappedType,
> System.Xml.Schema.XmlSchemaPatternFacet facet) [0x00104] in
> /root/mono2.4/mono-2.4/mcs/class/System.XML/System.Xml.Serialization/TypeData.cs:94
>   at System.Xml.Serialization.TypeData..ctor (System.Type type,
> System.String elementName, Boolean isPrimitive) [0x00000] in
> /root/mono2.4/mono-2.4/mcs/class/System.XML/System.Xml.XPath/Parser.cs:1
>   at System.Xml.Serialization.TypeTranslator.GetTypeData (System.Type
> runtimeType, System.String xmlDataType) [0x00241] in
> /root/mono2.4/mono-2.4/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs:243
>   at System.Xml.Serialization.TypeTranslator.GetTypeData (System.Type type)
> [0x00000] in
> /root/mono2.4/mono-2.4/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs:163
>   at System.Xml.Serialization.XmlReflectionImporter.GetReflectionMembers
> (System.Type type) [0x00244] in
> /root/mono2.4/mono-2.4/mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs:774
>   at System.Xml.Serialization.XmlReflectionImporter.ImportClassMapping
> (System.Xml.Serialization.TypeData typeData,
> System.Xml.Serialization.XmlRootAttribute root, System.String
> defaultNamespace) [0x0007a] in
> /root/mono2.4/mono-2.4/mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs:343
>   at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping
> (System.Xml.Serialization.TypeData typeData,
> System.Xml.Serialization.XmlRootAttribute root, System.String
> defaultNamespace) [0x0006e] in
> /root/mono2.4/mono-2.4/mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs:217
>   --- End of inner exception stack trace ---
>   at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping
> (System.Xml.Serialization.TypeData typeData,
> System.Xml.Serialization.XmlRootAttribute root, System.String
> defaultNamespace) [0x00179] in
> /root/mono2.4/mono-2.4/mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs:237
>   at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping
> (System.Type type, System.Xml.Serialization.XmlRootAttribute root,
> System.String defaultNamespace) [0x0003c] in
> /root/mono2.4/mono-2.4/mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs:192
>   at System.Xml.Serialization.XmlSerializer..ctor (System.Type type,
> System.Xml.Serialization.XmlAttributeOverrides overrides, System.Type[]
> extraTypes, System.Xml.Serialization.XmlRootAttribute root, System.String
> defaultNamespace) [0x00047] in
> /root/mono2.4/mono-2.4/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs:226
>   at System.Xml.Serialization.XmlSerializer..ctor (System.Type type)
> [0x00000] in
> /root/mono2.4/mono-2.4/mcs/class/System.XML/System.Xml.XPath/Parser.cs:1
>   at NHibernate.Cfg.XmlHbmBinding.Binder.Deserialize[HbmMapping]
> (System.Xml.XmlNode node) [0x00000]
>   at NHibernate.Cfg.XmlHbmBinding.MappingRootBinder.Bind (System.Xml.XmlNode
> node) [0x00000]
>   at NHibernate.Cfg.Configuration.AddValidatedDocument
> (NHibernate.Cfg.NamedXmlDocument doc) [0x00000]
>   --- End of inner exception stack trace ---

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to nhusers@googlegroups.com
To unsubscribe from this group, send email to 
nhusers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to