-->
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: Element <cache> does not allow attribute "name&qu
PostPosted: Wed Mar 16, 2005 1:26 pm 
Newbie

Joined: Mon Mar 07, 2005 7:27 pm
Posts: 6
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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 16, 2005 1:43 pm 
Newbie

Joined: Mon Mar 07, 2005 7:27 pm
Posts: 6
actually the error was due to a typo error. It works fine now. Sorry to bother you guys.


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.