NotSerializableException thrown when using dynacache

with WebSphere Commerce
 Flash (Alert)
Abstract
Use dynamic caching on WebSphere Commerce with WAS throws NotSerializable exceptions which can lead to Out of Memory scenarios.
Content
An exception similar to the following example is displayed in the SystemOut.log file:
[1/30/07 11:59:37:120 CST] 0000008b CacheEntry    E   DYNA0052E: The cached object can not be replicated or saved to disk.
CacheID=/webapp/wcs/stores/com.ibm.commerce.struts.ECActionServlet.cla ss:pathinfo=/ProductDisplay:partNumber=78214:storeId=10151:UTF-8:reque stType=GET ClassName=com.ibm.ws.cache.servlet.FragmentComposerMemento Exception=java.io.NotSerializableException: com.ibm.commerce.command.ViewCommandContextImpl

This exception might be followed by:

java.lang.OutOfMemoryError

Cause

The servlet request attributes are cached regardless of whether the save-attributes property in the cachespec.xml is set to true or false. Some of the WebSphere Commerce HTTPServletRequest attributes are not serializable. This leads to these exceptions.

Who is affected?

Potentially, all customers using dynamic caching on WebSphere Commerce V 5.6.1.x or V6.0.0.x with WAS 6.0.2.9, 6.0.2.11, 6.0.2.13, 6.0.2.15 or 6.0.2.17.

Solution

If you created your WebSphere Commerce instance before applying the WebSphere Commerce Fix Pack 6.0.0.2 complete all of the following 3 steps.

If you created your WebSphere Commerce instance after applying the WebSphere Commerce Fix Pack 6.0.0.2 complete only steps 1 and 2.

Step 1. Upgrade to WAS Fix Pack level 6.0.2.15 or 6.0.2.17.

Step 2. Download and apply the following fixes.

WAS Fix Pack Level 6.0.2.15

1. PK13460 - Disk Cache Enhancements
http://www.ibm.com/support/docview.wss?rs=180&uid=swg24013097
2. PK32201 - OutOfMemory Due to large DRS Messages
http://www.ibm.com/support/docview.wss?rs=180&uid=swg24015569
3. PK38811 - OutOfMemory with commerce V6.0 and some Application Servers
http://www.ibm.com/support/docview.wss?rs=180&uid=swg24015566

OR

WAS Fix Pack Level 6.0.2.17

1. PK32201 - OutOfMemory Due to large DRS Messages
http://www.ibm.com/support/docview.wss?rs=180&uid=swg24015569
2. PK38811 - OutOfMemory with commerce V6.0 and some Application Servers
http://www.ibm.com/support/docview.wss?rs=180&uid=swg24015566
3. PK40514 - Null pointer exception when starting WebServicesRouter.war
http://www.ibm.com/support/docview.wss?rs=180&uid=swg24015586

Step 3. Add the custom Java™ Virtual Machine property com.ibm.ws.cache.CacheConfig.cascadeCachespecProperties and set it to true to enable the PK38811 fix.

a. Open and log in to the Administration Console.

b. For each server running the WebSphere Commerce Enterprise Application:

1. Find the server in the list of Application Servers. Click Process Definition > Java Virtual Machine > Custom Properties > New.

2. Type the following information:

Name: com.ibm.ws.cache.CacheConfig.cascadeCachespecProperties
Value: true



3.. Click OK. This setting takes effect when the server is restarted.

c. Save and (if using a Deployment Manager) synchronize your configuration

d. Restart each server in sequence.

Related information
WAS V6.0.2 Fix list
PK38811 - OutOfMemory with commerce V6.0
PK13460 - Disk Cache Enhancements
PK32201 - OutOfMemory Due to large DRS messages
PK40514 - Null pointer exception when starting WebServ
Cross Reference information
Segment Product Component Platform Version Edition
Commerce WebSphere Commerce Enterprise Performance AIX, i5/OS, Linux, Linux iSeries, Linux pSeries, Linux xSeries, Linux zSeries, Solaris, Windows 6.0
Commerce WebSphere Commerce Business Edition Performance AIX, i5/OS, Linux, Linux iSeries, Linux pSeries, Linux xSeries, Linux zSeries, Solaris, Windows 5.6.1
Commerce WebSphere Commerce - Express Performance AIX, i5/OS, Linux, Linux iSeries, Linux pSeries, Linux xSeries, Linux zSeries, Solaris, Windows 5.6.1, 6.0
Commerce WebSphere Commerce Professional Edition Performance AIX, i5/OS, Linux, Linux iSeries, Linux pSeries, Linux xSeries, Linux zSeries, Solaris, Windows 5.6.1, 6.0
Commerce WebSphere Commerce Developer Enterprise Performance AIX, i5/OS, Linux, Linux iSeries, Linux pSeries, Linux xSeries, Linux zSeries, Solaris, Windows 6.0
Commerce WebSphere Commerce Developer Business Edition Performance AIX, i5/OS, Linux, Linux iSeries, Linux pSeries, Linux xSeries, Solaris, Windows 5.6.1
Commerce WebSphere Commerce Developer Professional Edition Performance AIX, i5/OS, Linux, Linux iSeries, Linux pSeries, Linux xSeries, Linux zSeries, Solaris, Windows 5.6.1, 6.0
Commerce WebSphere Commerce Developer Express Performance AIX, i5/OS, Linux, Linux iSeries, Linux pSeries, Linux xSeries, Linux zSeries, Solaris, Windows 5.6.1, 6.0
 

Product Alias/Synonym
WAS WCS WC WC60 WC6.0 WCS60 WCS6.0
   

Document Information

Current web document: http://www.ibm.com/support/docview.wss?uid=swg21254698