cancel
Showing results for 
Search instead for 
Did you mean: 

Object no longer valid at de.hybris.platform.jalo.Item$CachedGetter.tryToCompute

Sri03
Discoverer
0 Kudos
101

I'm getting this exception during order creation process. I could see the details of the PK value which thrown in exception. but when I query for the same PK in DB, it's showing no results found. 

How come if the entry is not there in DB but showing when I search in PK analyzer?

Exception Stacktrace:

Entity not found ( pk = 14835026264110 name = 'de.hybris.platform.persistence.core_OrderEntry' type code = '46' db table = 'orderentries'): object no longer valid at de.hybris.platform.jalo.Item$CachedGetter.tryToCompute(Item.java:773) at de.hybris.platform.jalo.Item$CachedGetter.get(Item.java:759) at de.hybris.platform.jalo.ExtensibleItem.getProperty(ExtensibleItem.java:343) at de.hybris.platform.jalo.order.GeneratedAbstractOrderEntry.getDiscountValuesInternal(GeneratedAbstractOrderEntry.java:259) at jdk.internal.reflect.GeneratedMethodAccessor1377.invoke

View Entire Topic
cieslo
Product and Topic Expert
Product and Topic Expert
0 Kudos

PK analyzer simply decodes the Item Type from the PK. Each PK generated in Commerce has encoded information about the Item Type. That is why you can get Item Type from the PK even if the record no longer exists. The exception tells you that the record referenced by this PK no longer exists however you still have a Model object in your code that has this record loaded. It must have been deleted somewhere earlier in the code execution.

Sri03
Discoverer
0 Kudos
This helps. Thanks for the information 🙂