Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 2.x, 2.1.2
    • Fix Version/s: 2.2.0
    • Component/s: Content Targeting
    • Labels:
      None

      Description

      Upgrade from 6.2 where Audience Targeting was installed and Upgrading com.liferay.content.targeting.report.campaign.tracking.action.internal.upgrade.v1_0_1.UpgradeSchema may fail. Similar to WCM-1447.

       

      Reproduction Steps:

      1. Start with a 6.2 instance of Liferay with latest Audience Targeting.
      2. Prepare a DXP bundle.
      3. Run the upgrade tool.
      4. Deploy Audience Targeting from develop branch (so including the fix for WCM-1440).

      Expected Result: Audience Targeting loads and functions normally.

      Actual Result: com.liferay.content.targeting.report.campaign.tracking.action.internal.upgrade.v1_0_1.UpgradeSchema may fail, resulting in the stack trace below:

       

      2018-05-01 21:11:29.619 INFO  [localhost-startStop-1][UpgradeProcess:86] Upgrading com.liferay.content.targeting.report.campaign.tracking.action.internal.upgrade.v1_0_1.UpgradeSchema
      2018-05-01 21:11:30.806 INFO  [localhost-startStop-1][UpgradeProcess:103] Failed upgrade process com.liferay.content.targeting.report.campaign.tracking.action.internal.upgrade.v1_0_1.UpgradeSchema in 1187ms
      2018-05-01 21:11:30.900 ERROR [localhost-startStop-1][com_liferay_portal_upgrade_impl:97] Invocation to listener threw exception 
      java.lang.RuntimeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.lang.NullPointerException
      	at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands$UpgradeInfosRunnable.run(ReleaseManagerOSGiCommands.java:564)
      	at com.liferay.portal.output.stream.container.internal.OutputStreamContainerFactoryTrackerImpl.runWithSwappedLog(OutputStreamContainerFactoryTrackerImpl.java:106)
      	at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands.executeUpgradeInfos(ReleaseManagerOSGiCommands.java:337)
      	at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands.doExecute(ReleaseManagerOSGiCommands.java:280)
      	at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands$UpgradeInfoServiceTrackerMapListener.keyEmitted(ReleaseManagerOSGiCommands.java:505)
      	at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands$UpgradeInfoServiceTrackerMapListener.keyEmitted(ReleaseManagerOSGiCommands.java:495)
      	at com.liferay.osgi.service.tracker.collections.internal.map.ServiceTrackerMapImpl$DefaultEmitter.emit(ServiceTrackerMapImpl.java:222)
      	at com.liferay.osgi.service.tracker.collections.map.PropertyServiceReferenceMapper.map(PropertyServiceReferenceMapper.java:43)
      	at com.liferay.osgi.service.tracker.collections.internal.map.ServiceTrackerMapImpl$ServiceReferenceServiceTrackerCustomizer.addingService(ServiceTrackerMapImpl.java:261)
      	at com.liferay.osgi.service.tracker.collections.internal.map.ServiceTrackerMapImpl$ServiceReferenceServiceTrackerCustomizer.addingService(ServiceTrackerMapImpl.java:248)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
      	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
      	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)
      	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.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:482)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1001)
      	at com.liferay.portal.upgrade.internal.registry.UpgradeStepRegistratorTracker.register(UpgradeStepRegistratorTracker.java:78)
      	at com.liferay.portal.upgrade.internal.registry.UpgradeStepRegistratorTracker$UpgradeStepRegistry.register(UpgradeStepRegistratorTracker.java:237)
      	at com.liferay.content.targeting.report.campaign.tracking.action.internal.upgrade.CampaignTrackingActionServiceUpgrade.register(CampaignTrackingActionServiceUpgrade.java:53)
      	at com.liferay.portal.upgrade.internal.registry.UpgradeStepRegistratorTracker$UpgradeStepRegistratorServiceTrackerCustomizer.addingService(UpgradeStepRegistratorTracker.java:169)
      	at com.liferay.portal.upgrade.internal.registry.UpgradeStepRegistratorTracker$UpgradeStepRegistratorServiceTrackerCustomizer.addingService(UpgradeStepRegistratorTracker.java:150)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
      	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
      	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)
      	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 com.liferay.portal.spring.extender.internal.bean.ApplicationContextServicePublisher.registerService(ApplicationContextServicePublisher.java:235)
      	at com.liferay.portal.spring.extender.internal.bean.ApplicationContextServicePublisher.registerService(ApplicationContextServicePublisher.java:225)
      	at com.liferay.portal.spring.extender.internal.bean.ApplicationContextServicePublisher.register(ApplicationContextServicePublisher.java:70)
      	at com.liferay.portal.spring.extender.internal.context.ModuleApplicationContextRegistrator.start(ModuleApplicationContextRegistrator.java:78)
      	at sun.reflect.GeneratedMethodAccessor347.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.felix.dm.InvocationUtil.invokeMethod(InvocationUtil.java:111)
      	at org.apache.felix.dm.InvocationUtil.invokeCallbackMethod(InvocationUtil.java:66)
      	at org.apache.felix.dm.impl.ComponentImpl.invokeCallbackMethod(ComponentImpl.java:769)
      	at org.apache.felix.dm.impl.ComponentImpl.invoke(ComponentImpl.java:760)
      	at org.apache.felix.dm.impl.ComponentImpl.bindService(ComponentImpl.java:705)
      	at org.apache.felix.dm.impl.ComponentImpl.access$400(ComponentImpl.java:54)
      	at org.apache.felix.dm.impl.ComponentImpl$7.run(ComponentImpl.java:202)
      	at org.apache.felix.dm.impl.SerialExecutor.runTask(SerialExecutor.java:137)
      	at org.apache.felix.dm.impl.SerialExecutor.runTasks(SerialExecutor.java:119)
      	at org.apache.felix.dm.impl.SerialExecutor.execute(SerialExecutor.java:85)
      	at org.apache.felix.dm.impl.ComponentImpl.calculateStateChanges(ComponentImpl.java:252)
      	at org.apache.felix.dm.impl.ComponentImpl.start(ComponentImpl.java:440)
      	at org.apache.felix.dm.DependencyManager.add(DependencyManager.java:167)
      	at com.liferay.portal.spring.extender.internal.context.ModuleApplicationContextExtender$ModuleApplicationContextExtension.start(ModuleApplicationContextExtender.java:228)
      	at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
      	at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
      	at org.apache.felix.utils.extender.AbstractExtender.addingBundle(AbstractExtender.java:192)
      	at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
      	at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:1)
      	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
      	at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
      	at org.osgi.util.tracker.BundleTracker.open(BundleTracker.java:156)
      	at org.apache.felix.utils.extender.AbstractExtender.startTracking(AbstractExtender.java:150)
      	at org.apache.felix.utils.extender.AbstractExtender.doStart(AbstractExtender.java:142)
      	at org.apache.felix.utils.extender.AbstractExtender.start(AbstractExtender.java:114)
      	at com.liferay.portal.spring.extender.internal.context.ModuleApplicationContextExtender.activate(ModuleApplicationContextExtender.java:71)
      	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.ActivateMethod.invoke(ActivateMethod.java:302)
      	at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:294)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:297)
      	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.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:482)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1001)
      	at com.liferay.registry.internal.RegistryImpl.registerService(RegistryImpl.java:355)
      	at com.liferay.portal.servlet.MainServlet.registerPortalInitialized(MainServlet.java:1366)
      	at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:428)
      	at javax.servlet.GenericServlet.init(GenericServlet.java:158)
      	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1238)
      	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1151)
      	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1038)
      	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4997)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5289)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
      	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:585)
      	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1794)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.lang.NullPointerException
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:97)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:129)
      	at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands$UpgradeInfosRunnable.run(ReleaseManagerOSGiCommands.java:539)
      	... 153 more
      Caused by: java.lang.NullPointerException
      	at com.liferay.portal.kernel.util.StringUtil._read(StringUtil.java:5215)
      	at com.liferay.portal.kernel.util.StringUtil.read(StringUtil.java:2324)
      	at com.liferay.content.targeting.report.campaign.tracking.action.internal.upgrade.v1_0_1.UpgradeSchema.doUpgrade(UpgradeSchema.java:29)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:92)
      	... 155 more
      

       

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Packages

                  Version Package
                  2.2.0