Skip to Content
0
Former Member
Apr 09, 2015 at 05:09 PM

"There is no LocaleProvider for (detached) model" while mapping data to DTO in Web Service

816 Views

We are working on OCC implementation in our application. We are facing similar issue when we are using the web service for export products. "/{baseSiteId}/export/products" this is the mapping at ExportController level. We are getting results in the object, but we are getting above error when we are mapping the Product Data to Product DTO as "there is no LocaleProvider for (detached) model de.hybris.platform.servicelayer.model.ItemModelContextImpl@47cc8a5b".

The stack trace is:

 ItemModelContextImpl.getLocaleProvider(boolean) line: 481    
         ItemModelContextImpl.getCurrentLocale() line: 469    
         ItemModelContextImpl.toDataLocale(Locale) line: 406    
         ItemModelContextImpl.getLocalizedValue(String, Locale) line: 323    
         SKUVariantModel(ProductModel).getArticleStatus(Locale) line: 749    
         SKUVariantModel(ProductModel).getArticleStatus() line: 739    
         Orika_SKUVariantModel_SKUVariantModel_Mapper12058310072822$16.mapAtoB(Object, Object, MappingContext) line: not available    
         InstantiateAndUseCustomMapperStrategy(UseCustomMapperStrategy).map(Object, Object, MappingContext) line: 67    
         DefaultBoundMapperFacade<A,B>.map(A, MappingContext) line: 137    
         Orika_ProductWsDTO_ProductData_Mapper12058010897003$15.mapAtoB(Object, Object, MappingContext) line: not available    
         InstantiateAndUseCustomMapperStrategy(UseCustomMapperStrategy).map(Object, Object, MappingContext) line: 67    
         MapperFacadeImpl.map(S, Type<S>, Type<D>, MappingContext, MappingStrategy) line: 263    
         MapperFacadeImpl.mapElement(S, ElementStrategyContext<S,D>) line: 861    
         MapperFacadeImpl.mapAsCollection(Iterable<S>, Type<S>, Type<D>, Collection<D>, MappingContext) line: 686    
         MapperFacadeImpl.mapAsList(Iterable<S>, Type<S>, Type<D>, MappingContext) line: 439    
         Orika_ProductListWsDTO_ProductDataList_Mapper12057871869762$14.mapAtoB(Object, Object, MappingContext) line: not available    
         InstantiateAndUseCustomMapperStrategy(UseCustomMapperStrategy).map(Object, Object, MappingContext) line: 67    
         MapperFacadeImpl.map(S, Class<D>, MappingContext) line: 735    
         DefaultDataMapper(ConfigurableMapper).map(S, Class<D>, MappingContext) line: 154    
         DefaultDataMapper.map(S, Class<D>, String) line: 203    
         ExportController.fullExport(String, int, int, String, String, Boolean) line: 168    


Also, articleStatus attribute is map type attribute present on catalog-items.xml. We are not getting whether the problem is dueto articleStatu or not.

Please let me know the solution for this.

Thanks.