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

ORA-01795: maximum number of expressions in a list is 1000 can be obtained when invoking BasePersistenceImpl.fetchByPrimaryKeys

    Description

    When working with a database like Oracle where the maximum number of expressions in an IN clause is limited we can still obtain the following error, even after LPS-68101:

     

    at com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:269)
    at com.liferay.portal.service.persistence.impl.PortletPreferencesPersistenceImpl.fetchByPrimaryKeys(PortletPreferencesPersistenceImpl.java:5894)
    at com.liferay.portal.cache.internal.dao.orm.FinderCacheImpl._primaryKeyToResult(FinderCacheImpl.java:364)
    at com.liferay.portal.cache.internal.dao.orm.FinderCacheImpl.getResult(FinderCacheImpl.java:144)
    at com.liferay.portal.kernel.dao.orm.FinderCacheUtil.getResult(FinderCacheUtil.java:49)
    at com.liferay.portal.service.persistence.impl.PortletPreferencesPersistenceImpl.findByO_O_P(PortletPreferencesPersistenceImpl.java:2427)
    at com.liferay.portal.service.persistence.impl.PortletPreferencesPersistenceImpl.findByO_O_P(PortletPreferencesPersistenceImpl.java:2380)
    at com.liferay.portal.service.persistence.impl.PortletPreferencesPersistenceImpl.findByO_O_P(PortletPreferencesPersistenceImpl.java:2334)
    

     

    This can happen when the result of a finder returns more than N elements and we try to retrieve them all to save them in the EntityCache.

      Attachments

        Issue Links

          Activity

            People

            Assignee:
            summer.zhang Summer Zhang
            Reporter:
            mariano.alvaro Mariano Álvaro
            Participants of an Issue:
            Recent user:
            Tomáš Polešovský
            Engineering Assignee:
            Mariano Álvaro
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              51 weeks, 3 days ago

                Packages

                Version Package
                7.0.0 DXP FP102
                7.0.10.16 DXP SP17
                7.0.X
                7.1.10 DXP FP26
                7.1.10.7 SP7
                7.1.X
                7.2.10 DXP FP15
                7.2.X
                7.3.10.3 DXP SP3
                7.3.X
                7.4.13 DXP GA1
                7.4.3.4 CE GA4
                Master