cancel
Showing results for 
Search instead for 
Did you mean: 

JMS Listener - NullPointerException at DefaultSessionService.getOrBindSession(DefaultSessionService.java:218)

Former Member
0 Kudos
411

Hi Experts,

I'm facing the problem with jalosession within my JMS Listener. I want to create and save the model in onMessage method. The log:

 java.lang.NullPointerException
         at de.hybris.platform.servicelayer.session.impl.DefaultSessionService.getOrBindSession(DefaultSessionService.java:218) ~[coreserver.jar:?]
         at de.hybris.platform.servicelayer.session.impl.DefaultSessionService.getCurrentSession(DefaultSessionService.java:53) ~[coreserver.jar:?]
         at de.hybris.platform.servicelayer.session.impl.DefaultSessionService.getAttribute(DefaultSessionService.java:180) ~[coreserver.jar:?]
         at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.isTransactional(DefaultModelService.java:1084) ~[coreserver.jar:?]
         at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.save(DefaultModelService.java:634) ~[coreserver.jar:?]
         at my.package.listeners.MyListener.onMessage(MyListener.java:87) ~[classes/:?]

Any ideas on how to make it work?

EDIT: I've used a workaround to make it work:

     this.modelService = (ModelService) Registry.getApplicationContext().getBean("modelService");

But I have to use it within onMessage method so it looks ugly and not optimal. Any better ideas would be appreciated 😉

View Entire Topic
jobinpbabu
Explorer
0 Kudos

If the above solution not working then Read this link text . Clearing all the unwanted tenants by adding installed.tenants= in local.properties worked for me.

Former Member
0 Kudos

Can you share the link.I am facing the same issue