-->
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.  [ 3 posts ] 
Author Message
 Post subject: hibernate.cfg.xml not working
PostPosted: Wed Feb 21, 2007 10:23 am 
Newbie

Joined: Tue Feb 06, 2007 5:59 pm
Posts: 14
if i put <nhibernate> in app.config , it works fine

Once I separate into hibernate.cfg.xml, (embedded resourse)
it is not working

from the log file , i can see this error
Could not configure datastore from input stream
NHibernate.HibernateException: The dialect was not set. Set the property hibernate.dialect.
at NHibernate.Dialect.Dialect.GetDialect()
at NHibernate.Dialect.Dialect.GetDialect(IDictionary props)
at NHibernate.Cfg.Configuration.AddValidatedDocument(XmlDocument doc)
at NHibernate.Cfg.Configuration.AddXmlReader(XmlTextReader hbmReader)
at NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream)

Do I need any setting in app.config ?

_________________
www.pakmailmarkham.ca
www.digitmind.com
www.fineartcollectors.com


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 21, 2007 11:24 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
You need to call Configure(). Settings from app.config are picked up automatically, settings from *.cfg.xml are not.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 21, 2007 4:02 pm 
Newbie

Joined: Tue Feb 06, 2007 5:59 pm
Posts: 14
I dunno why it complaint resource file is missing

I got "digi.hbm.xml" in embedded resource.

<hibernate-configuration xmlns="urn:nhibernate-configuration-2.0">
....
<mapping resource="digi.hbm.xml" assembly="digi" />
</hibernate-configuration>

However it works fine once I remove <mapping resource../>

_________________
www.pakmailmarkham.ca
www.digitmind.com
www.fineartcollectors.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.