-->
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: 1.2.0 CR1
PostPosted: Fri Feb 23, 2007 9:16 am 
Newbie

Joined: Mon Feb 19, 2007 5:10 am
Posts: 15
Thanks so much for this new release! I can now use DetachedCriteria which I was sorely needing.

Just a quick question though... Have any of the default configurations changed with this new release? I updated by LIB directory on my main project and got the following errors when I tried to run my unit tests:

Code:
Trigger.Qmis.Services.DataAccessTest.ContactDaoHibernateImplTest.CreateAndReadContactTest : System.TypeInitializationException : The type initializer for 'Nested' threw an exception.

  ----> NHibernate.Cache.NoCachingEnabledException : Second-level cache is not enabled for usage [hibernate.cache.use_second_level_cache | hibernate.cache.use_query_cache]

TearDown : System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.

  ----> System.TypeInitializationException : The type initializer for 'Nested' threw an exception.

  ----> NHibernate.Cache.NoCachingEnabledException : Second-level cache is not enabled for usage [hibernate.cache.use_second_level_cache | hibernate.cache.use_query_cache]


I previously hadn't specified values for "hibernate.cache.use_second_level_cache" to "true" "hibernate.cache.provider_class" in my config files. I had to either:
  • Explicitly set "hibernate.cache.use_second_level_cache" to "true" "hibernate.cache.provider_class" to "NHibernate.Caches.SysCache.SysCacheProvider, NHibernate.Caches.SysCache"...

    ...or...
  • Explicitly set "hibernate.cache.use_second_level_cache" to false


I checked in the migration guide, but couldn't find anything about this. Any thoughts?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 23, 2007 9:40 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
That was ported from Hibernate, it's basically a consistency check. You have probably defined <cache usage="..." /> for some class or collection but haven't set the cache provider, in which case NHibernate complains.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 23, 2007 10:34 am 
Newbie

Joined: Mon Feb 19, 2007 5:10 am
Posts: 15
But I'm right in saying that this functionality alignment with Hibernate came in with this latest release? If so, might it need an entry in the migration guide?

I'm fairly new to Hibernate, but the error message I got when I upgraded threw me a bit.

Just a thought.


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.