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

Web Content is temporarily unavailable when a web content has a decimal version with DB2

Details

    Description

      Reproducing Steps

      1. Start Liferay with DB2 11.
      2. Create a web content.
      3. Edit a web content to obtain version 1.1.
      4. Go to Control Panel > SYSTEM > Server Administration > Resources > CACHE ACTIONS > Clear the database cache.
      5. Go back to the list of web contents.
        Expected: The web content list with the created web content is shown.
        Observed: The web content list is not shown. The error "Web Content is temporarily unavailable." is shown on screen and this error is shown in the logs
        2022-06-08 10:59:22.162 ERROR [http-nio-8080-exec-4][PortletRequestDispatcherImpl:304] Unable to dispatch request: com.liferay.portal.kernel.exception.SystemException: com.liferay.journal.exception.NoSuchArticleException: No JournalArticle exists with the key {groupId=40460, articleId=42704, version=1.1}
        2022-06-08 10:59:22.164 ERROR [http-nio-8080-exec-4][PortletServlet:119] null
        javax.portlet.PortletException: org.apache.jasper.JasperException: com.liferay.portal.kernel.exception.SystemException: com.liferay.journal.exception.NoSuchArticleException: No JournalArticle exists with the key {groupId=40460, articleId=42704, version=1.1}
        	at com.liferay.portlet.internal.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:307) ~[portal-impl.jar:?]
        	at com.liferay.portlet.internal.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:123) ~[portal-impl.jar:?]
        [...]
        

      Note: If we activate the trace org.hibernate.SQL and repeat the steps we see that the problematic query is

      SELECT journalart0_.id_ AS id_1_0_, journalart0_.mvccVersion AS mvccvers2_0_, journalart0_.ctCollectionId AS ctcollec3_0_, journalart0_.uuid_ AS uuid_4_0_, journalart0_.resourcePrimKey AS resource5_0_, journalart0_.groupId AS groupid6_0_, journalart0_.companyId AS companyi7_0_, journalart0_.userId AS userid8_0_, journalart0_.userName AS username9_0_, journalart0_.createDate AS created10_0_, journalart0_.modifiedDate AS modifie11_0_, journalart0_.externalReferenceCode AS externa12_0_, journalart0_.folderId AS folderi13_0_, journalart0_.classNameId AS classna14_0_, journalart0_.classPK AS classpk15_0_, journalart0_.treePath AS treepat16_0_, journalart0_.articleId AS article17_0_, journalart0_.version AS version18_0_, journalart0_.urlTitle AS urltitl19_0_, journalart0_.DDMStructureKey AS ddmstru20_0_, journalart0_.DDMTemplateKey AS ddmtemp21_0_, journalart0_.defaultLanguageId AS default22_0_, journalart0_.layoutUuid AS layoutu23_0_, journalart0_.displayDate AS display24_0_, journalart0_.expirationDate AS expirat25_0_, journalart0_.reviewDate AS reviewd26_0_, journalart0_.indexable AS indexab27_0_, journalart0_.smallImage AS smallim28_0_, journalart0_.smallImageId AS smallim29_0_, journalart0_.smallImageURL AS smallim30_0_, journalart0_.lastPublishDate AS lastpub31_0_, journalart0_.status AS status32_0_, journalart0_.statusByUserId AS statusb33_0_, journalart0_.statusByUserName AS statusb34_0_, journalart0_.statusDate AS statusd35_0_ FROM JournalArticle journalart0_ WHERE (journalart0_.groupId = COALESCE(CAST(? AS VARCHAR (2000)), '')) AND (journalart0_.articleId = COALESCE(CAST(? AS VARCHAR (2000)), '')) AND (journalart0_.version = COALESCE(CAST(? AS VARCHAR (2000)), '')) AND journalart0_.ctCollectionId = 0
      

      Attachments

        Issue Links

          Activity

            People

              tina.tian Tina Tian
              ricardo.couso Ricardo Couso
              Marta Elicegui Marta Elicegui
              Ricardo Couso Ricardo Couso
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                8 weeks, 5 days ago

                Packages

                  Version Package
                  7.4.3.35 CE GA35
                  7.4.3.36 CE GA36
                  7.4.3.37 CE GA37
                  Master