Issue
- After migrating our database from Liferay 6.2 to DXP 7.3, we wanted to add a new site using a certain migrated template. After choosing it, we receive the following errors and we need to stop the server:
ERROR [http-nio-9080-exec-3][LoggerExportImportLifecycleListener:236] Portlet export failed for portlet com_liferay_layout_set_prototype_web_portlet_SiteTemplateSettingsPortlet
com.liferay.exportimport.kernel.lar.PortletDataException
at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.exportStagedModel(BaseStagedModelDataHandler.java:149)
at com.liferay.exportimport.data.handler.base.BaseStagedModelDataHandler.exportStagedModel(BaseStagedModelDataHandler.java:80)
at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.exportStagedModel(StagedModelDataHandlerUtil.java:170)
at com.liferay.exportimport.internal.controller.LayoutExportController.doExport(LayoutExportController.java:321)
at com.liferay.exportimport.internal.controller.LayoutExportController.export(LayoutExportController.java:119)
at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.exportLayoutsAsFile(ExportImportLocalServiceImpl.java:62)
at jdk.internal.reflect.GeneratedMethodAccessor674.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69)
at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
at com.liferay.change.tracking.internal.aop.CTTransactionAdvice.invoke(CTTransactionAdvice.java:80)
at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
at com.sun.proxy.$Proxy109.exportLayoutsAsFile(Unknown Source)
at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.exportLayoutsAsFile(ExportImportLocalServiceUtil.java:45)
at com.liferay.portlet.sites.util.SitesImpl.exportLayoutSetPrototype(SitesImpl.java:714)
at com.liferay.sites.kernel.util.SitesUtil.exportLayoutSetPrototype(SitesUtil.java:155)
at com.liferay.layout.set.prototype.internal.exportimport.data.handler.LayoutSetPrototypeStagedModelDataHandler.exportLayouts(LayoutSetPrototypeStagedModelDataHandler.java:254)
at com.liferay.layout.set.prototype.internal.exportimport.data.handler.LayoutSetPrototypeStagedModelDataHandler.doExportStagedModel(LayoutSetPrototypeStagedModelDataHandler.java:125)
at com.liferay.layout.set.prototype.internal.exportimport.data.handler.LayoutSetPrototypeStagedModelDataHandler.doExportStagedModel(LayoutSetPrototypeStagedModelDataHandler.java:60)
.
.
.
Caused by: java.lang.StackOverflowError -
The site is created but without the pages of the template, although the template is displayed as chosen in the site configuration. Other templates work and new templates can be created and used.
Environment
- DXP 7.3
Resolution
- The current behavior is due to a problematic entry in the database. You need to find its ID in your database. If you need help with this, please open a ticket to our support.
- Example: a problematic Control Panel portlet is assigned to a simple page, which is no longer supported. This is a portlet preference that needs to be deleted.
-
Our recommendation is to delete this entry with the API.
To do that, please use one of the two scripts, one for 6.2 and one for 7.3.
Please make sure to replaceENTRYID
with the actual ID.
- If you finished the upgrade, run the 7.3 script: 7310_deletingWrongPortletPreference.java
- If you want to upgrade again, run the 6.2 script on 6.2 then you can do the upgrade again and should not see this issue on 7.3: 6210_deletingWrongPortletPreference.java
Additional Information