Details

      Description

      Steps to reproduce:

      1. Go to Control Panel > Liferay > Publishing Tools > Staging Processes > Staging Configuration.
      2. Select "Local Live" and "Enabled on Public Pages". Save your changes
      3. Go to the staged version of the main page of the Liferay site.
      4. Drag the "Hello World" portlet to the left column.
      5. Select "Publish to Live" and click on the "Publish" button in the window that pops up.

      Expected result: The changes are successfully published to the live site and no exceptions are thrown.
      Actual result: The changes are not published, and the following stack trace appears in the console:

      com.liferay.portal.kernel.exception.SystemException: com.thoughtworks.xstream.converters.ConversionException: com.liferay.portal.model.LayoutStagingHandler : com.liferay.portal.model.LayoutStagingHandler_---- Debugging information ----_message             : com.liferay.portal.model.LayoutStagingHandler_cause-exception     : com.thoughtworks.xstream.security.ForbiddenClassException_cause-message       : com.liferay.portal.model.LayoutStagingHandler_class               : com.thoughtworks.xstream.mapper.DynamicProxyMapper$DynamicProxy_required-type       : com.thoughtworks.xstream.mapper.DynamicProxyMapper$DynamicProxy_converter-type      : com.thoughtworks.xstream.converters.extended.DynamicProxyConverter_path                : /dynamic-proxy/handler_line number         : 3_version             : 1.4.7_------------------------------- [Sanitized]
              at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importLayouts(ExportImportLocalServiceImpl.java:200)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:84)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
              at com.sun.proxy.$Proxy84.importLayouts(Unknown Source)
              at com.liferay.portlet.exportimport.service.ExportImportLocalServiceUtil.importLayouts(ExportImportLocalServiceUtil.java:100)
              at com.liferay.exportimport.background.task.LayoutStagingBackgroundTaskExecutor$LayoutStagingImportCallable.call(LayoutStagingBackgroundTaskExecutor.java:240)
              at com.liferay.exportimport.background.task.LayoutStagingBackgroundTaskExecutor$LayoutStagingImportCallable.call(LayoutStagingBackgroundTaskExecutor.java:213)
              at com.liferay.portal.spring.transaction.TransactionInvokerImpl$CallableMethodInvocation.proceed(TransactionInvokerImpl.java:113)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:84)
              at com.liferay.portal.spring.transaction.TransactionInvokerImpl.invoke(TransactionInvokerImpl.java:41)
              at com.liferay.portal.kernel.transaction.TransactionInvokerUtil.invoke(TransactionInvokerUtil.java:28)
              at com.liferay.exportimport.background.task.LayoutStagingBackgroundTaskExecutor.execute(LayoutStagingBackgroundTaskExecutor.java:125)
              at com.liferay.portal.kernel.backgroundtask.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:58)
              at com.liferay.portal.kernel.backgroundtask.DelegatingBackgroundTaskExecutor.execute(DelegatingBackgroundTaskExecutor.java:43)
              at com.liferay.portal.kernel.backgroundtask.ThreadLocalAwareBackgroundTaskExecutor.execute(ThreadLocalAwareBackgroundTaskExecutor.java:56)
              at com.liferay.portal.background.task.internal.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:121)
              at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
              at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:72)
              at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:756)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:667)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: com.thoughtworks.xstream.converters.ConversionException: com.liferay.portal.model.LayoutStagingHandler : com.liferay.portal.model.LayoutStagingHandler_---- Debugging information ----_message             : com.liferay.portal.model.LayoutStagingHandler_cause-exception     : com.thoughtworks.xstream.security.ForbiddenClassException_cause-message       : com.liferay.portal.model.LayoutStagingHandler_class               : com.thoughtworks.xstream.mapper.DynamicProxyMapper$DynamicProxy_required-type       : com.thoughtworks.xstream.mapper.DynamicProxyMapper$DynamicProxy_converter-type      : com.thoughtworks.xstream.converters.extended.DynamicProxyConverter_path                : /dynamic-proxy/handler_line number         : 3_version             : 1.4.7_------------------------------- [Sanitized]
              at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
              at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
              at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
              at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1185)
              at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1169)
              at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1040)
              at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1031)
              at com.liferay.exportimport.lar.PortletDataContextImpl.fromXML(PortletDataContextImpl.java:706)
              at com.liferay.exportimport.lar.PortletDataContextImpl.getZipEntryAsObject(PortletDataContextImpl.java:1385)
              at com.liferay.portlet.exportimport.lar.StagedModelDataHandlerUtil._getStagedModel(StagedModelDataHandlerUtil.java:440)
              at com.liferay.portlet.exportimport.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:351)
              at com.liferay.exportimport.controller.LayoutImportController.importLayout(LayoutImportController.java:991)
              at com.liferay.exportimport.controller.LayoutImportController.doImportFile(LayoutImportController.java:686)
              at com.liferay.exportimport.controller.LayoutImportController.importFile(LayoutImportController.java:219)
              at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importLayouts(ExportImportLocalServiceImpl.java:185)
              ... 28 more
      Caused by: com.thoughtworks.xstream.security.ForbiddenClassException: com.liferay.portal.model.LayoutStagingHandler
              at com.thoughtworks.xstream.security.NoTypePermission.allows(NoTypePermission.java:26)
              at com.thoughtworks.xstream.mapper.SecurityMapper.realClass(SecurityMapper.java:74)
              at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
              at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
              at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:47)
              at com.thoughtworks.xstream.converters.extended.DynamicProxyConverter.unmarshal(DynamicProxyConverter.java:112)
              at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
              ... 45 more

      Note that the exception will still be thrown even if you did not make any changes as suggested in step 4 above.

      Reproduced in master (8f8ff7e90413813db79395216deb501e40e0973f)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              victor.ware Victor Ware
              Reporter:
              michael.bowerman Michael Bowerman (Inactive)
              Participants of an Issue:
              Recent user:
              Mária Kispál (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 11 weeks, 5 days ago

                  Packages

                  Version Package
                  7.0.0 Beta 2