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

Documents and Media is temporarily unavailable with Weblogic version 12.1.3.0.161018.

    Details

      Description

      Steps to reproduce:

      1. Please use a Weblogic server, the application server needs to patched to Version 12.1.3.0.161018. This task was quite complicated therefore I copied the app server to r2d2z:\tmp\Sebi\WWK-29.
      The portal-ext.properties contains the property 'dl.store.impl=com.liferay.portlet.documentlibrary.store.DBStore'.
      2. Start the portal, go to the Documents and Media and upload a new .pdf file.
      3. Now edit the new .pdf file and write something in the description and save it, please don't add/change anything in the file section.

      Result: You should see the 'Dockbar is temporarily unavailable.' and the 'Documents and Media is temporarily unavailable.' messages. The below error appears in the logs:

      WARNING: Unhandled Exception thrown: class java.lang.NullPointerException
      <Jan 10, 2017 2:05:41 PM CET> <Warning> <org.apache.struts.action.RequestProcessor> <BEA-000000> <Unhandled Exception thrown: class java.lang.NullPointerException>
      14:05:41,344 ERROR [[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'][render_portlet_jsp:120] null
      java.lang.NullPointerException
              at com.liferay.portal.util.MimeTypesImpl.getContentType(MimeTypesImpl.java:86)
              at com.liferay.portal.kernel.util.MimeTypesUtil.getContentType(MimeTypesUtil.java:39)
              at com.liferay.portal.upload.UploadPortletRequestImpl.getContentType(UploadPortletRequestImpl.java:87)
              at com.liferay.portlet.documentlibrary.action.EditFileEntryAction.updateFileEntry(EditFileEntryAction.java:1062)
              at com.liferay.portlet.documentlibrary.action.EditFileEntryAction.processAction(EditFileEntryAction.java:160)
              at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequestProcessor.java:166)
              at com.liferay.portlet.StrutsPortlet.processAction(StrutsPortlet.java:218)
              at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:71)
              at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:48)
              at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:597)
              at com.liferay.portlet.InvokerPortletImpl.invokeAction(InvokerPortletImpl.java:628)
              at com.liferay.portlet.InvokerPortletImpl.processAction(InvokerPortletImpl.java:308)
              at com.liferay.portlet.PortletContainerImpl._doProcessAction(PortletContainerImpl.java:389)
              at com.liferay.portlet.PortletContainerImpl.processAction(PortletContainerImpl.java:107)
              at com.liferay.portlet.SecurityPortletContainerWrapper.processAction(SecurityPortletContainerWrapper.java:109)
              at com.liferay.portlet.RestrictPortletContainerWrapper.processAction(RestrictPortletContainerWrapper.java:75)
              at com.liferay.portal.kernel.portlet.PortletContainerUtil.processAction(PortletContainerUtil.java:115)
              at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:386)
              at com.liferay.portal.action.LayoutAction.doExecute(LayoutAction.java:200)
              at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:95)
      

      Reason:

      LiferayFileItem extends org.apache.commons.fileupload.disk.DiskFileItem.
      In the Weblogic patch 12.1.3.0.161018, in commons-fileupload.jar, a call to isInMemory() has been added to DiskFileItem.getStoreLocation(). If it is true, getStoreLocation() will return true.
      However, isInMemory() may return a false positive

          public boolean isInMemory() {
              if (cachedContent != null) {
                  return true;
              }
              return dfos.isInMemory();
          }
      

      cachedContent may equal to [] (an empty array), and the method still returning true.

      Therefore, getStoreLocation() should be overridden in LiferayFileItem to omit the isInMemory() call.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 32 weeks, 1 day ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 DXP FP14
                  7.0.0 DXP SP3
                  7.0.3 CE GA4
                  7.0.X EE
                  7.1.0 M1
                  Master