Symptom
When trying to login to backoffice, the user is met with the 500 error page. The tomcat logs show the error below:
INFO | jvm 1 | main | 2019/06/17 18:16:15.700 | SEVERE: Servlet.service() for servlet [default] in context with path [/backoffice] threw exception INFO | jvm 1 | main | 2019/06/17 18:16:15.700 | java.lang.NullPointerException: while trying to invoke the method de.hybris.platform.jalo.security.PrincipalGroup.getMembers(de.hybris.platform.jalo.SessionContext) of a null object loaded from local variable 'group' INFO | jvm 1 | main | 2019/06/17 18:16:15.700 | at de.hybris.platform.jalo.user.UserManager.loadAllAdminUserPKs(UserManager.java:1087) INFO | jvm 1 | main | 2019/06/17 18:16:15.700 | at de.hybris.platform.jalo.user.UserManager.isCachedAdminPK(UserManager.java:1061) INFO | jvm 1 | main | 2019/06/17 18:16:15.700 | at de.hybris.platform.jalo.user.UserManager.isAdmin(UserManager.java:1021) INFO | jvm 1 | main | 2019/06/17 18:16:15.700 | at de.hybris.platform.jalo.user.Employee.isAdmin(Employee.java:37) INFO | jvm 1 | main | 2019/06/17 18:16:15.700 | at de.hybris.platform.jalo.flexiblesearch.FlexibleSearch.getUserFilters(FlexibleSearch.java:1885) ...
|
Or alternatively, the NPE happens on a different side of the relation:
INFO | jvm 1 | main | 2019/06/17 18:16:15.700 | SEVERE: Servlet.service() for servlet [default] in context with path [/backoffice] threw exception INFO | jvm 1 | main | 2019/06/17 18:16:15.700 | java.lang.NullPointerException: while trying to invoke the method de.hybris.platform.jalo.security.PrincipalGroup.getUID(de.hybris.platform.jalo.SessionContext) of a null object loaded from local variable 'group' INFO | jvm 1 | main | 2019/06/17 18:16:15.700 | at de.hybris.platform.spring.security.CoreUserDetailsService.getAuthorities(CoreUserDetailsService.java:112) INFO | jvm 1 | main | 2019/06/17 18:16:15.700 | at de.hybris.platform.spring.security.CoreUserDetailsService.loadUserByUsername(CoreUserDetailsService.java:83) INFO | jvm 1 | main | 2019/06/17 18:16:15.700 | at com.hybris.backoffice.spring.security.BackofficeUserDetailsService.loadUserByUsername(BackofficeUserDetailsService.java:59) INFO | jvm 1 | main | 2019/06/17 18:16:15.700 | at dcom.hybris.backoffice.spring.security.BackofficeUserDetailsService.loadUserByUsername(BackofficeUserDetailsService.java:1) INFO | jvm 1 | main | 2019/06/17 18:16:15.700 | at de.hybris.platform.spring.security.CoreAuthenticationProvider.retrieveUser(CoreAuthenticationProvider.java:192) ...
|
When executing the below SQL Query in hac, some results are returned:
SELECT * FROM pgrels WHERE ( sourcepk NOT IN (SELECT pk FROM users) AND sourcepk NOT IN (SELECT pk FROM usergroups) ) OR ( targetpk NOT IN (SELECT pk FROM users) AND targetpk NOT IN (SELECT pk FROM usergroups) )
|
Let's assume for example that one of the results is:
PK SOURCEPK 8966021447881 8803728097284 |
In backoffice > System > Types > Search for PrincipalGroupRelation > Open all instances > Search for 8966021447881. You will notice that the source PK is null:
Read more...
Environment
SAP Commerce & SAP Commerce Cloud on any version.
Product
SAP Commerce Cloud all versions ; SAP Commerce all versions
Keywords
backoffice, null pointer exception , KBA , CEC-SCC-CDM-BO-APP , Applications , Problem
About this page
This is a preview of a SAP Knowledge Base Article. Click
more to access the full version on SAP for Me (Login
required).
Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.