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

Documents created using a custom document type in 6.1 GA2 cannot be edited in 6.2.x with a NullPointerException

    Details

      Description

      Description:
      After upgrading to Liferay Portal 6.2 EE SP14 and installing portal-95-6210, the customer is unable to edit documents of a custom type that were uploaded prior to their upgrade from 6.1 GA2. When attempting to publish the edited document, Documents and Media becomes unavailable and the following NPE is thrown:

      22:09:01,205 ERROR [http-bio-8080-exec-1][render_portlet_jsp:132] null
      java.lang.NullPointerException
              at com.liferay.portlet.dynamicdatamapping.util.DDMImpl.splitFieldsDisplayValue(DDMImpl.java:789)
              at com.liferay.portlet.dynamicdatamapping.util.DDMImpl.mergeFields(DDMImpl.java:372)
              at com.liferay.portlet.dynamicdatamapping.util.DDMUtil.mergeFields(DDMUtil.java:111)
              at com.liferay.portlet.dynamicdatamapping.storage.XMLStorageAdapter.doUpdate(XMLStorageAdapter.java:180)
              at com.liferay.portlet.dynamicdatamapping.storage.BaseStorageAdapter.update(BaseStorageAdapter.java:234)
              at com.liferay.portlet.dynamicdatamapping.storage.StorageEngineImpl.update(StorageEngineImpl.java:192)
              at com.liferay.portlet.dynamicdatamapping.storage.StorageEngineUtil.update(StorageEngineUtil.java:135)
              at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryMetadataLocalServiceImpl.updateFileEntryMetadata(DLFileEntryMetadataLocalServiceImpl.java:187)
              at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryMetadataLocalServiceImpl.updateFileEntryMetadata(DLFileEntryMetadataLocalServiceImpl.java:135)
              at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryMetadataLocalServiceImpl.updateFileEntryMetadata(DLFileEntryMetadataLocalServiceImpl.java:153)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      

      The customer has provided some additional insight into this issue:

      The issue seems to occurred sometime after Fix Pack 77. We are experiencing this issue with Fix Pack 95 so we rolled back to Fix Pack 77 and the problem does not occur. Additionally When we edit a document in Fix Pack 77 and then apply Fix Pack 95 the error still doesn't occur for that document.

      We are thinking that in Fix Pack 77 the code added the _fieldsDisplay attribute if it was missing. Fix Pack 95 seems to have lost this functionality.

      Steps to Reproduce:
      1. Set up a clean Liferay Portal 6.1 EE GA2 bundle.
      2. Create a new custom document type. (Mine simply had a 'Text' field and a 'Number' field)
      3. Upload a document using this new document type.
      4. Stop Liferay.
      5. Upgrade the bundle to a Liferay Portal 6.2 EE SP14 bundle.
      6. Start Liferay.
      7. Add another document of this new document type.
      8. Stop Liferay.
      9. Install portal-95-6210.
      10. Start Liferay.
      11. Attempt to edit the documents uploaded in steps 3 and 7.

      Expected:
      Documents will be edited successfully.
      Actual:
      The Document uploaded before the upgrade cannot be edited; the portlet becomes unavailable and a NullPointerException is thrown upon publication.

      Reproduced in:
      6.2.x? Yes, issue reproduced in branch: fc17b1d61db1a475bb18939425bd5db485df719b

      Master?
      Receive a "Documents and Media is temporarily unavailable" message, so unable to edit the documents. It is uncertain whether or not this is a result of the same issue. 7e058c0fe87388f19d04bdd1b464f9d0f07a6326

        Attachments

          Issue Links

            Activity

              People

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

                Dates

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

                  Packages

                  Version Package
                  6.2.X EE