WebSphere Commerce 7 | Storefront | Product Display Page | "Add to Cart" button failed to load | CMN0420E | CWXFR9010I

After publishing new store in the Extended Sites, all the prices are coming up fine. But, in the Product Display Page, "Add to Cart" button is not getting displayed and it is throwing the following exception,

[8/11/16 5:42:31:712 GMT] 00000069 CommerceSrvr  E com.ibm.commerce.command.ECCommandTarget executeCommand CMN0420E: The following command exception has occurred during processing: "java.lang.NullPointerException". java.lang.NullPointerException
        at com.ibm.commerce.price.commands.PriceRuleGetContractUnitPriceCmdImpl.getRuleExecutionCommand(PriceRuleGetContractUnitPriceCmdImpl.java:512)
        at com.ibm.commerce.price.commands.PriceRuleGetContractUnitPriceCmdImpl.executeRule(PriceRuleGetContractUnitPriceCmdImpl.java:419)
        at com.ibm.commerce.price.commands.PriceRuleGetContractUnitPriceCmdImpl.calculatePrices(PriceRuleGetContractUnitPriceCmdImpl.java:198)
        at com.ibm.commerce.price.commands.PriceRuleGetContractUnitPriceCmdImpl.performExecute(PriceRuleGetContractUnitPriceCmdImpl.java:123)
        ...........
        ...........
        at com.ibm.commerce.command.AbstractECTargetableCommand.execute(AbstractECTargetableCommand.java:199)
        at com.ibm.commerce.price.commands.AbstractGetPriceCmdImpl.execute(AbstractGetPriceCmdImpl.java:1306)
        at com.ibm.commerce.price.commands.AbstractGetPriceCmdImpl.executeNextInChain(AbstractGetPriceCmdImpl.java:1224)
        at com.ibm.commerce.price.commands.EnsureOffersExistGetContractUnitPriceCmdImpl.performExecute(EnsureOffersExistGetContractUnitPriceCmdImpl.java:220)
        ...........
        ...........
        at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:263)
        at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:100)
        at com.ibm._jsp._CachedProductOnlyDisplay._jspx_meth_c_set_274(_CachedProductOnlyDisplay.java:16947)
        at com.ibm._jsp._CachedProductOnlyDisplay._jspx_meth_c_when_32(_CachedProductOnlyDisplay.java:17015)
        at com.ibm._jsp._CachedProductOnlyDisplay._jspx_meth_c_choose_20(_CachedProductOnlyDisplay.java:17304)
        at com.ibm._jsp._CachedProductOnlyDisplay._jspx_meth_c_if_64(_CachedProductOnlyDisplay.java:17346)
        at com.ibm._jsp._CachedProductOnlyDisplay._jspService(_CachedProductOnlyDisplay.java:3099)
        at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java:307)
        at com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java:576)
        ..............
        ..............
[8/11/16 5:42:31:713 GMT] 00000069 ExtendedInfo  I   CWXFR9010I: Extended information : [URL=http://localhost/webapp/wcs/stores/servlet/ProductDisplay] [parameters=storeId[0]=10651 storeId[1]=10651 parent_category_rn=40722 productId[0]=5750001 productId[1]=5750001 urlRequestType=Base categoryId=40792 top_category=40718 catalogId[0]=12051 catalogId[1]=12051 langId[0]=-24 langId[1]=-24 ] [userId=-1002]
[8/11/16 5:42:31:715 GMT] 00000069 CommerceSrvr  E com.ibm.commerce.command.ECCommandTarget executeCommand CMN0420E: The following command exception has occurred during processing: "java.lang.NullPointerException". java.lang.NullPointerException
        at com.ibm.commerce.price.commands.AbstractGetPriceCmdImpl.createFromOutput(AbstractGetPriceCmdImpl.java:578)
        at com.ibm.commerce.price.commands.EnsureOffersExistGetContractUnitPriceCmdImpl.performExecute(EnsureOffersExistGetContractUnitPriceCmdImpl.java:222)
        at com.ibm.commerce.command.ECCommandTarget.executeCommand(ECCommandTarget.java:157)
        at com.ibm.ws.cache.command.CommandCache.executeCommand(CommandCache.java:332)
        at com.ibm.websphere.command.CacheableCommandImpl.execute(CacheableCommandImpl.java:166)
        at com.ibm.commerce.command.MeasuredCacheableCommandImpl.execute(MeasuredCacheableCommandImpl.java:63)
        at com.ibm.commerce.command.AbstractECTargetableCommand.execute(AbstractECTargetableCommand.java:199)
        at com.ibm.commerce.price.commands.AbstractGetPriceCmdImpl.execute(AbstractGetPriceCmdImpl.java:1306)
        at com.ibm.commerce.price.commands.AbstractGetPriceCmdImpl.executeNextInChain(AbstractGetPriceCmdImpl.java:1224)
        at com.ibm.commerce.price.commands.CompositeGetContractUnitPriceCmdImpl.executeCommand(CompositeGetContractUnitPriceCmdImpl.java:339)
        at com.ibm.commerce.price.commands.CompositeGetContractUnitPriceCmdImpl.performExecute(CompositeGetContractUnitPriceCmdImpl.java:230)
        .............
        .............
        at javax.el.BeanELResolver.getValue(BeanELResolver.java:65)
        at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
        at org.apache.el.parser.AstValue.getValue(AstValue.java:102)
        at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:263)
        at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:100)
        at com.ibm._jsp._CachedProductOnlyDisplay._jspx_meth_c_set_274(_CachedProductOnlyDisplay.java:16947)
        at com.ibm._jsp._CachedProductOnlyDisplay._jspx_meth_c_when_32(_CachedProductOnlyDisplay.java:17015)
        at com.ibm._jsp._CachedProductOnlyDisplay._jspx_meth_c_choose_20(_CachedProductOnlyDisplay.java:17304)
        at com.ibm._jsp._CachedProductOnlyDisplay._jspx_meth_c_if_64(_CachedProductOnlyDisplay.java:17346)
        at com.ibm._jsp._CachedProductOnlyDisplay._jspService(_CachedProductOnlyDisplay.java:3099)
        at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        ............
        ............


When we tried to validate Price Lists & Price Rules for the store, it looks fine. But, there were no default Customer Segment and Price Rules setup in Commerce Accelerator and after setting up them from Commerce Accelerator, it started coming fine.

Here are the steps to setup default Customer Segments and Price rules,
1. Login to Commerce Accelerator
2. Select "Merchandise" --> "Catalog Filter and Price Rule"
3. In the "Catalog Filter" tab, set property value for the Catalog filter number


4. In the "Price Rule" tab, set property value for the Price Rule

No comments:

Post a Comment

My Writings........

HCL Commerce v9.1 | Local Store Vs Remote Store

  Local Store Remote Store Project Type Migrated (Lift & Shift) - Newly Imp...