on 09-22-2023 10:28 AM
While adding smartEdit components I am getting null pointer for 'AttributeDescriptorModel.getLocalized()'. I did try searching any of such model with below groovy but it is not giving me any result. Since this is on environment so I cannot debug it. Below is logs and groovy.
Groovy
def SCRIPT_QUERY = "select {pk} from {attributeDescriptor}"
def attributeDescriptors = flexibleSearchService.search(SCRIPT_QUERY).getResult()
println ("groovy start-----------")
for (attributeDescriptor in attributeDescriptors) {
if(attributeDescriptor.getLocalized()==null)
{
println(attributeDescriptor.getName())
}
}
println ("groovy end-----------")
Logs
loggerName":"de.hybris.platform.webservicescommons.resolver.AbstractRestHandlerExceptionResolver","message":"java.lang.NullPointerException:
Cannot invoke \"java.lang.Boolean.booleanValue()\" because the return value of \"de.hybris.platform.core.model.type.AttributeDescriptorModel.getLocalized()\" is null
\n\tat de.hybris.platform.cms2.common.predicates.IsCollectionAttributePredicate.test(IsCollectionAttributePredicate.java:21)
\n\tat de.hybris.platform.cms2.common.predicates.IsCollectionAttributePredicate.test(IsCollectionAttributePredicate.java:17)\
n\tat de.hybris.platform.cmsfacades.types.populator.DropdownComponentTypeAttributePopulator.populate(DropdownComponentTypeAttributePopulator.java:38)
\n\tat de.hybris.platform.cmsfacades.types.populator.DropdownComponentTypeAttributePopulator.populate(DropdownComponentTypeAttributePopulator.java:25)
\n\tat de.hybris.platform.cmsfacades.types.converter.ComponentTypeStructureConverter.lambda$convertAttribute$5(ComponentTypeStructureConverter.java:183)
\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1511)\n\tat de.hybris.platform.cmsfacades.types.converter.ComponentTypeStructureConverter.convertAttribute(ComponentTypeStructureConverter.java:183)
User | Count |
---|---|
2 | |
1 | |
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.