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: <session-factory> element was not found :(
PostPosted: Thu Dec 14, 2006 11:04 am 
Regular
Regular

Joined: Fri Feb 03, 2006 5:28 pm
Posts: 73
Location: Québec, QC, Canada
When my hibernate.cfg.xml is not present, I got an error saying so.

When I put the file, I got the error saying that <session-factory> element was not found in the configuration file.

Here is my hibernate config file:

<hibernate-configuration xmlns="urn:nhibernate-configuration-2.0">
<session-factory name="MyDB">
<property name="connection.provider">
NHibernate.Connection.DriverConnectionProvider
</property>
<property name="connection.driver_class">
NHibernate.Driver.MySqlDataDriver
</property>
<property name="connection.connection_string">
Server=localhost;Database=mydatabase;User ID=root;Password=password;pooling=false;
</property>
<property name="show_sql">true</property>
<property name="dialect">
NHibernate.Dialect.MySQLDialect
</property>
<property name="use_outer_join">true</property>
<property name="query.substitutions">
true 1, false 0, yes 'Y', no 'N'
</property>

<mapping assembly="DomainModel" />
</session-factory>
</hibernate-configuration>

Any idea?

I just updated the reference to nhibernate.dll to the lastest beta version..
Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 11:44 am 
Beginner
Beginner

Joined: Tue Nov 28, 2006 4:26 pm
Posts: 32
Location: Montreal, Quebec, Canada
Change
Code:
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.0">
to
Code:
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">

You need to use version 2.2.

BTW, you will need to do this also in your mapping files.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 2:04 pm 
Regular
Regular

Joined: Fri Feb 03, 2006 5:28 pm
Posts: 73
Location: Québec, QC, Canada
Thanks a lot!

Where could I have find that information ?

thanks again !


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 2:40 pm 
Beginner
Beginner

Joined: Tue Nov 28, 2006 4:26 pm
Posts: 32
Location: Montreal, Quebec, Canada
I really don't know. I had to figure that one out myself. I'm sure it is mentioned somewhere. Cheers.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 2:55 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
There isn't any such place right now, only release notes that come in the build. I will prepare a document describing changes between 1.0 and 1.2 once the latter reaches GA.


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.