title: The element 'class' in namespace 'urn:nhibernate-mapping-2.2' has invalid child element 'property'
body: <p>The hbm file is:</p>
  
  <pre><code>&lt;hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"&gt;
      &lt;class name="EMSApplication.Domain.Employee, EMSApplication.Domain" table="ems_Employees" proxy="EMSApplication.Domain.IEmployee, EMSApplication.Domain"&gt;
      &lt;property name="Username"&gt;
          &lt;column name="Username" length="40" sql-type="nvarchar" not-null="true" index="Username"/&gt;
      &lt;/property&gt;
      &lt;property name="Firstname"&gt;
          &lt;column name="Firstname" length="40" sql-type="nvarchar" not-null="true" index="Firstname"/&gt;
      &lt;/property&gt;
      &lt;/class&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>
  
  <p>The Employee.cs:</p>
  
  <pre><code>namespace EMSApplication.Domain {
      public class Employee : IEmployee {
      private string username;
      private string firstname;
  
      public virtual string Firstname {
          get {
          return firstname;
          }
          set {
          firstname = value;
          }
      }
  
      public virtual string Username {
          get {
          return username;
          }
          set {
          username = value;
          }
      }
      }
  }
  </code></pre>
  
  <p>And this is the IEmployee.cs:</p>
  
  <pre><code>namespace EMSApplication.Domain {
      interface IEmployee {
      string Firstname { get; set; }
      string Username { get; set; }
      }
  }
  </code></pre>
  
  <p>Now I am getting the exception:</p>
  
  <blockquote>
    <p>The element 'class' in namespace 'urn:nhibernate-mapping-2.2' has
    invalid child element 'property' in namespace
    'urn:nhibernate-mapping-2.2'. List of possible elements expected:
    'meta, subselect, cache, synchronize, comment, tuplizer, id,
    composite-id' in namespace 'urn:nhibernate-mapping-2.2'.</p>
  </blockquote>
  
  <p>I am using Spring.Net with NHibernate. The invocation of the hbm file is:</p>
  
  <pre><code>&lt;object id="NHibernateSessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate32"&gt;
      &lt;property name="DbProvider" ref="DbProvider"/&gt;
      &lt;property name="MappingResources"&gt;
      &lt;list&gt;
          &lt;value&gt;assembly://EMSApplication/EMSApplication.Domain/EMSApplication.hbm.xml&lt;/value&gt;
      &lt;/list&gt;
      &lt;/property&gt;
      &lt;property name="HibernateProperties"&gt;
      &lt;dictionary&gt;
          &lt;entry key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider"/&gt;
          &lt;entry key="dialect" value="NHibernate.Dialect.MsSql2008Dialect"/&gt;
          &lt;entry key="connection.driver_class" value="NHibernate.Driver.SqlClientDriver"/&gt;
          &lt;entry key="proxyfactory.factory_class" value="NHibernate.Bytecode.DefaultProxyFactoryFactory, NHibernate"/&gt;
          &lt;entry key="show_sql" value="true"/&gt;
          &lt;entry key="hbm2ddl.auto" value="update"/&gt;
          &lt;entry key="cache.use_query_cache" value="true"/&gt;
      &lt;/dictionary&gt;
      &lt;/property&gt;
  
      &lt;property name="ExposeTransactionAwareSessionFactory" value="true" /&gt;
  &lt;/object&gt;
  </code></pre>
  
  <p>The project structure is:</p>
  
  <p><img src="https://i.stack.imgur.com/TUeKN.png" alt="enter image description here"></p>
  
  <p>Any help will be very helpful. </p>
  
  <p>Thanks.</p>