-->
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: .hbm.xml not found error
PostPosted: Mon May 22, 2006 11:29 am 
Newbie

Joined: Mon May 08, 2006 12:47 pm
Posts: 6
hi,

i have a problem with my application, i am trying to create a session factory with a xml configuration file, this is my xml file:

<?xml version='1.0' encoding='utf-8'?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.0">

<!-- an ISessionFactory instance -->
<session-factory>

<!-- properties -->
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
<property name="connection.connection_string">Server=dbserver;initial catalog=DistribucionPruebas1;User Id=reportes;Password=reportes</property>
<property name="show_sql">false</property>
<property name="dialect">NHibernate.Dialect.MsSql2000Dialect</property>
<property name="use_outer_join">true</property>

<!-- mapping files -->
<mapping resource="ConceptoPago.hbm.xml" assembly="ModeloDominio" />
<mapping resource="AcuerdoFuenteContratacion.hbm.xml" assembly="ModeloDominio" />
<mapping resource="DescripcionVariablesConceptoPago.hbm.xml" assembly="ModeloDominio" />

</session-factory>

</hibernate-configuration>


an this is the way i try to create my session factory:

factory = new Configuration()
.Configure("C:\\NHPago\\config.cfg.xml")
.BuildSessionFactory();

my application assembly is NHPago and my hbm.xml and persistent classes asembly is ModeloDominio.

but i get this error:
Resource: ConceptoPago.hbm.xml not found,

why?
i apprecite ur help...
thanks...


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 22, 2006 11:42 am 
Beginner
Beginner

Joined: Wed May 03, 2006 5:10 am
Posts: 32
Location: Monopoli - Italy
Click on the file and check the property "Build Action" in the .NET Property Window. You have to set it to "Embedded Resource"

Antonella


Top
 Profile  
 
 Post subject: they are already as embebed resource
PostPosted: Mon May 22, 2006 12:34 pm 
Newbie

Joined: Mon May 08, 2006 12:47 pm
Posts: 6
they are already as embebed resource


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 22, 2006 1:02 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
You have to specify the actual name of the embedded resource. It will be <DefaultNamespaceOfYourProject>.SomeFileName.hbm.xml.


Top
 Profile  
 
 Post subject: thanks...
PostPosted: Mon May 22, 2006 2:57 pm 
Newbie

Joined: Mon May 08, 2006 12:47 pm
Posts: 6
thanks...


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.