Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure Dynacache CacheProvider?

I'm trying to implement a Dynacache CacheProvider and having problems. Here is what I've done:

  • I've got my Dynacache CacheProvider implementation jar under D:\IBM\WebSphere85\AppServer\lib
  • I have com.ibm.ws.cache.CacheConfig.cacheProviderName configured as JVM custom property with the correct CacheProvider implementation class.
  • Created cacheinstance.properties located under D:\IBM\WebSphere85\AppServer\properties with the relevant settings including the com.ibm.ws.cache.CacheConfig.cacheProviderName right class name value.
  • I have the cacheinstance.properties also part of the Dynacache CacheProvider implementation jar.
  • I have the Object cache Instance configured to have a new dyna cache. This also have the com.ibm.ws.cache.CacheConfig.cacheProviderName as a custom system property.
  • My application using the following to access the cache:

code:

Properties props = new Properties();                               
props.put("com.ibm.ws.cache.CacheConfig.cacheProviderName","com.myCacheProvider");
map = (DistributedObjectCache)DistributedObjectCacheFactory.getMap("mycache",props);

I'm getting the following when the application trying to access DynaCache:

[9/18/12 10:10:52:917 EDT] 00000050 ServerCache   E   DYNA1066E: Unable to initialize the cache provider "com.myCacheProvider". The Dynamic cache will be used to create the cache instance "default" instead of the configured cache provider.
[9/18/12 10:10:52:919 EDT] 00000050 ServerCache   E   ENGLISH ONLY MESSAGE: cacheProvider is null. Check for the cache provider libraries 
[9/18/12 10:10:52:920 EDT] 00000050 ServerCache   I   DYNA1001I: WebSphere Dynamic Cache instance named default initialized successfully.

I'm using WAS 8.5.

Any ideas what is going on and how to debug this?

like image 874
Guy Korland Avatar asked Nov 16 '25 17:11

Guy Korland


1 Answers

Guy,

I would turn on Dyna cache trace to see why this error occurs

Trace String: com.ibm.ws.cache.=all:com.ibm.ws.drs.=all

This should give us clues on what is happening and depending on what we see from the trace would provide us info on what to do next.

HTH

like image 152
Manglu Avatar answered Nov 19 '25 10:11

Manglu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!