Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-123413

NullPointerException is thrown when deleting user

    Details

      Description

      Steps to reproduce:

      1. Configure the portal with remote ES and default HSQL DB. (The issue occurs more frequently with this setup, but I could reproduce with embedded ES and MySQL as well.)
      2. Start the portal
      3. Go to Control panel > User and Organizations and add a new user, let's call it 'a'
      4. Click again on Users and Organizations on the left.
      5. For user 'a', click Actions > Deactivate.
      6. Click on Filter and Order above, and choose Inactive.
      7. Click on Actions/Delete for the "a" user.

      Result: You get a success message on the UI, but a NullPointerException is thrown in the Tomcat console. (Also every entry disappears from the list now.)
      Expected: The NullPointerException should not be thrown.

      2020-12-21 13:27:54.775 ERROR [http-nio-8080-exec-10][IncludeTag:128] Current URL /group/control_panel/manage?p_p_id=com_liferay_users_admin_web_portlet_UsersAdminPortlet&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&_com_liferay_users_admin_web_portlet_UsersAdminPortlet_navigation=inactive&_com_liferay_users_admin_web_portlet_UsersAdminPortlet_orderByCol=last-name&_com_liferay_users_admin_web_portlet_UsersAdminPortlet_usersListView=flat-users&_com_liferay_users_admin_web_portlet_UsersAdminPortlet_toolbarItem=view-all-users&_com_liferay_users_admin_web_portlet_UsersAdminPortlet_orderByType=asc&_com_liferay_users_admin_web_portlet_UsersAdminPortlet_status=5 generates exception: java.lang.NullPointerException
      java.lang.NullPointerException
      	at com.liferay.users.admin.web.internal.display.context.ViewFlatUsersDisplayContextFactory._createSearchContainer(ViewFlatUsersDisplayContextFactory.java:236)
      	at com.liferay.users.admin.web.internal.display.context.ViewFlatUsersDisplayContextFactory.create(ViewFlatUsersDisplayContextFactory.java:89)
      	at org.apache.jsp.view_005fflat_005fusers_jsp._jspService(view_005fflat_005fusers_jsp.java:444)
      	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
      	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
      	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
      	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
      	at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:368)
      	at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:380)
      	at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
      	at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62)
      	at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:120)
      	at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)
      	at com.liferay.portal.servlet.DirectServletPathRegisterDispatcher.include(DirectServletPathRegisterDispatcher.java:67)
      	at com.liferay.portal.servlet.DirectRequestDispatcherFactoryImpl$IndirectRequestDispatcher.include(DirectRequestDispatcherFactoryImpl.java:190)
      	at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:79)
      	at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
      	at com.liferay.taglib.util.IncludeTag.includePage(IncludeTag.java:407)
      

      The issue seem to occur becauseĀ UsersAdminImpl.getUsers(Hits) returns null if the user found in search index is not fetchable from DB.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sharry.shi Sharry Shi
              Reporter:
              istvan.sajtos Istvan Sajtos
              Participants of an Issue:
              Recent user:
              Sylvia Luan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                27 weeks, 4 days ago

                  Packages

                  Version Package
                  7.3.10 DXP FP1
                  7.3.10.1 DXP SP1
                  7.3.6 CE GA7
                  7.3.X
                  Master