Introduced in Feature Pack 3

Troubleshooting tips: Error scenarios

Refer to the Catalog programming model error scenarios to avoid issues when working with your starter store.

Scenario 1: XPath is mapped to a Solr query that is not valid

In the following example, the catentry_id1 field does not exist in the index:

<_config:queryMapping indexName="CatalogEntry"
     searchQuery="catentry_id1:(?UniqueID?)" xpathKey="/CatalogNavigationView[CatalogEntryView[(UniqueID=)]]"/>
To troubleshoot this issue:
  1. Enable the trace for the com.ibm.commerce.foundation.* and com.ibm.commerce.catalog.* components.
  2. Find the first exception in the log:
    [6/2/11 11:54:05:343 EDT] 0000004a SolrCore      E org.apache.solr.common.SolrException 
    log org.apache.solr.common.SolrException: undefined field catentry_id1
    		at org.apache.solr.schema.IndexSchema.getDynamicFieldType(IndexSchema.java:1136)
    		at org.apache.solr.schema.IndexSchema$SolrQueryAnalyzer.getAnalyzer(IndexSchema.java:389)
    		at org.apache.solr.schema.IndexSchema$SolrIndexAnalyzer.reusableTokenStream(IndexSchema.java:364)
    
  3. Search for the preceding Solr query causing the issue (search for "Final Solr query expression: "):
    
    [6/2/11 11:54:05:343 EDT] 0000004a solr          1 com.ibm.commerce.foundation.internal.server.services.search.processor.
    solr.SolrSearchExpressionProcessor getEntityObjects Final Solr query expression: q=(*:*) AND (catentry_id1:(10459))&fq=storeent_id:
    ("10101")&fq=published:1&fl=catentry_id,storeent_id,buyable,partNumber_ntk,name,thumbnail,fullImage,shortDescription,longDescription,
    keyword,mfName_ntk,catenttype_id_ntk_cs,parentCatgroup_id_facet,parentCatentry_id,
    subscripType,disallowRecOrder,price_USD&start=0&rows=50&timeAllowed=5000&debugQuery=true
    

Scenario 2: The XPath to Solr query mapping is missing from wc-search.xml

A query is formed to return everything. Instead of getting items requested, you will just get the first N items from the index. There are no exceptions in the log.

Scenario 3: JSP file specifies an access profile that is not mapped to a search profile in the wc-component.xml

The request will go through the DataServiceFacade rather than the SearchServiceFacade. The access profile is not defined in any of the template files and you will see an exception complaining about a missing query template.

Scenario 4: JSP file specifies an access profile mapped to a search profile that does not exist

An error resembling the following might occur:

Execution of get request failed. 
com.ibm.commerce.foundation.server.services.dataaccess.exception.ConfigurationException: 
CWXFS3001E: Search profile name "seach_profile_name" is not valid.