on 2018 Apr 03 12:14 PM
Hi, We have custom item type having string attributes with meta type defined as variantAttributeDescriptor. We added this item type to explorer tree in backoffice. It works fine 5.7 hybris. In 6.6 when we try to open the custom item type in backoffice explorer tree it gives following class cast exception
java.lang.ClassCastException: de.hybris.platform.core.model.type.ComposedTypeModel cannot be cast to de.hybris.platform.variants.model.VariantTypeModel
at de.hybris.platform.variants.model.VariantAttributeDescriptorModel.getEnclosingType(VariantAttributeDescriptorModel.java:109) ~[models.jar:?]
at de.hybris.platform.variants.model.VariantAttributeDescriptorModel.getEnclosingType(VariantAttributeDescriptorModel.java:1) ~[models.jar:?]
at com.hybris.backoffice.cockpitng.dataaccess.facades.type.DefaultPlatformTypeFacadeStrategy.convertAttribute(DefaultPlatformTypeFacadeStrategy.java:422) ~[classes/:?]
at com.hybris.backoffice.cockpitng.dataaccess.facades.type.DefaultPlatformTypeFacadeStrategy.convertType(DefaultPlatformTypeFacadeStrategy.java:355) ~[classes/:?]
I have seen the class DefaultPlatformTypeFacadeStrategy, it tries to get the enclosing type of attributeDescriptorModel to check whether it is viewModel or not. As our attribute is a string type with attributeDescriptor defined, string cannot be returned as composed Type. In 5.7 hybris doesn't have this kind of check so it works fine. For testing purpose I removed the meta type definition and it works fine in 6.6. Any idea how can we handle this?
Request clarification before answering.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.