Latest Questions tagged Ehcache

Browse all latest questions tagged Ehcache

Published 25 Aug, 2022
Java - Unable to configure second level cache of hibernate-ehcache-4.3.5.Final.jar in Hibernate 5.1.0.Final

I'm trying to achieve second level cache in my Java EE project using Hibernate. My Hibernate version is 5.1.0.Final. I've created a table employee in my MySQL database. I've included hibernate-ehcache...

Published 07 Sep, 2022
Java - How to log cache hits through @Cacheable annotation?

There is a method in a class like this down below : @Override @Transactional @Cacheable(value = "products", key = "#id") public Product getProduct(long id) throws ApplicationException...

Published 01 Sep, 2022
Java - spring cache - Null key returned for cache operation

I have been working with Spring Cache Abstraction and Ehcache. I'm using the @Cacheable annotation on a target method like so: @Component public class DataService { @Cacheable(value="movieFin...

Published 01 Sep, 2022
Java - One of ehcache nodes mistakenly tries to connect to

Could you guys help me understand why one of ehcache nodes mistakenly tries to connect to ? I'm using ehcache 2.8.3. One of my node is running under VMWare in NAT mode. Therefore host machi...

Published 26 Aug, 2022
Java - Getting `Can't assign requested address` using Ehcache multicast

Getting when trying to start a multicast provider: 2013-09-11 11:45:44,204 [main] ERROR net.sf.ehcache.distribution.MulticastRMICacheManagerPeerProvider: Error starting heart...

Published 25 Aug, 2022
Java - ehcache with Spring. google code xsd file not found

I am using ehcache with Spring. Noticed the below error recently. Also the XSD file is missing now at

Published 23 Aug, 2022
Java - EHCache how to check if something is in the cache or not?

Is there a way of checking if an object is inside an EHCache managed cache? The challenge I face is that I have implemented a method that retrieves a single value from the database (a find(key) method...

Published 10 Sep, 2022
Java - Why does hibernate/ehcache second level cache always miss within the same session?

I have a long-running EntityManager which I periodically clear(). I have a read-write cache configured on one of my entities. I have done some investigation and I can see that the entity is present...

Published 30 Aug, 2022
Java - How to clear all Hibernate cache (ehcache) using Spring?

I am using 2nd level cache and query cache. May I know how to programmatically clear all caches ?

Published 25 Aug, 2022
Java - spring boot cache with ehcache Cannot find cache named xxx for Builder

i'm getting an error while using java configuration for ehcache with spring boot and spring cache starter Cannot find cache named 'bpConfigs' for Builder[public java.util.List

Published 22 Aug, 2022
Java - HHH90001006: Missing cache[default-update-timestamps-region] was created on-the-fly

A trivial Spring Boot 2.5 application with Spring Data JPA with EhCache 3 and Hibernate 5 with Query and Second Level Caches enabled: spring....

Published 22 Aug, 2022
Java - How to cache results of a Spring Data JPA query method without using query cache?

I have a Spring Boot app with Spring Data JPA (hibernate backend) repository classes. I've added a couple custom finder methods, some with specific @Query annotation to tell it how to get the data. I...

Published 21 Aug, 2022
Java - How to change a EhCache members expiry time programmatically

I would like to change the expiry or set the expiry time of a member of an EhCache via Java code. I know when the object should expire, but I'm unsure how to achieve this. I know I can set it for th...

Published 15 Aug, 2022
Java - ehcache hibernate 4

In my application I use the hibernate-core-4.1.8 jar and would like to take an ehCache as 2nd level cache. The jar I am currently using is ehcache-core-2.5.0. I placed it in my WebContetn/WEB-INF/lib...

Published 14 Aug, 2022
Java - Using ehcache in a dropwizard project

I am using dropwizard to create a RESTful service. To avoid hammering the database, I am looking for a good caching solution in java. Searching the web lead me to ehcache. I have read the documentatio...