09 April 2016

During our upgrade from 6.1 to 6.2 we discovered two bugs with Documents and Media portlet. Specifically these bugs presented themselves after applying 6.2 EE Fix Pack 95 to 6.2 SP14. The first issue involved the JSPs and Javascript with the portlet. On line 79 of the main.js file they changed “instance.ns(‘dataRequest’);” to “instance.ns(‘entryDataRequest’);”. This change was not made in all of the JSP files. The second issue was a data layer issue that appears as a combination of upgrading and the fix pack. The error occurred when trying to edit and then save documents that existed prior to the upgrade. It did not affect documents created after the upgrade. The error is shown below.

Error in log file
14:06:09,314 ERROR [http-bio-8080-exec-9][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)

This error is caused by a missing metadata field “_fieldsDisplay”. It appears that Fix Pack 95 introduced this error. The Liferay team generated custom fix packs to resolve these issues. The fixes did complicate our deployment. We will now need to restart the server and additional time during deployment. Additionally this requires changing the portal-ext.properties in the middle of deployment. The high level view of the needed steps.

  1. Run verification processes on old server.
  2. Deploy Liferay
  3. Start Liferay
  4. Verify License Registered
  5. Verify standard Liferay portlets deployed.
  6. Stop Liferay (We tried to skip this step but the next step didn’t deploy correctly.)
  7. Deploy Customizations.
  8. Start Liferay.
  9. Verify customizations are functioning at a basic level.
  10. Stop Liferay.
  11. Modify portal-ext.properties.
  12. Start Liferay.
  13. Verify legacy documents can be saved without error.
  14. Stop Liferay and modify portal-ext.properties.
  15. Start Liferay and verify functionality.

The following is the change that needs to be added and removed from the portal-ext.properties.

portal-ext.properties
...
verify.frequency=-1
verify.processes=com.liferay.portal.verify.VerifyDynamicDataMapping
...

My best guess is that the VerifyDynamicDataMapping class goes out and fixes any legacy documents. While the fixes are relatively straightforward it does complicate our upgrade process and introduces more avenues for errors to creep in.


Less Is More ~ Older posts are available in the archive.