Troubleshoot and support >


Troubleshoot: Error when a catalog entry does not have a price

If a catalog entry does not have a price there are exceptions in the log file.


Problem

The following exception is in the log files.

6/2/06 13:48:55:750 CEST  3519d5d5 CommerceSrvr  E                    
com.ibm.commerce.price.commands.SelectContractPricesCmdImpl            
handlePriceNotFoundException CMN1011E: Unable to retrieve the price for
catEntry 10058, quantity: 1.0, unit of measure: C62, and currency: USD.
6/2/06 13:48:55:766 CEST  3519d5d5 CommerceSrvr  A                    
com.ibm.commerce.catalog.beans.ProductDataBean                         
processItemCalculatedContractPrices CMN1519I: WebSphere Commerce status
message: "com.ibm.commerce.exception.ECApplicationException".Current   
exception:                                                             
Message:                                                               
   null                                                                
Stack trace:                                                           
com.ibm.commerce.exception.ECApplicationException                      
at                                                                    
com.ibm.commerce.price.commands.PriceCalculationHelper.handlePriceNotFoundException(PriceCalculationHelper.java:1112)                          
at                                                                    
com.ibm.commerce.price.commands.SelectContractPricesCmdImpl.selectOffer(SelectContractPricesCmdImpl.java:542)                                  
at                                                                     
com.ibm.commerce.price.commands.SelectContractPricesCmdImpl.performExecute(SelectContractPricesCmdImpl.java:408)                               
at                                                                    
com.ibm.commerce.command.ECCommandTarget.executeCommand(ECCommandTarget.java:133)                                                              
at                                                                    
com.ibm.ws.cache.command.CommandCache.executeCommand(CommandCache.java:333)                                                                    
at                                                                    
com.ibm.websphere.command.CacheableCommandImpl.execute(CacheableCommandImpl.java:163)                                                          
at                                                                     
com.ibm.commerce.command.AbstractECTargetableCommand.execute(AbstractECTargetableCommand.java:180)                                             
at                                                                    
com.ibm.commerce.price.commands.GetContractUnitPriceCmdImpl.selectPrices(GetContractUnitPriceCmdImpl.java:1651)                                
at                                                                    
com.ibm.commerce.price.commands.GetContractUnitPriceCmdImpl.performExecute(GetContractUnitPriceCmdImpl.java:807)                               
at                                                                     
com.ibm.commerce.command.ECCommandTarget.executeCommand(ECCommandTarget.java:133)                                                              
at                                                                    
com.ibm.ws.cache.command.CommandCache.executeCommand(CommandCache.java:333)                                                                    
at                                                                    
com.ibm.websphere.command.CacheableCommandImpl.execute(CacheableCommandImpl.java:163)  


Solution

In the com.ibm.commerce.price.commands.GetContractUnitPriceCmdImpl class customize the selectPrices(Integer storeId) method by setting the error mode to false when calling the SelectContractPricesCmd. This customization prevents an exception when a catalog entry does not have a price.


+

Search Tips   |   Advanced Search