Could not compile the mapping document:

Mar 1, 2010 at 6:13 PM

All my attempts to execute the command result in the following error

Error encountered: Could not compile the mapping document: IBH.Data.Content.NHibernateMaps.TextType.hbm.xml

 

The command I executed is as follows

nst /c:hibernate.cfg.xml /a:IBH.Data.Content.dll

 

Error encountered: Could not compile the mapping document: IBH.Data.Content.NHib
ernateMaps.TextType.hbm.xml
 

 

Coordinator
Mar 3, 2010 at 3:18 PM

Kalyan,

A few questions:

 

1. Does the application itself have a problem loading/using that mapping file?

2. What version of NHibernate are you using?

3. I am assuming based on the command you executed that the mapping files are embedded resources in the IBH.Data.Content.dll

4. Any chance you could post the mapping document?

Oct 26, 2010 at 5:28 PM
Edited Oct 27, 2010 at 7:53 AM

Hi,

I'm getting the same error.

When I use the schema tool programatically:

 

            new SchemaExport(ObjectFactory.GetInstance<Configuration>()).Execute(false, true, false);

 

I have no problems to generate the database and the application is working as expected.

I'm using NHibernate version 2.1.2.4000.

Please see the mapping:

 

<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-access="property" auto-import="true" default-cascade="none">
<class xmlns="urn:nhibernate-mapping-2.2" mutable="true" name="adMoto.Core.Nh.ExchangeRates, adMoto.Core" table="`ExchangeRates`">
<id name="Id" type="System.Int32">
<column name="Id" />
<generator class="identity" />
</id>
<property name="Conversion"/>
<property name="Symbol"/>
<property name="MidRate"/>
<many-to-one class="adMoto.Core.Nh.ExchangeTable, adMoto.Core" name="ExchangeTable" cascade="none">
<column name="ExchangeTableId" />
</many-to-one>
</class>
</hibernate-mapping>

 

Thanks,
Marek