PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-33445

DBStore causes NoSuchContentException on Oracle 11g when re-publishing an empty document

    Details

    • Branch Version/s:
      6.1.x
    • Backported to Branch:
      Committed
    • Story Points:
      3
    • Fix Priority:
      4
    • Similar Issues:
      Show 5 results 

      Description

      Reproduced: 6.1.20, Trunk (Git ID: 405242e0ac771d0ba5de12ef0d216540c31f8615)
      This issue only happens on oracle and add "dl.store.impl=com.liferay.portlet.documentlibrary.store.DBStore" in portal-ext.properties file.

      Steps:
      1. sign in as test@liferay.com
      2. add the "Documents and Media" portlet to a page
      3. click on "Add" > "Basic Document"
      4. upload/"Publish" an empty file by typing out "sample" as the document's title
      5. a "sample" file should be created
      6. click on "Edit" to load the edit page for the "sample" file;
      7. click on "Publish" again; following exception should appear

      09:54:13,312 ERROR [http-bio-8080-exec-16][render_portlet_jsp:154] com.liferay.portlet.documentlibrary.NoSuchContentException: No DLContent exists with the key {companyId=10154, repositoryId=10180, path=201, version=PWC}
              at com.liferay.portlet.documentlibrary.service.persistence.DLContentPersistenceImpl.findByC_R_P_V(DLContentPersistenceImpl.java:1984)
              at com.liferay.portlet.documentlibrary.service.impl.DLContentLocalServiceImpl.getContent(DLContentLocalServiceImpl.java:145)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:122)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
              at com.liferay.portlet.documentlibrary.service.DLContentLocalServiceUtil.getContent(DLContentLocalServiceUtil.java:324)
              at com.liferay.portlet.documentlibrary.store.DBStore.getFileAsStream(DBStore.java:167)
              at com.liferay.portlet.documentlibrary.store.BaseStore.updateFileVersion(BaseStore.java:611)
              at com.liferay.portlet.documentlibrary.store.StoreProxyImpl.updateFileVersion(StoreProxyImpl.java:283)
              at com.liferay.portlet.documentlibrary.store.SafeFileNameStoreWrapper.updateFileVersion(SafeFileNameStoreWrapper.java:433)
              at com.liferay.portlet.documentlibrary.store.DLStoreImpl.updateFileVersion(DLStoreImpl.java:526)
      

      8. shut down the Tomcat server
      9. comment out "dl.store.impl=com.liferay.portlet.documentlibrary.store.DBStore" within portal-ext.properties
      10. start up the Tomcat server
      11. sign in as test@liferay.com
      12. upload a new empty file, "sample2"
      13. click on "Edit" to re-Publish the empty document
      14. re-Publish should now be successful without exception messages

        Activity

        Hide
        Pani Gui (Inactive) added a comment -

        PASSED Manual Testing following the steps in the description.

        Reproduced on:
        Tomcat 7.0 + Oracle 11. Portal 6.2.x GIT ID: 6585e63d42c081896dee730025f0d3505c03f2b9.

        NoSuchContentException throws in the console when re-publishing an empty document in DBStore.

        Fixed on:
        Tomcat 7.0 + Oracle 11. Portal 6.1.x EE GIT ID: b69dcdfeec063364921af007e457b2cbbded450f.
        Tomcat 7.0 + Oracle 11. Portal 6.2.x GIT ID: 07820440e75ae47d09fae1e87d98f5af21146f4e.

        There is no exception in the console when re-publishing an empty document.

        Show
        Pani Gui (Inactive) added a comment - PASSED Manual Testing following the steps in the description. Reproduced on: Tomcat 7.0 + Oracle 11. Portal 6.2.x GIT ID: 6585e63d42c081896dee730025f0d3505c03f2b9. NoSuchContentException throws in the console when re-publishing an empty document in DBStore. Fixed on: Tomcat 7.0 + Oracle 11. Portal 6.1.x EE GIT ID: b69dcdfeec063364921af007e457b2cbbded450f. Tomcat 7.0 + Oracle 11. Portal 6.2.x GIT ID: 07820440e75ae47d09fae1e87d98f5af21146f4e. There is no exception in the console when re-publishing an empty document.

          People

          • Assignee:
            Pani Gui (Inactive)
            Reporter:
            Michael Chen (Inactive)
            Recent user:
            Randy Zhu
            Participants of an Issue:
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              2 years, 17 weeks, 2 days ago

              Development

                Structure Helper Panel