We are getting the following error while performing a put operation.
jcs.put(key, id);
Exception in thread "main" java.lang.Error: update: last is null!
at org.apache.jcs.engine.memory.lru.LRUMemoryCache.update(LRUMemoryCache.java:176)
at org.apache.jcs.engine.control.CompositeCache.update(CompositeCache.java:220)
at org.apache.jcs.engine.control.CompositeCache.update(CompositeCache.java:174)
at org.apache.jcs.access.CacheAccess.put(CacheAccess.java:297)
at org.apache.jcs.access.CacheAccess.put(CacheAccess.java:267)
I have searched internet for this error, checked out forums and even checked out source code for jcs and we could not get a clue. We are using jcs version 1.2.7.7 Any help, pointers would be highly appreciated.
We were finally able to root cause the issue. Although this was not intended use case, we were somehow inserting NULL keys into JCS and that caused the issue above.
We also opted out of using JCS caching and started implementing our own local Cache which would get refreshed at start of our data processing cycle. Hope this helps someone who encounters similar issue.