Skip to Content
2
Former Member
Sep 21, 2015 at 06:14 PM

NullPointerException in accessing getOrCreateCurrentJaloSession()

382 Views

Hi All,

We are working with Hybris 5.4.0.1 and we came across one issue.

I have enabled JUnit tenant via installed.tenants=junit.

I have a service class which gets invoked via hot folder. in this service class am executing a piece of code such as, Registry.activateMasterTenant(); sessionService.executeInLocalView(new SessionExecutionBody().

This code works fine when i do not enable JUnit tenant. However, it's throwing NullPointerException if i enable JUnit tenant. Throws NullPointer at getOrCreateCurrentJaloSession() which gets invoked via sessionService.executeInLocalView().

Am injecting sessionService using @Resource annotation such as @Resource private SessionService sessionService;

Can anyone please help me out on this?