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

NoSuchFriendlyURLEntryException is throw during LAR import when web content already exists

    Details

      Description

      Steps to reproduce

      1. Create a site
      2. Create a webcontent in that site
      3. In web content section, export a LAR file with that webcontent
      4. Download LAR file to disk
      5. Delete site
      6. Create a new site
      7. Go to web content section and import LAR file
      8. Repeat import LAR file operation
        • Expected behavior: LAR file is imported again, overwritting/updating existing objects
        • Wrong behavior: NoSuchFriendlyURLEntryException is thrown
          2018-08-09 13:23:59.941 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:168] Unable to execute background task
          com.liferay.exportimport.kernel.lar.PortletDataException: No FriendlyURLEntry exists with the primary key 47927
                  at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:433)
                  at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:449)
                  at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:435)
                  at com.liferay.journal.internal.exportimport.data.handler.JournalPortletDataHandler.doImportData(JournalPortletDataHandler.java:374)
                  at com.liferay.exportimport.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:383)
                  at com.liferay.exportimport.internal.controller.PortletImportControllerImpl.importPortletData(PortletImportControllerImpl.java:415)
                  at com.liferay.exportimport.internal.controller.PortletImportControllerImpl.importPortletData(PortletImportControllerImpl.java:346)
                  at com.liferay.exportimport.internal.controller.PortletImportControllerImpl.doImportPortletInfo(PortletImportControllerImpl.java:1101)
                  at com.liferay.exportimport.internal.controller.PortletImportControllerImpl.importFile(PortletImportControllerImpl.java:299)
                  at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importPortletInfo(ExportImportLocalServiceImpl.java:462)
                  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.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:158)
                  at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
                  at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
                  at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:135)
                  at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
                  at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:135)
                  at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:145)
                  at com.sun.proxy.$Proxy131.importPortletInfo(Unknown Source)
                  at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.importPortletInfo(ExportImportLocalServiceUtil.java:186)
                  at com.liferay.exportimport.internal.background.task.PortletImportBackgroundTaskExecutor$PortletImportCallable.call(PortletImportBackgroundTaskExecutor.java:138)
                  at com.liferay.exportimport.internal.background.task.PortletImportBackgroundTaskExecutor$PortletImportCallable.call(PortletImportBackgroundTaskExecutor.java:124)
                  at com.liferay.portal.spring.transaction.TransactionInvokerImpl$CallableMethodInvocation.proceed(TransactionInvokerImpl.java:101)
                  at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
                  at com.liferay.portal.spring.transaction.TransactionInvokerImpl.invoke(TransactionInvokerImpl.java:47)
                  at com.liferay.portal.kernel.transaction.TransactionInvokerUtil.invoke(TransactionInvokerUtil.java:28)
                  at com.liferay.exportimport.internal.background.task.PortletImportBackgroundTaskExecutor.execute(PortletImportBackgroundTaskExecutor.java:88)
                  at com.liferay.portal.background.task.internal.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:62)
                  at com.liferay.portal.kernel.backgroundtask.DelegatingBackgroundTaskExecutor.execute(DelegatingBackgroundTaskExecutor.java:43)
                  at com.liferay.portal.background.task.internal.ThreadLocalAwareBackgroundTaskExecutor.execute(ThreadLocalAwareBackgroundTaskExecutor.java:75)
                  at com.liferay.portal.background.task.internal.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:127)
                  at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
                  at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
                  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.liferay.friendly.url.exception.NoSuchFriendlyURLEntryException: No FriendlyURLEntry exists with the primary key 47927
                  at com.liferay.friendly.url.service.persistence.impl.FriendlyURLEntryPersistenceImpl.findByPrimaryKey(FriendlyURLEntryPersistenceImpl.java:2522)
                  at com.liferay.friendly.url.service.persistence.impl.FriendlyURLEntryPersistenceImpl.findByPrimaryKey(FriendlyURLEntryPersistenceImpl.java:2539)
                  at com.liferay.friendly.url.service.impl.FriendlyURLEntryLocalServiceImpl.getMainFriendlyURLEntry(FriendlyURLEntryLocalServiceImpl.java:331)
                  at com.liferay.friendly.url.service.impl.FriendlyURLEntryLocalServiceImpl.getMainFriendlyURLEntry(FriendlyURLEntryLocalServiceImpl.java:320)
                  at sun.reflect.GeneratedMethodAccessor2394.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:498)
                  at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:158)
                  at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
                  at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
                  at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:135)
                  at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
                  at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:135)
                  at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:145)
                  at com.sun.proxy.$Proxy832.getMainFriendlyURLEntry(Unknown Source)
                  at com.liferay.journal.internal.exportimport.data.handler.JournalArticleStagedModelDataHandler._importFriendlyURLEntries(JournalArticleStagedModelDataHandler.java:1342)
                  at com.liferay.journal.internal.exportimport.data.handler.JournalArticleStagedModelDataHandler.doImportStagedModel(JournalArticleStagedModelDataHandler.java:964)
                  at com.liferay.journal.internal.exportimport.data.handler.JournalArticleStagedModelDataHandler.doImportStagedModel(JournalArticleStagedModelDataHandler.java:103)
                  at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:392)
                  ... 39 more
          

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              maria.kispal Mária Kispál (Inactive)
              Reporter:
              jorge.diaz Jorge Diaz
              Participants of an Issue:
              Recent user:
              Jorge Diaz
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 16 weeks, 6 days ago

                  Packages

                  Version Package
                  7.1.X
                  Master