If I dont have ehcache.xml in my classpath, everything works fine and the default settings of the cache is used. However, when I add ehcache.xml to my classpath, it complains saying that name is not an allowed attribute for <cache>
I did search the forums for this exception and could not find any help.
Any thoughts ?
Hibernate version:
3.0
Mapping documents:
my ehcache.xml looks like
<cache name="<classname>"
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
overflowToDisk="true"
/>
Full stack trace of any exception that occurs:
org.hibernate.cache.CacheException: net.sf.ehcache.CacheException: Cannot configure CacheManager: <file_location>/ehcache.xml:7: Element <cache> does not allow attribute "name".
at org.hibernate.cache.EhCacheProvider.start(EhCacheProvider.java:127)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:157)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1043)
at com.semagix.ontology.util.HibernateUtil.<clinit>(HibernateUtil.java:48)
.....................
Caused by: net.sf.ehcache.CacheException: Cannot configure CacheManager: <file_location>/ehcache.xml:7: Element <cache> does not allow attribute "name".
at net.sf.ehcache.CacheManager.configure(CacheManager.java:156)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:127)
at net.sf.ehcache.CacheManager.create(CacheManager.java:179)
at org.hibernate.cache.EhCacheProvider.start(EhCacheProvider.java:124)
... 15 more
Name and version of the database you are using:
does not matter, I guess
|