Affects Version/s: 6.1.1 CE GA2, 6.1.20 EE GA2
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.
|Create Annotation driven ShardAdvice||Closed|
|Apply ShardAnnotationAdvice on UserLocalServiceImpl and UserServiceImpl||Closed||30/Apr/14|