-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Problem with QuickStart (Windows Application. NOT Asp.Net)
PostPosted: Fri Feb 02, 2007 8:42 pm 
Newbie

Joined: Fri Feb 02, 2007 8:32 pm
Posts: 5
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.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 02, 2007 9:50 pm 
Regular
Regular

Joined: Tue Aug 08, 2006 4:28 am
Posts: 96
Location: Hong Kong
You should change back to "urn:nhibernate-mapping-2.0" if you are using NH 1.0.x . "urn:nhibernate-mapping-2.2" is for NH 1.2


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 02, 2007 10:06 pm 
Newbie

Joined: Fri Feb 02, 2007 8:32 pm
Posts: 5
As i said before, i tried both
2.0 and 2.2

None of them work...

Any other ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 03, 2007 5:03 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Yes, change back to 2.0 and tell us what the error is in this case.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 04, 2007 4:43 am 
Newbie

Joined: Fri Feb 02, 2007 8:32 pm
Posts: 5
Thank you!

I tried it before reading your answer and it worked.

CHanged back to 2.0 and worked perfectly.

Why is this?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.