Armenian Knowledge Base

Armenian Knowledge Base (
-   Languages, Compilers, Interpreters (
-   -   NHibernate: Problem with Configuration (

Intel 04.03.2007 08:49

NHibernate: Problem with Configuration
Hi guys, i'm getting confused with configuration errors of Hibernate for .NET:

I'm trying to map a simple MySQL table, which is completely independent from other tables. I looked through docs, forums, but didn't get any useful information/response.

I'm using .NET 2.0, MySQL 5.0, and NHibernatie 1.0.4
in my hibernate.cfg.xml sesson-factory scope i have:

    <property name="dialect">NHibernate.Dialect.MySQLDialect</property>
    <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
    <property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property>
    <property name="connection.connection_string">Server=myHost;Database=realty;User ID=myUser;Password=myPass</property>

    <mapping assembly="Application.DB" />

here how i map a simple pesistent class:

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"
  namespace="Application.DB" assembly="Application.DB">

 <class name="SimpleTable" table="simpletable">

  <!-- A 32 hex character is our surrogate key. It's automatically
          generated by NHibernate with the UUID pattern. -->
  <id name="Id">
    <column name="id" sql-type="int" not-null="true"/>
    <generator class="uuid.hex" />

  <property name="Text">
    <column name="text" />


my persistent class (Application.SimpleTable) has valid structure for this configuration.

Also i referenced MySQL driver to my project.

When IIS is trying to Configure an instance, it throws an exception
Here's the Exception Message:
Could not load file or assembly 'Appartment.DB' or one of its dependencies. The system cannot find the file specified.

Actually i think that the problem is in <mapping> tag's attribute(s), what should i put there?

All times are GMT. The time now is 10:03.

Powered by vBulletin® Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.