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

Cannot import the guest site into the guest site of another installation

    Details

      Description

      Steps to reproduce

      1. Create a site s1
      2. Create a content page Home (check that its friendly URL is /home)
      3. Export site s1
      4. Import site s1 into the default site

      Original Steps to reproduce:(please, use the steps enumerated above to avoid unrelated blocking points to this issue)

      1. Export the main instance's default site
      2. Import it into the main instance's default site of a different physical environment

      Expected result:

      • Import finishes successfully

      Actual results:

      • Import fails with "[JDBCExceptionReporter:234] Duplicate entry '37244-20033-4-0' for key 'LayoutPageTemplateStructure.IX_5B236537'"
        2021-02-19 15:31:13.152 ERROR [liferay/background_task-4][JDBCExceptionReporter:234] Batch entry 0 insert into LayoutPageTemplateStructure (mvccVersion, ctCollectionId, uuid_, groupId, companyId, userId, userName, createDate, modifiedDate, classNameId, classPK, layoutPageTemplateStructureId) values (0, 0, 'c56d7b86-665d-2514-e383-1d9467379715', 20121, 20097, 20125, 'Test Test', '2021-02-19 15:22:04.239+00', '2021-02-19 15:22:04.277+00', 20006, 8, 37805) was aborted: ERROR: duplicate key value violates unique constraint "ix_5b236537"_  Detail: Key (groupid, classnameid, classpk, ctcollectionid)=(20121, 20006, 8, 0) already exists.  Call getNextException to see other errors in the batch. [Sanitized]
        2021-02-19 15:31:13.153 ERROR [liferay/background_task-4][JDBCExceptionReporter:234] ERROR: duplicate key value violates unique constraint "ix_5b236537"_  Detail: Key (groupid, classnameid, classpk, ctcollectionid)=(20121, 20006, 8, 0) already exists. [Sanitized]
        2021-02-19 15:31:13.333 ERROR [liferay/background_task-4][BackgroundTaskMessageListener:182] Unable to execute background task
        com.liferay.exportimport.kernel.lar.PortletDataException: Could not execute JDBC batch update
        	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:408)
        	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:381)
        	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:367)
        	at com.liferay.layout.admin.web.internal.exportimport.data.handler.helper.LayoutPageTemplateStructureDataHandlerHelper.importLayoutPageTemplateStructure(LayoutPageTemplateStructureDataHandlerHelper.java:61)
        	at com.liferay.layout.admin.web.internal.exportimport.data.handler.LayoutStagedModelDataHandler.importLayoutPageTemplateStructures(LayoutStagedModelDataHandler.java:1590)
        	at com.liferay.layout.admin.web.internal.exportimport.data.handler.LayoutStagedModelDataHandler.doImportStagedModel(LayoutStagedModelDataHandler.java:930)
        	at com.liferay.layout.admin.web.internal.exportimport.data.handler.LayoutStagedModelDataHandler.doImportStagedModel(LayoutStagedModelDataHandler.java:148)
        	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:367)
        	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:381)
        	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:367)
        	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.doImportReferenceStagedModel(StagedModelDataHandlerUtil.java:454)
        	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importReferenceStagedModel(StagedModelDataHandlerUtil.java:296)
        	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importReferenceStagedModels(BaseStagedModelDataHandler.java:859)
        	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:365)
        	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:381)
        	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:367)
        	at com.liferay.site.internal.exportimport.data.handler.StagedGroupStagedModelDataHandler.doImportStagedModel(StagedGroupStagedModelDataHandler.java:348)
        	at com.liferay.site.internal.exportimport.data.handler.StagedGroupStagedModelDataHandler.doImportStagedModel(StagedGroupStagedModelDataHandler.java:78)
        	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:367)
        	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:381)
        	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:367)
        	at com.liferay.exportimport.internal.controller.LayoutImportController.doImportFile(LayoutImportController.java:592)
        	at com.liferay.exportimport.internal.controller.LayoutImportController.importFile(LayoutImportController.java:221)
        	at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importLayouts(ExportImportLocalServiceImpl.java:189)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.java:498)
        	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.$Proxy104.importLayouts(Unknown Source)
        	at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.importLayouts(ExportImportLocalServiceUtil.java:105)
        	at com.liferay.exportimport.internal.background.task.LayoutImportBackgroundTaskExecutor$LayoutImportCallable.call(LayoutImportBackgroundTaskExecutor.java:133)
        	at com.liferay.exportimport.internal.background.task.LayoutImportBackgroundTaskExecutor$LayoutImportCallable.call(LayoutImportBackgroundTaskExecutor.java:119)
        	at com.liferay.portal.spring.transaction.BaseTransactionExecutor.execute(BaseTransactionExecutor.java:37)
        	at com.liferay.portal.spring.transaction.TransactionInvokerImpl.invoke(TransactionInvokerImpl.java:39)
        	at com.liferay.portal.kernel.transaction.TransactionInvokerUtil.invoke(TransactionInvokerUtil.java:28)
        	at com.liferay.exportimport.internal.background.task.LayoutImportBackgroundTaskExecutor.execute(LayoutImportBackgroundTaskExecutor.java:85)
        	at com.liferay.portal.background.task.internal.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:62)
        	at com.liferay.portal.kernel.backgroundtask.DelegatingBackgroundTaskExecutor.execute(DelegatingBackgroundTaskExecutor.java:41)
        	at com.liferay.portal.background.task.internal.ThreadLocalAwareBackgroundTaskExecutor.execute(ThreadLocalAwareBackgroundTaskExecutor.java:72)
        	at com.liferay.portal.background.task.internal.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:136)
        	at com.liferay.portal.kernel.messaging.BaseMessageListener.doReceive(BaseMessageListener.java:48)
        	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:34)
        	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
        	at com.liferay.portal.messaging.internal.ParallelDestination$1.run(ParallelDestination.java:56)
        	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        	at java.lang.Thread.run(Thread.java:748)
        Caused by: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
        	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)
        	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
        	at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
        	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)
        	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
        	at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
        	at com.liferay.portal.dao.orm.hibernate.event.NestableFlushEventListener.onFlush(NestableFlushEventListener.java:61)
        	at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
        	at com.liferay.portal.spring.hibernate.PortletTransactionManager$TransactionStatusWrapper.reset(PortletTransactionManager.java:260)
        	at com.liferay.portal.spring.hibernate.PortletTransactionManager.commit(PortletTransactionManager.java:63)
        	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.commit(DefaultTransactionExecutor.java:41)
        	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
        	at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
        	at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:60)
        	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.$Proxy966.addLayoutPageTemplateStructure(Unknown Source)
        	at com.liferay.layout.admin.web.internal.exportimport.staged.model.repository.LayoutPageTemplateStructureStagedModelRepository.addStagedModel(LayoutPageTemplateStructureStagedModelRepository.java:61)
        	at com.liferay.layout.admin.web.internal.exportimport.staged.model.repository.LayoutPageTemplateStructureStagedModelRepository.addStagedModel(LayoutPageTemplateStructureStagedModelRepository.java:36)
        	at com.liferay.layout.admin.web.internal.exportimport.data.handler.LayoutPageTemplateStructureStagedModelDataHandler.doImportStagedModel(LayoutPageTemplateStructureStagedModelDataHandler.java:101)
        	at com.liferay.layout.admin.web.internal.exportimport.data.handler.LayoutPageTemplateStructureStagedModelDataHandler.doImportStagedModel(LayoutPageTemplateStructureStagedModelDataHandler.java:40)
        	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:367)
        	... 52 more
        Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into LayoutPageTemplateStructure (mvccVersion, ctCollectionId, uuid_, groupId, companyId, userId, userName, createDate, modifiedDate, classNameId, classPK, layoutPageTemplateStructureId) values (0, 0, 'c56d7b86-665d-2514-e383-1d9467379715', 20121, 20097, 20125, 'Test Test', '2021-02-19 15:22:04.239+00', '2021-02-19 15:22:04.277+00', 20006, 8, 37805) was aborted: ERROR: duplicate key value violates unique constraint "ix_5b236537"_  Detail: Key (groupid, classnameid, classpk, ctcollectionid)=(20121, 20006, 8, 0) already exists.  Call getNextException to see other errors in the batch. [Sanitized]
        	at org.postgresql.jdbc.BatchResultHandler.handleError(BatchResultHandler.java:148)
        	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2184)
        	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:481)
        	at org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:840)
        	at org.postgresql.jdbc.PgPreparedStatement.executeBatch(PgPreparedStatement.java:1538)
        	at com.zaxxer.hikari.pool.ProxyStatement.executeBatch(ProxyStatement.java:125)
        	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeBatch(HikariProxyPreparedStatement.java)
        	at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
        	at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
        	... 71 more
        Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "ix_5b236537"_  Detail: Key (groupid, classnameid, classpk, ctcollectionid)=(20121, 20006, 8, 0) already exists. [Sanitized]
        	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
        	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
        	... 78 more
        
        

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              yang.cao Yang Cao
              Reporter:
              daniel.couso Daniel Couso
              Participants of an Issue:
              Recent user:
              Minhchau Dang
              Engineering Assignee:
              Daniel Couso
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                38 weeks, 5 days ago

                  Packages

                  Version Package
                  7.2.10 DXP FP15
                  7.2.X
                  7.3.10 DXP FP1
                  7.3.10.1 DXP SP1
                  7.3.6 CE GA7
                  7.3.7 CE GA8
                  7.3.X
                  7.4.0 CE GA1 DXP 7,4
                  7.4.13 DXP GA1
                  Master