views:

1182

answers:

1

Ok this is driving me crazy....

Server: JBoss 4.0.5

I have my hibernate-service.xml where I include the:

<attribute name="CacheProviderClass">
   org.hibernate.cache.EhCacheProvider
</attribute>

Which seems to work fine in terms of loading and getting the ehcache started, but I do see this pesky message about:

WARNING: No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/jboss-4.0.5.GA/server/default/lib/ehcache-1.6.1.jar!/ehcache-failsafe.xml

The final app is a ear file with has the following structure:

 META-INF/MANIFEST.MF
 META-INF/application.xml
 META-INF/jboss-app.xml
 app-mdb.jar
 app.har
 app.war

the app.har contains the beans and the hibernate mappings and the hibernate-service.xml and the hibernate.cfg.xml and and the ehcache.xml at the root of the classes.

It all works just fine, MDBs and Webapp works but I have not been able to configure the ehcache and I suspect that I am either not specifying the configuration correctly or the ehcache.xml is not on the right place.

A: 

I suggest using the hibernate integration that comes with EhCache, rather than the other way around (same class name, different package). It's better documented, including how to configure it properly.

skaffman