-->
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: cache: could not find configuration
PostPosted: Tue Jan 27, 2004 9:40 am 
Beginner
Beginner

Joined: Thu Jan 01, 2004 11:36 am
Posts: 23
Location: Belgium
Hello,

I am trying to use the cache for some time, and combined with createQuery, things go well;

I have however one message at startup which tells me that something is missing:

at startup I am getting this message:
11:08:57,031 WARN Plugin:95 - Could not find configuration for eu.cec.admin.epes.services.exercice.Exercice. Configuring using the defaultCache settings.

this message appears for each <jcs-class-cache> in hibernate.cfg.xml

I thought I linked this class to the specified cache-region by doing the following

    in hibernate.cfg.xml:

    <mapping resource="catalogs/exercice.hbm.xml"/>
    ...
    <jcs-class-cache class="eu.cec.admin.epes.services.exercice.Exercice" region="exercice" usage="read-write"/>

    in exercice.hbm.xml:
    <class
    name="eu.cec.admin.epes.services.exercice.Exercice"
    table="EPES_EXERCICES" >

    <jcs-cache usage="read-write"/>

    in ehcache.xml
    <cache
    name="exercice"
    maxElementsInMemory="10"
    eternal="true"/>


at startup I get the following
    14:24:10,406 INFO Binder:225 - Mapping class: eu.cec.admin.epes.services.exercice.Exercice -> EPES_EXERCICES
    14:24:10,406 DEBUG CacheFactory:32 - cache for: eu.cec.admin.epes.services.exercice.Exercice usage strategy: read-write
    ...
    14:24:10,562 DEBUG CacheFactory:32 - cache for: exercice usage strategy: read-write
    ...
    14:24:10,671 WARN Plugin:95 - Could not find configuration for eu.cec.admin.epes.services.exercice.Exercice. Configuring using the defaultCache settings.


How can I get around this message; maybe is this linked to a difference in the <cache> and <jcs-cache> tag ???
How do I link my class correctly to a cache-region ?

Thanks for any hints,

Jan


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 27, 2004 10:06 am 
Expert
Expert

Joined: Fri Nov 07, 2003 4:24 am
Posts: 315
Location: Cape Town, South Africa
Shouldn't you fully qualify the name in ehcache.xml?

i.e.
Code:
<cache
name="eu.cec.admin.epes.services.exercice.Exercice"
maxElementsInMemory="10"
eternal="true"/>


Justin


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 27, 2004 11:09 am 
Beginner
Beginner

Joined: Thu Jan 01, 2004 11:36 am
Posts: 23
Location: Belgium
Yes, that's it

I got mixed up by the "region" property of query.setCacheRegion and the examples; in fact, the way to link a cache to a class is to give it the same (fully qualified) name as the class; by consequence, these fully qualified names should also be used in my query caches.

The warnings are gone now.

Thanks, Jan


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.