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

java.lang.ClassCastException: *IndexSettingsContributor cannot be cast to java.lang.Comparable

    Details

    • Branch Version/s:
      7.3.x, 7.2.x
    • Backported to Branch:
      Committed
    • Fix Priority:
      4

      Description

      Using the new index settings contributors defined in portal-search-spi can result in ClassCastExceptions like this one:

      java.lang.ClassCastException: com.liferay.commerce.elasticsearch6.internal.index.settings.contributor.CommerceIndexSettingsContributor cannot be cast to java.lang.Comparable
      	at java.util.concurrent.ConcurrentSkipListMap.cpr(ConcurrentSkipListMap.java:655)
      	at java.util.concurrent.ConcurrentSkipListMap.doRemove(ConcurrentSkipListMap.java:973)
      	at java.util.concurrent.ConcurrentSkipListMap.remove(ConcurrentSkipListMap.java:1975)
      	at java.util.concurrent.ConcurrentSkipListSet.remove(ConcurrentSkipListSet.java:259)
      	at com.liferay.portal.search.elasticsearch6.internal.index.CompanyIndexFactory.removeIndexSettingsContributor(CompanyIndexFactory.java:349)
      	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 org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228)
      	at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41)
      	at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664)
      	at org.apache.felix.scr.impl.inject.methods.BaseMethod$NotResolved.invoke(BaseMethod.java:619)
      	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510)
      	at org.apache.felix.scr.impl.inject.methods.BindMethod.invoke(BindMethod.java:42)
      	at org.apache.felix.scr.impl.manager.DependencyManager.invokeUnbindMethod(DependencyManager.java:1927)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeUnbindMethod(SingleComponentManager.java:459)
      	at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.removedService(DependencyManager.java:390)
      	at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.removedService(DependencyManager.java:302)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1242)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1137)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.untrack(ServiceTracker.java:997)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1176)
      	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125)
      	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:222)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.unregister(AbstractComponentManager.java:927)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.unregister(AbstractComponentManager.java:892)
      	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:135)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.unregisterService(AbstractComponentManager.java:969)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.doDeactivate(AbstractComponentManager.java:823)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.deactivateInternal(AbstractComponentManager.java:805)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.dispose(AbstractComponentManager.java:584)
      	at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.disposeComponents(ConfigurableComponentHolder.java:716)
      	at org.apache.felix.scr.impl.BundleComponentActivator.dispose(BundleComponentActivator.java:511)
      	at org.apache.felix.scr.impl.Activator.disposeComponents(Activator.java:428)
      	at org.apache.felix.scr.impl.Activator.access$300(Activator.java:49)
      	at org.apache.felix.scr.impl.Activator$ScrExtension.destroy(Activator.java:291)
      	at org.apache.felix.scr.impl.AbstractExtender$1.run(AbstractExtender.java:216)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at org.apache.felix.scr.impl.AbstractExtender.destroyExtension(AbstractExtender.java:238)
      	at org.apache.felix.scr.impl.AbstractExtender.bundleChanged(AbstractExtender.java:132)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908)
      	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
      	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
      	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:230)
      	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:137)
      	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:129)
      	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:191)
      	at org.eclipse.osgi.container.Module.publishEvent(Module.java:476)
      	at org.eclipse.osgi.container.Module.doStop(Module.java:634)
      	at org.eclipse.osgi.container.Module.stop(Module.java:498)
      	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1723)
      	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1642)
      	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1555)
      	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
      	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
      	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              adam.brandizzi Adam Brandizzi
              Reporter:
              adam.brandizzi Adam Brandizzi
              Participants of an Issue:
              Recent user:
              Tibor Lipusz
              Engineering Assignee:
              Adam Brandizzi
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 2 weeks, 1 day ago
                Development End Date:

                  Packages

                  Version Package
                  7.2.10 DXP FP9
                  7.2.X
                  7.3.5 CE GA6
                  7.3.10 DXP GA1
                  7.3.X
                  Master