on 2018 Nov 27 11:21 AM
We have a product which is linked to around 2000 features and using below code we are adding the value to the feature and saving the feature list. Our job processing stopped at setFeatures() method and it ran more than 24 hours(we increase jalo session time to 24 hours) finally it is failed with below exception.
Code:
final FeatureList featureList = classificationService.getFeatures(variant);
final Feature feature = featureList.getFeatureByCode(productFeature.getQualifier());
if(feature instanceof LocalizedFeature){
final Locale locale = commonI18NService.getLocaleForLanguage(productFeature.getLanguage());
((LocalizedFeature)feature).addValue(new FeatureValue(productFeature.getValue()),locale);
}
else{
feature.addValue(new FeatureValue(productFeature.getValue()));
}
classificationService.setFeatures(variant, featureList);
Exception:
WARN [Thread-86267] [: , , , , ] [JaloSession] There are some active local session contexts left (2) for
tenant master, this might indicate there are not properly freed localsession context instances.
ERROR [Thread-86267] [: , , , , ] [MergeImportStrategyImpl] Exception encountered processing row 3
de.hybris.platform.jalo.JaloBusinessException:
[de.hybris.platform.servicelayer.interceptor.impl.UniqueAttributesInterceptor@7f8416eb]: unexpected validator error: session s56024777308844 is already closed!
This code is working fine for the products which has less number of product features. I have tried using setFeature() method instead of setFeatures() but result is same.
As per below hybris api link this is the way we need to save the product features but I just looking for any other alternate approaches to save product feature which will resolve my problem. https://help.hybris.com/6.7.0/hcd/8b7a777486691014823afa6e0ed7bb61.html
Any help would be highly appreciated.
Hybris Version: 6.7.0.4 and 6.3.0.9
Database: Oracle
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.