Hibernate version: 1.0.4
Here is my problem.
I haven't started to write methods.
Only classes with properties and the XML and hbm.xml files.
the thing is that i'm using it for Windows Form applications and not for Asp.Net.
So, instead of creating the Web.config file, y created the App.Config.
This is what I have.
Code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<!-- Add this element -->
<configSections>
<section
name="hibernate-configuration"
type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate"
/>
</configSections>
<!-- Add this element -->
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="dialect">NHibernate.Dialect.MsSql2000Dialect</property>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.connection_string">Server=PCJUANU;initial catalog=JDB;Integrated Security=SSPI</property>
<mapping assembly="QuickStart" />
</session-factory>
</hibernate-configuration>
</configuration>
And for the hbm.xml file:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
namespace="QuickStart"
assembly="QuickStart">
<class name="Paciente" table="Pacientes">
<id name="Id">
<column name="IdPaciente" sql-type="int" not-null="true" />
<generator class="uuid.hex" />
</id>
<property name="Nombre">
<column name="Nombre" length="100" not-null="true" />
</property>
<property name="Apellido">
<column name="Apellido" length="100" not-null="true" />
</property>
<property name="DomicilioCalle">
<column name="DomCalle" length="50" not-null="false" />
</property>
<property name="DomicilioNumero">
<column name="DomNumero" length="10" not-null="false" />
</property>
<property name="DomicilioMonoblock">
<column name="DomMonoblock" length="5" not-null="false" />
</property>
<property name="DomicilioPiso">
<column name="DomPiso" length="5" not-null="false" />
</property>
</class>
</hibernate-mapping>
The Entire solution has 2 projects.
One is the Bussiness Layer, and the other is the interface layer.
I tried putting the App.Config file in the Bussiness Layer and also, on the Interface Layer, but keep getting the same problem.
As you can see i changed the "urn:nhibernate-mapping-2.0" to urn:nhibernate-mapping-2.2" as i read everywhere.
So.. once i have all that, without making anything else, i tried to compile my solution...
and this is what i get:
Quote:
Message 1 Could not find schema information for the element 'urn:nhibernate-configuration-2.2:hibernate-configuration'. C:\Sistemas\Fuentes\JSoft\Transplantes\Proyecto\App.config 12 6 Proyecto
Message 2 Could not find schema information for the element 'urn:nhibernate-configuration-2.2:session-factory'. C:\Sistemas\Fuentes\JSoft\Transplantes\Proyecto\App.config 13 8 Proyecto
Message 3 Could not find schema information for the element 'urn:nhibernate-configuration-2.2:property'. C:\Sistemas\Fuentes\JSoft\Transplantes\Proyecto\App.config 14 10 Proyecto
Message 4 Could not find schema information for the attribute 'name'. C:\Sistemas\Fuentes\JSoft\Transplantes\Proyecto\App.config 14 19 Proyecto
Message 5 Could not find schema information for the element 'urn:nhibernate-configuration-2.2:property'. C:\Sistemas\Fuentes\JSoft\Transplantes\Proyecto\App.config 15 10 Proyecto
Message 6 Could not find schema information for the attribute 'name'. C:\Sistemas\Fuentes\JSoft\Transplantes\Proyecto\App.config 15 19 Proyecto
Message 7 Could not find schema information for the element 'urn:nhibernate-configuration-2.2:property'. C:\Sistemas\Fuentes\JSoft\Transplantes\Proyecto\App.config 16 10 Proyecto
Message 8 Could not find schema information for the attribute 'name'. C:\Sistemas\Fuentes\JSoft\Transplantes\Proyecto\App.config 16 19 Proyecto
Message 9 Could not find schema information for the element 'urn:nhibernate-configuration-2.2:mapping'. C:\Sistemas\Fuentes\JSoft\Transplantes\Proyecto\App.config 18 10 Proyecto
Message 10 Could not find schema information for the attribute 'assembly'. C:\Sistemas\Fuentes\JSoft\Transplantes\Proyecto\App.config 18 18 Proyecto
Message 11 Could not find schema information for the element 'urn:nhibernate-configuration-2.2:hibernate-configuration'. C:\Sistemas\Fuentes\JSoft\Negocios\App.config 12 6 Negocios
Message 12 Could not find schema information for the element 'urn:nhibernate-configuration-2.2:session-factory'. C:\Sistemas\Fuentes\JSoft\Negocios\App.config 13 8 Negocios
Message 13 Could not find schema information for the element 'urn:nhibernate-configuration-2.2:property'. C:\Sistemas\Fuentes\JSoft\Negocios\App.config 14 10 Negocios
Message 14 Could not find schema information for the attribute 'name'. C:\Sistemas\Fuentes\JSoft\Negocios\App.config 14 19 Negocios
Message 15 Could not find schema information for the element 'urn:nhibernate-configuration-2.2:property'. C:\Sistemas\Fuentes\JSoft\Negocios\App.config 15 10 Negocios
Message 16 Could not find schema information for the attribute 'name'. C:\Sistemas\Fuentes\JSoft\Negocios\App.config 15 19 Negocios
Message 17 Could not find schema information for the element 'urn:nhibernate-configuration-2.2:property'. C:\Sistemas\Fuentes\JSoft\Negocios\App.config 16 10 Negocios
Message 18 Could not find schema information for the attribute 'name'. C:\Sistemas\Fuentes\JSoft\Negocios\App.config 16 19 Negocios
Message 19 Could not find schema information for the element 'urn:nhibernate-configuration-2.2:mapping'. C:\Sistemas\Fuentes\JSoft\Negocios\App.config 18 10 Negocios
Message 20 Could not find schema information for the attribute 'assembly'. C:\Sistemas\Fuentes\JSoft\Negocios\App.config 18 18 Negocios
Any Ideas?
Thanks.
P.S: Excuse my english, i speak english really well, but i'm a little tired of this problem.