Skip to Content
-1
Oct 17, 2016 at 02:58 PM

Category with code '94DCB22F-0EB2-430C-AA68-F2399BEE7B09' is not unique. 2 categories found!

214 Views

When i search for a particular category, it throws an exception saying Category with code is not unique. 2 Categories found. Thing is the query returns both staged and online values. How to resolve this value?

I am using the ootb methods to do this. i did not write any new query which is resulting in this scenario. PFB for the exception stacktrace. de.hybris.platform.servicelayer.exceptions.AmbiguousIdentifierException: Category with code '94DCB22F-0EB2-430C-AA68-F2399BEE7B09' is not unique. 2 categories found! INFO | jvm 1 | main | 2016/10/17 17:49:12.325 | at de.hybris.platform.category.impl.DefaultCategoryService.getCategoryForCode(DefaultCategoryService.java:184) INFO | jvm 1 | main | 2016/10/17 17:49:12.357 | at de.hybris.platform.commercesearch.searchandizing.heroproduct.impl.DefaultHeroProductDefinitionService.getSolrHeroProductDefinitionForCategoryCode(DefaultHeroProductDefinitionService.java:53) INFO | jvm 1 | main | 2016/10/17 17:49:12.372 | at de.hybris.platform.commercesearch.searchandizing.heroproduct.impl.DefaultHeroProductFacade.getHeroProductsForCategory(DefaultHeroProductFacade.java:48) INFO | jvm 1 | main | 2016/10/17 17:49:12.388 | at de.hybris.platform.commercesearch.search.solrfacetsearch.populators.BoostSearchQueryPopulator.addHeroProductBoosts(BoostSearchQueryPopulator.java:144) INFO | jvm 1 | main | 2016/10/17 17:49:12.388 | at de.hybris.platform.commercesearch.search.solrfacetsearch.populators.BoostSearchQueryPopulator.populate(BoostSearchQueryPopulator.java:106) INFO | jvm 1 | main | 2016/10/17 17:49:12.403 | at de.hybris.platform.commercesearch.search.solrfacetsearch.populators.BoostSearchQueryPopulator.populate(BoostSearchQueryPopulator.java:1) INFO | jvm 1 | main | 2016/10/17 17:49:12.403 | at de.hybris.platform.converters.impl.AbstractPopulatingConverter.populate(AbstractPopulatingConverter.java:61) INFO | jvm 1 | main | 2016/10/17 17:49:12.419 | at de.hybris.platform.commerceservices.converter.impl.AbstractPopulatingConverter.convert(AbstractPopulatingConverter.java:40) INFO | jvm 1 | main | 2016/10/17 17:49:12.435 | at de.hybris.platform.commerceservices.search.solrfacetsearch.impl.DefaultSolrProductSearchService.doSearch(DefaultSolrProductSearchService.java:124) INFO | jvm 1 | main | 2016/10/17 17:49:12.449 | at de.hybris.platform.commerceservices.search.solrfacetsearch.impl.DefaultSolrProductSearchService.searchAgain(DefaultSolrProductSearchService.java:111) INFO | jvm 1 | main | 2016/10/17 17:49:12.465 | at de.hybris.platform.commerceservices.search.solrfacetsearch.impl.DefaultSolrProductSearchService.searchAgain(DefaultSolrProductSearchService.java:1) INFO | jvm 1 | main | 2016/10/17 17:49:12.469 | at de.hybris.platform.commercefacades.search.solrfacetsearch.impl.DefaultSolrProductSearchFacade$4.execute(DefaultSolrProductSearchFacade.java:184) INFO | jvm 1 | main | 2016/10/17 17:49:12.489 | at de.hybris.platform.commercefacades.search.solrfacetsearch.impl.DefaultSolrProductSearchFacade$4.execute(DefaultSolrProductSearchFacade.java:1) INFO | jvm 1 | main | 2016/10/17 17:49:12.489 | at de.hybris.platform.commerceservices.threadcontext.impl.DefaultThreadContextService.executeInContext(DefaultThreadContextService.java:54) INFO | jvm 1 | main | 2016/10/17 17:49:12.520 | at de.hybris.platform.commercefacades.search.solrfacetsearch.impl.DefaultSolrProductSearchFacade.categorySearch(DefaultSolrProductSearchFacade.java:177) INFO | jvm 1 | main | 2016/10/17 17:49:12.536 | at com.xxxx.storefront.controllers.pages.CategoryPageController.category(CategoryPageController.java:272)