Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
7.2.X, 7.3.X, Master
-
7.3.x, 7.2.x
-
Committed
-
3
Description
Steps to reproduce
- Start up Liferay pointing to an Oracle database
- Run the following Groovy script to create 1200 AnnouncementsFlag entries (it's a small table so it should finish quickly)
import com.liferay.announcements.kernel.service.AnnouncementsFlagLocalService import com.liferay.registry.RegistryUtil def registry = RegistryUtil.getRegistry() def announcementsFlagLocalService = registry.getServices(AnnouncementsFlagLocalService.class, null)[0] if (announcementsFlagLocalService.getAnnouncementsFlagsCount() < 1200) { for (int i = 0; i < 1200; i++) { announcementsFlagLocalService.addFlag(0, i, 0) } }
- Run the following Groovy script, which fetches the 1200 AnnouncementsFlag entries, clears the entity cache, and then re-fetches them again
import com.liferay.portal.kernel.dao.orm.EntityCacheUtil import com.liferay.portal.kernel.dao.orm.FinderCacheUtil import com.liferay.announcements.kernel.service.AnnouncementsFlagLocalService import com.liferay.registry.RegistryUtil def registry = RegistryUtil.getRegistry() def announcementsFlagLocalService = registry.getServices(AnnouncementsFlagLocalService.class, null)[0] FinderCacheUtil.clearCache() out.println("finding results (finder cache miss)") try { out.println("find attempt succeeded: " + announcementsFlagLocalService.getAnnouncementsFlags(-1, -1).size()) } catch (Exception e) { e.printStackTrace(out) } out.println("finding results (finder cache hit)") EntityCacheUtil.clearCache() try { out.println("find attempt succeeded: " + announcementsFlagLocalService.getAnnouncementsFlags(-1, -1).size()) } catch (Exception e) { e.printStackTrace(out) }
Expected behavior: The second Groovy script runs without errors
Actual behavior: The second Groovy script is able to successfully fetch prior to clearing the entity cache, but prints a stack trace after clearing the entity cache
Attachments
Issue Links
- is a dependency of
-
LPS-133366 ORA-01795: maximum number of expressions in a list is 1000 can be obtained when invoking BasePersistenceImpl.fetchByPrimaryKeys
- Closed