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.  [ 2 posts ] 
Author Message
 Post subject: alpha 2.0 error
PostPosted: Fri Oct 26, 2007 10:08 am 
Regular
Regular

Joined: Fri May 05, 2006 11:54 am
Posts: 51
Hi all,

I have a problem which I really cannot diagnose.

I am using NH in conjunction with Castle.Facilities.NhibernateConfiguration
I have got the latest version of the NHibernate source from svn (NHibernate-2.0.0.Alpha1) and the latest version of Castle. I compiled the NHibernate source first using the .build file. I then configured the Castle stuff against the NHibernate.

Now when I try and run my app., I get

The dialect was not set. Set the property 'dialect'.

I debugged through the NHibernate source and in the NHibernate.Cfg.Congiguration class the Dictionary of properties are different than my configuration. The line:

string dialectName =
Code:
(string)props[Environment.Dialect];
Is returning null because my castle configuration looks like this:

Code:
<settings>
   <item key="hibernate.connection.provider">NHibernate.Connection.DriverConnectionProvider</item>
   <item key="hibernate.connection.driver_class">NHibernate.Driver.SqlClientDriver</item>
   <item key="hibernate.dialect">continuity2.core.nhibernate.MsSql2005Dialect,continuity2.core</item>
   <item key="hibernate.connection.connection_string">Server=server;Database=ncontinuity2;UID=ncontinuity2user;pwd=Passw0rd;</item>
   <item key="hibernate.cache.provider_class">NHibernate.Caches.SysCache.SysCacheProvider, NHibernate.Caches.SysCache</item>
   <item key="hibernate.cache.use_query_cache">true</item>
   <item key="relativeExpiration">216000</item>
   <item key="hibernate.show_sql">false</item>
</settings>


So Environment.Dialect should equal ‘hibernate.dialect’ but actually has the value ‘dialect’.

I am curious as to why this is.

Cheers
Paul


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 27, 2007 12:04 am 
Senior
Senior

Joined: Mon Aug 21, 2006 9:18 am
Posts: 179
Therew were changes in the Environment class..
In your key names remove the "hibernate" prefix so this
'hibernate.connection.provider'
becomes
'connection.provider'

and so on for all the keys

_________________
If this helped...please remember to rate it!


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