SAP Knowledge Base Article - Preview

2318654 - No Matching DataLocale for Languages of Validation Constraint that contains region in the ISO code

Symptom

If validation languages, whose isocode contains region code e.g. zh_TW, have been set for any validation constraints, then system will throw exceptions during validation.

Validation Languages in HMC:

11.png

Error Message in HMC:

22.png

Error Nessage in Console log:

de.hybris.platform.servicelayer.exceptions.ModelSavingException: [de.hybris.platform.validation.interceptors.ValidationInterceptor@4c4d6661]: unexpected validator error: No matching DataLocale for zh_tw ( tried [zh_tw] on available locales {es_CO=es_CO->es_CO, in=in->id, pt=pt->pt, fr=fr->fr, ru=ru->ru, ja=ja->ja, zh_TW=zh_TW->zh_TW, it=it->it, ko=ko->ko, de=de->de, es=es->es, zh=zh->zh, en=en->en, hi=hi->hi} )

              at de.hybris.platform.servicelayer.internal.model.impl.wrapper.ModelWrapper.invokeValidateInterceptors(ModelWrapper.java:288)

              at de.hybris.platform.servicelayer.internal.model.impl.wrapper.ModelWrapper.validate(ModelWrapper.java:216)

              at de.hybris.platform.servicelayer.internal.model.extractor.impl.DefaultModelExtractor.process(DefaultModelExtractor.java:60)

              at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.performPersistenceOperations(DefaultModelService.java:625)

              at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.saveAllInternal(DefaultModelService.java:620)

Caused by: java.lang.IllegalArgumentException: No matching DataLocale for zh_tw ( tried [zh_tw] on available locales {es_CO=es_CO->es_CO, in=in->id, pt=pt->pt, fr=fr->fr, ru=ru->ru, ja=ja->ja, zh_TW=zh_TW->zh_TW, it=it->it, ko=ko->ko, de=de->de, es=es->es, zh=zh->zh, en=en->en, hi=hi->hi} )

              at de.hybris.platform.servicelayer.internal.i18n.impl.DefaultLocalizationService.matchDataLocale(DefaultLocalizationService.java:242)

              at de.hybris.platform.servicelayer.internal.i18n.impl.DefaultLocalizationService.getDataLocale(DefaultLocalizationService.java:146)

              at de.hybris.platform.servicelayer.i18n.impl.DefaultI18NService.getBestMatchingLocale(DefaultI18NService.java:167)

              at de.hybris.platform.servicelayer.internal.converter.impl.DefaultLocaleProvider.toDataLocale(DefaultLocaleProvider.java:61)

 


Read more...

Environment

SAP Hybris commerce suite 5.6 and above

Product

SAP Hybris Commerce 6.0 ; SAP Hybris Commerce 6.1 ; SAP hybris Commerce 5.7 ; SAP hybris Commerce Suite 5.6

Keywords

hybris, locale, languages, IllegalArgumentException , KBA , CEC-COM-CPS , SAP Commerce , Bug Filed

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.