-->
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.  [ 1 post ] 
Author Message
 Post subject: Dialect Problem
PostPosted: Mon Feb 08, 2010 12:14 pm 
Newbie

Joined: Mon Dec 21, 2009 4:23 am
Posts: 13
Hello
I have the followinf error

System.TypeInitializationException: The type initializer for 'NHSample.Helper.NHSessionManager' threw an exception. ---> NHibernate.MappingException: Could not compile the mapping document: NHSample.Mappings.CustomerOne.hbm.xml ---> 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(NamedXmlDocument doc)
--- End of inner exception stack trace ---
at NHibernate.Cfg.Configuration.LogAndThrow(MappingException me)
at NHibernate.Cfg.Configuration.AddValidatedDocument(NamedXmlDocument doc)
at NHibernate.Cfg.Configuration.ProcessMappingsQueue()
at NHibernate.Cfg.Configuration.AddDocumentThroughQueue(NamedXmlDocument document)
at NHibernate.Cfg.Configuration.AddXmlReader(XmlTextReader hbmReader, String name)
at NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream, String name)
at NHibernate.Cfg.Configuration.AddResource(String path, Assembly assembly)
at NHibernate.Cfg.Configuration.AddAssembly(Assembly assembly)
...
...

and my hibernate.cfg.xml is

...
...
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.connection_string">
Server=abc,2431;
Initial Catalog=CPM;
User ID=cpm;
Password=cpm2
</property>
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>

<mapping assembly="NHSample"/>
...
...

where do I make mistakes ?!?

Thanks in Advance


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

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.