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

ClassCastException when deploying a portlet after having installed a service wrapper for PortletLocalService.

    Details

      Description

      ClassCastException when deploying a portlet after having installed a service wrapper for PortletLocalService.

      Steps to reproduce:

      1. Set cluster.link.enabled=true on portal-ext.properties.
      2. Create a basic service wrapper for PortletLocalService OR
        2.A Use attached file: portletlocalservice-1.0.0.jar for master and 7.0
      3. Deploy the hook.
      4. Deploy a portlet.

      Log error:

      10:36:04,623 ERROR [localhost-startStop-1][HotDeployImpl:233] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for sync-admin-portletsync-admin-portlet
      com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for sync-admin-portletsync-admin-portlet
      	at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)
      	at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:128)
      	at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:230)
      	at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:257)
      	at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
      	at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:28)
      	at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:186)
      	at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:170)
      	at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:44)
      	at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:74)
      	at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:58)
      	at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:54)
      	at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:120)
      	at com.liferay.portal.kernel.servlet.SecurePluginContextListener.contextInitialized(SecurePluginContextListener.java:151)
      	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5528)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
      	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1263)
      	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1948)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.ClassCastException: com.sun.proxy.$Proxy558 cannot be cast to com.liferay.portal.kernel.bean.IdentifiableBean
      	at com.liferay.portal.bean.IdentifiableBeanInvokerUtil.createMethodHandler(IdentifiableBeanInvokerUtil.java:43)
      	at com.liferay.portal.cluster.ClusterableInvokerUtil.createMethodHandler(ClusterableInvokerUtil.java:52)
      	at com.liferay.portal.cluster.ClusterableAdvice.afterReturning(ClusterableAdvice.java:54)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
      	at com.sun.proxy.$Proxy74.clearCompanyPortletsPool(Unknown Source)
      	at com.liferay.portal.service.impl.PortletLocalServiceImpl.clearCache(PortletLocalServiceImpl.java:207)
      	at com.liferay.portal.service.impl.PortletLocalServiceImpl.initWAR(PortletLocalServiceImpl.java:831)
      	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.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)
      	at com.sun.proxy.$Proxy557.initWAR(Unknown Source)
      	at com.liferay.portal.service.PortletLocalServiceWrapper.initWAR(PortletLocalServiceWrapper.java:462)
      	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.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)
      	at com.sun.proxy.$Proxy558.initWAR(Unknown Source)
      	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:115)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
      	at com.sun.proxy.$Proxy74.initWAR(Unknown Source)
      	at com.liferay.portal.service.PortletLocalServiceUtil.initWAR(PortletLocalServiceUtil.java:428)
      	at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:347)
      	at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:125)
      	... 25 more
      

      This log error may look a bit different depending on the liferay version we are running

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

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

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 DXP FP6
                  7.0.0 DXP SP1
                  7.0.3 CE GA4
                  Master