FAQ : Questions about Errors and Warnings : General Ehcache
General Ehcache
I am using Java 6 and getting a java.lang.VerifyError on the Backport Concurrent classes. Why?
The backport-concurrent library is used in Ehcache to provide java.util.concurrency facilities for Java 4 - Java 6. Use either the Java 4 version which is compatible with Java 4-6, or use the version for your JDK.
I get a javax.servlet.ServletException: Could not initialize servlet filter when using SimplePageCachingFilter. Why?
If you use this default implementation, the cache name is called "SimplePageCachingFilter." You need to define a cache with that name in ehcache.xml. If you override CachingFilter, you are required to set your own cache name.
Why is there a warning in my application's log that a new CacheManager is using a resource already in use by another CacheManager?
WARN CacheManager ... Creating a new instance of CacheManager using the
diskStorePath "C:\temp\tempcache" which is already used by an existing
CacheManager.
This means that, for some reason, your application is trying to create one or more additional instances of Ehcache's CacheManager with the same configuration. Ehcache is automatically resolving the Disk path conflict, which works fine. To eliminate the warning:
*Use a separate configuration per instance.
*If you only want one instance, use the singleton creation methods, i.e., CacheManager.getInstance(). In Hibernate, there is a special provider for this called net.sf.ehcache.hibernate.SingletonEhCacheProvider. For information, see Using Ehcache with Hibernate.
What does the following error mean? "Caches cannot be added by name when default cache config is not specified in the config. Please add a default cache config in the configuration."
From Ehcache 2.4, the defaultCache is optional. When you try to programmatically add a cache by name, CacheManager.add(String name), a default cache is expected to exist in the CacheManager configuration. To fix this error, add a defaultCache to the CacheManager's configuration.
Copyright © 2014 Software AG, Darmstadt, Germany.

Product Logo |   Feedback