未找到 catalogId 'xxxProductCatalog' 和版本 'Staged' 的 CatalogVersion
CatalogVersion with catalogId 'xxxProductCatalog' and version 'Staged' not found
我遵循该教程
https://wiki.hybris.com/pages/viewpage.action?pageId=294094418&showComments=true
首先我将 impex 名称更改为 mystore 名称。
然后我转到 hac 控制台并仅更新了我的扩展程序 mystoreinitialdata。
但它给出了这些错误:
Creating project data for mystoreinitialdata ...
Begin importing common data for [mystoremystoreinitialdata]
Begin importing product catalog data for [xxx]
Begin importing content catalog data for [xx]
Begin synchronizing Product Catalog [xxx]
Error creating sample data for mystoreainitialdata. See console output.
ERROR [hybrisHTTP39] [Initialization]
de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException:
CatalogVersion with catalogId 'xxxProductCatalog' and version 'Staged'
not found!
我搜索了一下,我的代码中没有 xxxProductCatalog。
我能做什么?
确保在 InitialDataSystemSetup 中创建的 ImportData 具有 ProductCatalog 和 Content Catalog 属性的有效名称。像这样:
final List<ImportData> importData = new ArrayList<ImportData>();
final ImportData sampleImportData = new ImportData();
sampleImportData.setProductCatalogName("mystore");
sampleImportData.setContentCatalogNames(Arrays.asList("mystore"));
sampleImportData.setStoreNames(Arrays.asList("mystore"));
importData.add(sampleImportData);
getCoreDataImportService().execute(this, context, importData);
getEventService().publishEvent(new CoreDataImportedEvent(context, importData));
getSampleDataImportService().execute(this, context, importData);
getEventService().publishEvent(new SampleDataImportedEvent(context, importData));
还要确保在以下文件的 impex 文件中创建了名称为 "mystoreContentCatalog" 和 "mystoreProductCatalog" 的目录:
/mystoreinitialdata/resources/mystoreinitialdata/import/coredata/contentCatalogs/mystoreContentCatalog/catalog.impex
$contentCatalog=mystoreContentCatalog
$languages=ja,en,de,zh
INSERT_UPDATE ContentCatalog;id[unique=true]
;$contentCatalog
INSERT_UPDATE CatalogVersion;catalog(id)[unique=true];version[unique=true];active;languages(isoCode)
;$contentCatalog;Staged;false;$languages
;$contentCatalog;Online;true;$languages
/mystoreinitialdata/resources/mystoreinitialdata/import/coredata/productCatalogs/mystoreProductCatalog/catalog.impex
$productCatalog=mystoreProductCatalog
$catalogVersion=catalogversion(catalog(id[default=$productCatalog]),version[default='Staged'])[unique=true,default=$productCatalog:Staged]
$languages=ja,en,de,zh
INSERT_UPDATE Catalog;id[unique=true]
;$productCatalog
INSERT_UPDATE CatalogVersion;catalog(id)[unique=true];version[unique=true];active;languages(isoCode);readPrincipals(uid)
;$productCatalog;Staged;false;$languages;employeegroup
;$productCatalog;Online;true;$languages;employeegroup
我遵循该教程
https://wiki.hybris.com/pages/viewpage.action?pageId=294094418&showComments=true
首先我将 impex 名称更改为 mystore 名称。
然后我转到 hac 控制台并仅更新了我的扩展程序 mystoreinitialdata。
但它给出了这些错误:
Creating project data for mystoreinitialdata ...
Begin importing common data for [mystoremystoreinitialdata]
Begin importing product catalog data for [xxx]
Begin importing content catalog data for [xx]
Begin synchronizing Product Catalog [xxx]
Error creating sample data for mystoreainitialdata. See console output.
ERROR [hybrisHTTP39] [Initialization] de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException: CatalogVersion with catalogId 'xxxProductCatalog' and version 'Staged' not found!
我搜索了一下,我的代码中没有 xxxProductCatalog。
我能做什么?
确保在 InitialDataSystemSetup 中创建的 ImportData 具有 ProductCatalog 和 Content Catalog 属性的有效名称。像这样:
final List<ImportData> importData = new ArrayList<ImportData>();
final ImportData sampleImportData = new ImportData();
sampleImportData.setProductCatalogName("mystore");
sampleImportData.setContentCatalogNames(Arrays.asList("mystore"));
sampleImportData.setStoreNames(Arrays.asList("mystore"));
importData.add(sampleImportData);
getCoreDataImportService().execute(this, context, importData);
getEventService().publishEvent(new CoreDataImportedEvent(context, importData));
getSampleDataImportService().execute(this, context, importData);
getEventService().publishEvent(new SampleDataImportedEvent(context, importData));
还要确保在以下文件的 impex 文件中创建了名称为 "mystoreContentCatalog" 和 "mystoreProductCatalog" 的目录:
/mystoreinitialdata/resources/mystoreinitialdata/import/coredata/contentCatalogs/mystoreContentCatalog/catalog.impex
$contentCatalog=mystoreContentCatalog
$languages=ja,en,de,zh
INSERT_UPDATE ContentCatalog;id[unique=true]
;$contentCatalog
INSERT_UPDATE CatalogVersion;catalog(id)[unique=true];version[unique=true];active;languages(isoCode)
;$contentCatalog;Staged;false;$languages
;$contentCatalog;Online;true;$languages
/mystoreinitialdata/resources/mystoreinitialdata/import/coredata/productCatalogs/mystoreProductCatalog/catalog.impex
$productCatalog=mystoreProductCatalog
$catalogVersion=catalogversion(catalog(id[default=$productCatalog]),version[default='Staged'])[unique=true,default=$productCatalog:Staged]
$languages=ja,en,de,zh
INSERT_UPDATE Catalog;id[unique=true]
;$productCatalog
INSERT_UPDATE CatalogVersion;catalog(id)[unique=true];version[unique=true];active;languages(isoCode);readPrincipals(uid)
;$productCatalog;Staged;false;$languages;employeegroup
;$productCatalog;Online;true;$languages;employeegroup