Technote

(troubleshooting)
Nullpointer exception thrown from the StoreDataBean getJspStoreDir method
Problem(Abstract)
You are using dynacache on WebSphere Application Server 6.0.2 with WebSphere Commerce 5.6.1 or 6.0.0. You see this type of exception:

[2/5/07 0:03:48:414 CST] 0000004b ServletWrappe E SRVE0014E: Uncaught service() exception root cause /ConsumerDirect/include/MiniShopCartDisplay.jsp: java.lang.NullPointerException
at com.ibm.ws.webcontainer.srt.SRTServletRequest.getAttribute(SRTServletRequest.java(Compiled Code))
at com.ibm.ws.cache.servlet.CacheProxyRequest.getAttribute(CacheProxyRequest.java(Compiled Code))
at com.ibm.ws.cache.servlet.CacheProxyRequest.getAttribute(CacheProxyRequest.java(Compiled Code))
at com.ibm.ws.cache.servlet.CacheProxyRequest.getAttribute(CacheProxyRequest.java(Compiled Code))
at com.ibm.commerce.common.beans.StoreDataBean.getJspStoreDir(StoreDataBean.java(Compiled Code))
at sun.reflect.GeneratedMethodAccessor382.invoke(Unknown Source)

The exception may be thrown from a different JSP. However, the exception always originates from the StoreDataBean getJspStoreDir method.

Symptoms of this exception are blank pages being displayed to shoppers. Because the problem is related to dynacache, the problem is intermittent and dependent on traffic to the site.

This problem is likely only to occur if you are using WebSphere Commerce 5.6.1 with WAS 6.0.2 or if you have migrated to WebSphere Commerce 6.0.0 from a previous version of WebSphere Commerce.
Resolving the problem Update your cachespec.xml where it contains this section of code:

<!-- Starts Servlet --> 
<cache-entry>
   <class>servlet</class>
     <name>com.ibm.commerce.struts.ECActionServlet.class</name>
     <property name="consume-subfragments">true</property>
     <property name="save-attributes">false</property>
     <property name="store-cookies">false</property>


Add the bolded text as indicated:

<!-- Starts Servlet --> 
<cache-entry>
   <class>servlet</class>
     <name>com.ibm.commerce.struts.ECActionServlet.class</name>
     <property name="consume-subfragments">true</property>
     <property name="save-attributes">false
       <exclude>jspStoreDir</exclude>
     </property>
     <property name="store-cookies">false</property>
Cross Reference information
Segment Product Component Platform Version Edition
Commerce WebSphere Commerce Enterprise Runtime AIX, i5/OS, Linux, Linux iSeries, Linux pSeries, Linux xSeries, Linux zSeries, Solaris, Windows 6.0
Commerce WebSphere Commerce Business Edition Runtime AIX, i5/OS, Linux, Linux iSeries, Linux pSeries, Linux xSeries, Linux zSeries, Solaris, Windows 5.6.1
Commerce WebSphere Commerce - Express Runtime AIX, i5/OS, Linux, Linux iSeries, Linux pSeries, Linux xSeries, Linux zSeries, Solaris, Windows 5.6.1, 6.0
Commerce WebSphere Commerce Professional Runtime AIX, i5/OS, Linux, Linux iSeries, Linux pSeries, Linux xSeries, Linux zSeries, Solaris, Windows 5.6.1, 6.0
Commerce WebSphere Commerce Developer Enterprise Runtime AIX, i5/OS, Linux, Linux iSeries, Linux pSeries, Linux xSeries, Linux zSeries, Solaris, Windows 6.0
Commerce WebSphere Commerce Developer Business Edition Runtime AIX, i5/OS, Linux, Linux iSeries, Linux pSeries, Linux xSeries, Solaris, Windows 5.6.1
Commerce WebSphere Commerce Developer Express Runtime AIX, i5/OS, Linux, Linux iSeries, Linux pSeries, Linux xSeries, Linux zSeries, Solaris, Windows 5.6.1, 6.0
Commerce WebSphere Commerce Developer Professional Edition Runtime AIX, i5/OS, Linux, Linux iSeries, Linux pSeries, Linux xSeries, Linux zSeries, Solaris, Windows 5.6.1, 6.0
 

Product Alias/Synonym
wcs561 wc561 wcs60 wc60 wcs wc
   

Document Information

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