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

UserLocalService returns null on sharded database

    Details

      Description

      If a user is referenced from another shard e.g: with companyId and screenName a com.liferay.portal.NoSuchUserException is thrown it the user object is not in the finder cache.

      Steps to reproduce:

      1) Create 2 databases like shard1 as jdbc.default and shard2 as jdbc.one
      2) Setup the portal to use manual shard selector and connect to the two shards
      3) Create a new Portal instance (liferay-shard.com) to use "one" as shard
      4) Create a new user in liferay-shard.com with screenName: testuser
      5) Create a portlet where a call to UserLocalServiceUtil.getUserByScreenName() is called with liferay-shard.com's companyId and 'testuser' as screenName and logs the e-mail address of the user into the server log
      6) Deploy the above mentioned portlet
      7) Empty the caches of the portal on Control Panel > Server Administration
      8) Place the portlet on the default shard's page (liferay.com by default) and trigger the call to UserLocalServiceUtil.getUserByScreenName()

      Expected behaviour: you should see testuser's e-mail address logged into the portal's log file
      Actual behaviour: a NoSuchUserException is thrown.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                support-lep@liferay.com SE Support
                Reporter:
                vilmos.papp Vilmos Papp
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Days since last comment:
                  7 years, 49 weeks ago

                  Packages

                  Version Package
                  7.0.0 CE GA1
                  Master