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

Indexer post processor generates NullPointerException/error on startup

    Details

      Description

      Steps to reproduce:

      1. Start Liferay
      2. Download and build the liferay-blade-samples project blade.indexerpostprocessor (https://github.com/liferay/liferay-blade-samples) (also attached to this ticket)
      3. Place the .jar file in the 'deploy' folder
      4. Stop the portal and restart it

      Expected: No error messages
      Actual: Errors in the log:

      12:47:01,516 ERROR [Start Level: Equinox Container: 105ca600-c83b-0017-16ba-f3581a51cfaa][IndexerPostProcessorRegistry:56] No indexer exists for com.liferay.blogs.kernel.model.BlogsEntry
      12:47:01,516 ERROR [Start Level: Equinox Container: 105ca600-c83b-0017-16ba-f3581a51cfaa][IndexerPostProcessorRegistry:56] No indexer exists for com.liferay.blogs.model.BlogsEntry
      12:47:01,520 ERROR [Start Level: Equinox Container: 105ca600-c83b-0017-16ba-f3581a51cfaa][IndexerPostProcessorRegistry:56] No indexer exists for com.liferay.portal.kernel.model.Contact
      12:47:01,520 ERROR [Start Level: Equinox Container: 105ca600-c83b-0017-16ba-f3581a51cfaa][IndexerPostProcessorRegistry:56] No indexer exists for com.liferay.portal.kernel.model.Organization
      12:47:01,526 ERROR [Start Level: Equinox Container: 105ca600-c83b-0017-16ba-f3581a51cfaa][IndexerPostProcessorRegistry:56] No indexer exists for com.liferay.portlet.messageboards.util.MBMessageIndexer
      12:47:01,526 ERROR [Start Level: Equinox Container: 105ca600-c83b-0017-16ba-f3581a51cfaa][IndexerPostProcessorRegistry:56] No indexer exists for com.liferay.portlet.usersadmin.util.ContactIndexer
      12:47:01,529 ERROR [Start Level: Equinox Container: 105ca600-c83b-0017-16ba-f3581a51cfaa][IndexerPostProcessorRegistry:56] No indexer exists for com.liferay.portal.kernel.model.User
      12:47:01,530 ERROR [Start Level: Equinox Container: 105ca600-c83b-0017-16ba-f3581a51cfaa][IndexerPostProcessorRegistry:56] No indexer exists for com.liferay.portal.kernel.model.UserGroup
      

      QA Note

      • When the post processors are registered properly, you should see the following log messages upon executing a search from the home page after you configured an "INFO" log level for category com.liferay.blade.samples.indexerpostprocessor (the test jar attached already contains a module-log4j.xml to configure INFO logging for the bundle):
        12:57:45,094 INFO  [http-nio-8080-exec-10][UserEntityIndexerPostProcessor:89] postProcessSearchQuery
        12:57:45,097 INFO  [http-nio-8080-exec-10][BlogsIndexerPostProcessor:89] postProcessSearchQuery
        12:57:45,098 INFO  [http-nio-8080-exec-10][UserEntityIndexerPostProcessor:49] postProcessContextBooleanFilter
        12:57:45,098 INFO  [http-nio-8080-exec-10][UserEntityIndexerPostProcessor:59] postProcessContextQuery
        12:57:45,099 INFO  [http-nio-8080-exec-10][BlogsIndexerPostProcessor:49] postProcessContextBooleanFilter
        12:57:45,099 INFO  [http-nio-8080-exec-10][BlogsIndexerPostProcessor:59] postProcessContextQuery
        12:57:45,100 INFO  [http-nio-8080-exec-10][UserEntityIndexerPostProcessor:78] postProcessFullQuery
        12:57:45,100 INFO  [http-nio-8080-exec-10][BlogsIndexerPostProcessor:78] postProcessFullQuery
        
      • On DXP you may get the following NullPointerException instead of error:
        12:27:33,321 ERROR [Start Level: Equinox Container: 50f8e3d4-442b-0017-12a0-c3bade4a594d][com_liferay_portal_search:97] [com.liferay.portal.search.internal.IndexerPostProcessorRegistry(1406)] The addIndexerPostProcessor method has thrown an exception 
        java.lang.NullPointerException
        	at com.liferay.portal.search.internal.IndexerPostProcessorRegistry.addIndexerPostProcessor(IndexerPostProcessorRegistry.java:53)
        	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.BaseMethod.invokeMethod(BaseMethod.java:224)
        	at org.apache.felix.scr.impl.inject.BaseMethod.access$500(BaseMethod.java:39)
        	at org.apache.felix.scr.impl.inject.BaseMethod$Resolved.invoke(BaseMethod.java:617)
        	at org.apache.felix.scr.impl.inject.BaseMethod.invoke(BaseMethod.java:501)
        	at org.apache.felix.scr.impl.inject.BindMethod.invoke(BindMethod.java:655)
        	at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:1722)
        	at org.apache.felix.scr.impl.manager.DependencyManager.open(DependencyManager.java:1556)
        	at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:260)
        	at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:108)
        	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:906)
        	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:879)
        	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:748)
        	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1012)
        	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:968)
        	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1215)
        	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1136)
        	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:945)
        	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:881)
        	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1167)
        	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:127)
        	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
        	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:917)
        	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.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
        	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
        	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
        	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
        	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
        	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:886)
        	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:873)
        	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:132)
        	at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:940)
        	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:740)
        	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1012)
        	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:968)
        	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1215)
        	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1136)
        	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:945)
        	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:881)
        	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1167)
        	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:127)
        	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
        	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:917)
        	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.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
        	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
        	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
        	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
        	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
        	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:886)
        	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:873)
        	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:132)
        	at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:940)
        	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:740)
        	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:674)
        	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:429)
        	at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:657)
        	at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:341)
        	at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:403)
        	at org.apache.felix.scr.impl.Activator.access$200(Activator.java:54)
        	at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:278)
        	at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
        	at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
        	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482)
        	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:1)
        	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
        	at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
        	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:905)
        	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:165)
        	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)
        	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)
        	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)
        	at org.eclipse.osgi.container.Module.publishEvent(Module.java:461)
        	at org.eclipse.osgi.container.Module.start(Module.java:452)
        	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
        	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
        	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
        	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
        	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

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

                Dates

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

                  Packages

                  Version Package
                  7.0.0 DXP FP21
                  7.0.0 DXP SP4
                  7.0.X EE
                  7.1.X
                  Master