Skip to Content
Former Member
Jul 05, 2016 at 05:21 PM

NullPointerException on DefaultSessionService.getOrBindSession(


We have hybris 5.6 running upgraded from 4.x; We never had junit tenant running after upgrade. Recently we want to bring back integration tests so we active the junit test. But we are experience NullpointerException on some aspects as shown below.. We debug and found that when it getCurrentSession in JaloSession, the Registry.getCurrentTenant() will return this "junit" tenant as the active tenant and then jalosession will be null and exception occured.

I am wondering if there is any way to solve this?

java.lang.NullPointerException at de.hybris.platform.servicelayer.session.impl.DefaultSessionService.getOrBindSession( at de.hybris.platform.servicelayer.session.impl.DefaultSessionService.getCurrentSession( at de.hybris.platform.servicelayer.session.impl.DefaultSessionService.getAttribute( at de.hybris.platform.servicelayer.session.impl.DefaultSessionService.getOrLoadAttribute( at de.hybris.platform.order.impl.DefaultCartService.internalGetSessionCart( at de.hybris.platform.order.impl.DefaultCartService.getSessionCart( at at at at at