Skip to Content
Former Member
Nov 02, 2016 at 03:00 AM

Datahub: LazyInitializationException during Publication


Hi I am getting org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.hybris.datahub.domain.jpa.entities.ManagedCanonicalItemEntity.publicationStatusEntities, could not initialize proxy - no Session

This is happening after we migrated to In 5.6 the block of code works fine. We have a custom PublicationGroupingHandler which is used to BlockCreation of stock for bad salesorg/dc combos not in CanonicalProductSalesAreaToCatalogMapping.

This is line of code: itemService.deleteByIntegrationKey(item.getType(), stockItemIntegrationKey, globalPool);

How can i resolve the LazyInitializationException.I follow the link but could not find how to fix this.

Thanks Deba