Tuesday, March 31, 2015

Solr PreProcessing Error | SYS_C00151674 | Debugging

com.ibm.commerce.foundation.dataimport.preprocess.CatalogHierarchyDataPreProcessor determineCatalogEntriesForCatalog(Connection connection, String catalogID)
INFO: The catalog with ID: 10051 contains 174468 catalog entries.
 com.ibm.commerce.foundation.dataimport.preprocess.DataImportPreProcessorMain processDataConfig(DataProcessingConfig, String)
INFO: ORA-00001: unique constraint (SYS_C00151674) violated


If any of these 2 queries finds rows, that would be a good pointer and backup deletes and run the delete's and try again.

Rule 1: In Master catalog, you should always have 1 catalog entry belong to 1 master catalog category and CMC and dataload enforces that but if the data is loaded through another channel, this could happen.

1) To identify if there is a catalog entry that has more than one parent category, run the following SQL query against the database:
select catentry_id, catgroup_id from catgpenrel where catentry_id in (select catentry_id from catgpenrel where catalog_id = group by catentry_id having count(catentry_id) > 1)
where is the catalog ID value for which di-preprocess is being run.

The above query will provide a list of catalog entry IDs and the categories that they are mapped to if they are mapped to more than one category in the master catalog ID.
 e.g.
select catentry_id, catgroup_id from catgpenrel
where catentry_id in (select catentry_id from catgpenrel where catalog_id = 10051 group by catentry_id having count(catentry_id) > 1);

Rule 2: You should have always 1 parent category for each master catalog category.
2) To identify if the issue is caused by a category having multiple parent categories in the master catalog, run the following SQL query against the database:
select catgroup_id_parent, catgroup_id_child from catgrprel where catalog_id = and catgroup_id_child in (select catgroup_id_child from catgrprel where catalog_id = group by catgroup_id_child having count(catgroup_id_child) > 1)
e.g.
select catgroup_id_parent, catgroup_id_child from catgrprel where catalog_id = 10051 and
catgroup_id_child in (select catgroup_id_child from catgrprel where catalog_id = 10051
group by catgroup_id_child having count(catgroup_id_child) > 1);

More Logging: Edit the logging.properties file:

    Runtime location: WC_installdir/instances/ instance_name/xml/config/dataimport/logging.properties
    Toolkit location: WCDE_INT70\workspace\WC\xml\config\dataimport\logging.properties
    Verify that .level=FINEST and java.util.logging.FileHandler.level=FINEST
    Verify that java.util.logging.FileHandler.limit=80000000
    Verify that java.util.logging.FileHandler.count=10 

Wednesday, March 4, 2015

Solr Build index fails | would not provide error information | run solr direct

Last I encountered an error where running build-index from toolkit would give the following 2 lines but it wouldn't rebuild index and do nothing.
The program exiting with exit code: 0.
Data import process completed successfully with no errors.


If you need to directly run index on SOLR server: This is the command
http://localhost/solr/MC_10051_CatalogEntry_en_US/dataimport?command=full-import

To Monitor:
http://localhost/solr/MC_10051_CatalogEntry_en_US/dataimport?command=status

Once I ran directly on SOLR, full-import, it gave the errors.
In this particular case, it gave heap error and had to increase 512 MB to 1024 MB in WAS admin console.

Sunday, March 1, 2015

IBM CMC | Approved Content error on read-only mode | Working on Approved content selection

When trying to edit content in CMC, the default mode is read-only and it requires clicking the gear icon on the menu to work on Approved content. Find below screenshots, below click