Use Coherence cache with WebCenter Portal

On our last WebCenter Portal project, we didn't configure Coherence as our caching mechanism, but we used the default caching mechanism for the content presenter. During the development phase, we didn't really have any problems, until we started with a load & stress test on our application.

During the load test we saw a lot of 500 Errors. In the application log files we noticed the following NullPointerException was logged, especially the caused by clause was interessting:
Caused By: java.lang.NullPointerException
at java.util.LinkedHashMap.get(
at oracle.wcps.cache.internal.MapCache.get(
at oracle.webcenter.content.integration.spi.ucm.UCMCacheHelper.getSecurityInfo(
at oracle.webcenter.content.integration.spi.ucm.SecurityInfoHelper.getCachedSecurityInfo(
at oracle.webcenter.content.integration.spi.ucm.UCMBridge.checkSecurityLevelForNode(
at oracle.webcenter.content.integration.spi.ucm.UCMBridge.canAccessNode(
at oracle.webcenter.content.integration.spi.ucm.NodeOps.getNodeFromCache(
at oracle.webcenter.content.integration.spi.ucm.NodeOps.getUCMNodeWithId(
at oracle.webcenter.content.integration.spi.ucm.NodeOps.getNodeWithId(
at sun.reflect.GeneratedMethodAccessor752.invoke(Unknown Source)

We were able to reproduce this behavior quiet easily, with a load test from 10 sessions for 2 hours. After contact with Oracle Support about this issue, we decided to build in the Coherence caching mechanism.

It's not that hard to implement this feature, for example see a blog by the a team about Coherence cache. 

Ever since we're using Coherence instead of the default caching mechanism for the content presenters, the issue hasn't occurred anymore.