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

Datahub: LazyInitializationException during Publication

124 Views

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 6.1.0.3. 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 https://help.hybris.com/6.2.0/hcd/26cabfd93e4a407ab0b5ddfcbe90d14a.html but could not find how to fix this.

Thanks Deba