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

JournalArticleLocalServiceUtil.getArticles() can fail with ORA-01795 exception

    Details

      Description

      Solution Notes
      Even though, this approach is not a good way, portal will be able to take the guard to avoid this error by setting the new property like below

      value.object.finder.cache.list.threshold=1000
      

      Note 10000, it is 1000. Therefore, portal won't send 1000 primary keys in one list because finder cache won't be able to cache more than 1000 in this case.


      Brief Intro

      This is a know limitation on Oracle side which has been met in the past as well. There will be fails with ORA-01795 , when calling JournalArticleLocalServiceUtil.getArticles(groupId, folderId).


      Reproduction Steps:
       1-) Configure DXP to connect to OracleDB
       2-) Add at least 11001 web content articles

       3-) Execute the following script on the Server Administration's Script tab:

      import java.util.List;
      import com.liferay.journal.service.JournalArticleLocalServiceUtil;
      List result = JournalArticleLocalServiceUtil.getArticles();
      out.println("Number of articles: " + result.size());
      

      Note: first execution succeeds, as it's not yet able to utilize the Finder- and EntityCache.

      4-) Execute the above script again.
      Result in log:

      14:33:17,205 ERROR [http-nio-8080-exec-5][JDBCExceptionReporter:234] ORA-01795: maximum number of expressions in a list is 1000_ [Sanitized]

      Reproduced on :

      Branch(9536c49f43b5d41f72e3e846046d7974d49af493): reproduced

      Master(2089294ff076c896108e5cffcf0efe66b165afad): reproduced

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                steven.gao Steven Gao (Inactive)
                Reporter:
                ugurcan.cetin Uğurcan Çetin (Inactive)
                Participants of an Issue:
                Recent user:
                Csaba Turcsan
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  1 year, 50 weeks, 5 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP33
                  7.0.0 DXP SP7
                  7.0.5 CE GA6
                  7.0.X
                  Master