-
Notifications
You must be signed in to change notification settings - Fork 48
Error creating caches with a TTL #48
Comments
I wrote this small test: javax.cache.CacheManager cacheManager = Caching.getCachingProvider().getCacheManager();
CacheConfiguration cacheConfiguration = new CacheConfiguration();
cacheConfiguration.setTimeToLiveSeconds(60 * 60 * 24 * 365 * 10);
cacheConfiguration.setTimeToIdleSeconds(60 * 60 * 24 * 365 * 10);
JCacheConfiguration jCacheConfiguration = new JCacheConfiguration(cacheConfiguration);
javax.cache.Cache cache = cacheManager.createCache("boo", jCacheConfiguration);
cache.put("key", "Value");
assertThat(cache.get("key"), is((Object) "Value")); And nothing fails... Not sure what NPE you see @igmar , could you share it? |
I'll check when I get back from holiday. No usable laptop with me. |
To bring this back up : Error in custom provider, java.lang.NullPointerException 1 error
Caused by: java.lang.NullPointerException |
I'll also do some diving, to see if I can figure out what causes this. It's a DI usage, in the Play framework in case it's relevant. |
It blows up in JCacheConfiguration.java : Factory expiryPolicyFactory = cConfiguration.getExpiryPolicyFactory(); expiryPolicyFactory is null -> kaboom. No idea yet as to why. |
This works :
while this gives me a NPE :
where
NO_EXPIRE
is equal to60 * 60 * 24 * 365 * 10
The only difference I see on code paths is that the second doesn't set an expire factory, while the first path does.
The text was updated successfully, but these errors were encountered: