cancel
Showing results for 
Search instead for 
Did you mean: 

cart promotionresults gives error "item no longer valid (was removed)"

former_member696137
Discoverer
0 Kudos

Hybris 1905 cloud host

On checkout page;

rest service trying to recalculate cart for ceditcard promotions and it applies promotions successfully,

then rest service api calling (carts/{cartId}) to get calculated cart but it giving error for promotion results "object no longer valid".

ERROR [hybrisHTTP15] [RestHandlerExceptionResolver] item 8796258603927 no longer valid (was removed): object no longer valid at de.hybris.platform.jalo.Item$CachedGetter.get(Item.java:740) at de.hybris.platform.jalo.ExtensibleItem.getProperty(ExtensibleItem.java:350) at de.hybris.platform.promotions.jalo.GeneratedAbstractPromotionAction.isMarkedApplied(GeneratedAbstractPromotionAction.java:118) at de.hybris.platform.promotions.jalo.PromotionResult.isApplied(PromotionResult.java:113) at de.hybris.platform.promotions.result.PromotionOrderResults.getPromotionResults(PromotionOrderResults.java:319) at de.hybris.platform.promotions.result.PromotionOrderResults.getAppliedOrderPromotions(PromotionOrderResults.java:245) at de.hybris.platform.commercefacades.order.converters.populator.AbstractOrderPopulator.addPromotions(AbstractOrderPopulator.java:473) at de.hybris.platform.commercefacades.order.converters.populator.CartPopulator.addPromotions(CartPopulator.java:52) at de.hybris.platform.commercefacades.order.converters.populator.AbstractOrderPopulator.addPromotions(AbstractOrderPopulator.java:450) at de.hybris.platform.commercefacades.order.converters.populator.CartPopulator.populate(CartPopulator.java:35) at de.hybris.platform.commercefacades.order.converters.populator.ExtendedCartPopulator.populate(ExtendedCartPopulator.java:27) at de.hybris.platform.commercefacades.order.converters.populator.CartPopulator.populate(CartPopulator.java:1) at de.hybris.platform.converters.impl.AbstractPopulatingConverter.populate(AbstractPopulatingConverter.java:71) at de.hybris.platform.converters.impl.AbstractConverter.convert(AbstractConverter.java:41) at de.hybris.platform.converters.Converters.convertAll(Converters.java:59)

0 Kudos

Hello harvest_ ,

Have you reached to a solution for the above. Im facing the same.

Accepted Solutions (0)

Answers (1)

Answers (1)

vinay_malempati
Active Participant
0 Kudos

Issue coulkd be due to parelell calls to get cart as hybris deletes and craetes promotion results everytime it recalculates.

Ideally on the front end there might parelell calls like you update qty and parelelly some minicart request happens we can see this error.

Only way to fix this is to stop parelell calls and have calls to cart in sequence

former_member696137
Discoverer
0 Kudos

Ty for commenting

our scenario; first api applies promotions to cart, then calls getcart. Actually there is no paralel calls and both are in a sequence.