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

Fix class cast exception from race condition with FinderCache

    Details

      Description

      Fix class cast exception from race condition with FinderCache.

      Example stacktrace:

      Caused by: com.liferay.exportimport.kernel.lar.PortletDataException: java.lang.ClassCastException: com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl$NullModel cannot be cast to com.liferay.document.library.kernel.model.DLFolder
      	at com.liferay.document.library.internal.exportimport.data.handler.FolderStagedModelDataHandler.restoreStagedModel(FolderStagedModelDataHandler.java:140)
      	at com.liferay.document.library.internal.exportimport.data.handler.FolderStagedModelDataHandler.restoreStagedModel(FolderStagedModelDataHandler.java:63)
      	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:364)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:448)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:434)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.doImportReferenceStagedModel(StagedModelDataHandlerUtil.java:523)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importReferenceStagedModel(StagedModelDataHandlerUtil.java:360)
      	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importReferenceStagedModels(BaseStagedModelDataHandler.java:841)
      	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:369)
      	at com.liferay.document.library.internal.exportimport.data.handler.FileEntryStagedModelDataHandler.importStagedModel(FileEntryStagedModelDataHandler.java:184)
      	at com.liferay.document.library.internal.exportimport.data.handler.FileEntryStagedModelDataHandler.importStagedModel(FileEntryStagedModelDataHandler.java:99)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:448)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:434)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.doImportReferenceStagedModel(StagedModelDataHandlerUtil.java:523)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importReferenceStagedModel(StagedModelDataHandlerUtil.java:360)
      	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importReferenceStagedModels(BaseStagedModelDataHandler.java:841)
      	at com.liferay.exportimport.kernel.lar.BaseStagedModelDataHandler.importStagedModel(BaseStagedModelDataHandler.java:369)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:448)
      	at com.liferay.exportimport.kernel.lar.StagedModelDataHandlerUtil.importStagedModel(StagedModelDataHandlerUtil.java:434)
      	at com.liferay.journal.exportimport.data.handler.JournalPortletDataHandler.doImportData(JournalPortletDataHandler.java:363)
      	at com.liferay.exportimport.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:387)
      	at com.liferay.exportimport.internal.controller.PortletImportControllerImpl.importPortletData(PortletImportControllerImpl.java:396)
      	at com.liferay.exportimport.internal.controller.PortletImportControllerImpl.importPortletData(PortletImportControllerImpl.java:345)
      	at com.liferay.exportimport.internal.controller.PortletImportControllerImpl.doImportPortletInfo(PortletImportControllerImpl.java:1074)
      	at com.liferay.exportimport.internal.controller.PortletImportControllerImpl.importFile(PortletImportControllerImpl.java:300)
      	at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importPortletInfo(ExportImportLocalServiceImpl.java:419)
      	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:163)
      	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:137)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:169)
      	at com.sun.proxy.$Proxy114.importPortletInfo(Unknown Source)
      	at com.liferay.exportimport.kernel.service.ExportImportLocalServiceUtil.importPortletInfo(ExportImportLocalServiceUtil.java:188)
      	at com.liferay.exportimport.internal.background.task.PortletStagingBackgroundTaskExecutor$PortletStagingCallable.call(PortletStagingBackgroundTaskExecutor.java:172)
      	at com.liferay.exportimport.internal.background.task.PortletStagingBackgroundTaskExecutor$PortletStagingCallable.call(PortletStagingBackgroundTaskExecutor.java:149)
      	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.PortletStagingBackgroundTaskExecutor.execute(PortletStagingBackgroundTaskExecutor.java:96)
      	at com.liferay.portal.kernel.backgroundtask.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:54)
      	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:125)
      	... 221 more
      Caused by: java.lang.ClassCastException: com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl$NullModel cannot be cast to com.liferay.document.library.kernel.model.DLFolder
      	at com.liferay.portlet.documentlibrary.service.persistence.impl.DLFolderPersistenceImpl.fetchByUUID_G(DLFolderPersistenceImpl.java:810)
      	at com.liferay.portlet.documentlibrary.service.persistence.impl.DLFolderPersistenceImpl.fetchByUUID_G(DLFolderPersistenceImpl.java:705)
      	at com.liferay.portlet.documentlibrary.service.impl.DLFolderLocalServiceImpl.fetchFolder(DLFolderLocalServiceImpl.java:321)
      	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:163)
      	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:137)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:137)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:169)
      	at com.sun.proxy.$Proxy131.fetchFolder(Unknown Source)
      	at com.liferay.document.library.internal.exportimport.data.handler.FolderStagedModelDataHandler.fetchStagedModelByUuidAndGroupId(FolderStagedModelDataHandler.java:91)
      	at com.liferay.document.library.internal.exportimport.data.handler.FolderStagedModelDataHandler.doRestoreStagedModel(FolderStagedModelDataHandler.java:323)
      	at com.liferay.document.library.internal.exportimport.data.handler.FolderStagedModelDataHandler.restoreStagedModel(FolderStagedModelDataHandler.java:134)
      	... 270 more
      

        Attachments

          Activity

            People

            • Assignee:
              brian.chan Brian Chan
              Reporter:
              preston.crary Preston Crary
              Participants of an Issue:
              Recent user:
              Jason Pince
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 22 weeks, 5 days ago

                Packages

                Version Package
                7.1.X
                Master