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

Fail to upgrade when adding a page template name with '='

    Details

      Description

      1. Start a 7.1 bundle
      2. Go to Build > Pages >Page Templates
      3. Add a collection
      4. Add a Content Page Template with following name and publish
        1=1
      5. Upgrade to master using upgrade tool

      Actual result:
      NoSuchLayoutPrototypeException during upgrading in upgrade tool.

      2022-02-17 11:31:03.682 INFO  [Portal Dependency Manager Component Executor--2][UpgradeProcess:119] Upgrading com.liferay.layout.page.template.internal.upgrade.v3_3_1.LayoutPageTemplateEntryUpgradeProcess
      2022-02-17 11:31:03.690 INFO  [Portal Dependency Manager Component Executor--2][UpgradeProcess:134] Failed upgrade process com.liferay.layout.page.template.internal.upgrade.v3_3_1.LayoutPageTemplateEntryUpgradeProcess in 8 ms
      2022-02-17 11:31:03.704 ERROR [Portal Dependency Manager Component Executor--2][UpgradeStepRegistratorTracker:221] Failed upgrade process for module com.liferay.layout.page.template.service
      com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.exception.NoSuchLayoutPrototypeException: No LayoutPrototype exists with the primary key 0
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:128) ~[portal-kernel.jar:?]
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:146) ~[portal-kernel.jar:?]
              at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor$UpgradeInfosRunnable.run(UpgradeExecutor.java:230) ~[?:?]
              at com.liferay.portal.output.stream.container.internal.OutputStreamContainerFactoryTrackerImpl.runWithSwappedLog(OutputStreamContainerFactoryTrackerImpl.java:134) ~[?:?]
              at com.liferay.portal.upgrade.internal.executor.SwappedLogExecutor.execute(SwappedLogExecutor.java:51) ~[?:?]
              at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor.executeUpgradeInfos(UpgradeExecutor.java:158) ~[?:?]
              at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor.execute(UpgradeExecutor.java:118) ~[?:?]
              at com.liferay.portal.upgrade.internal.registry.UpgradeStepRegistratorTracker$UpgradeStepRegistratorServiceTrackerCustomizer.addingService(UpgradeStepRegistratorTracker.java:214) ~[?:?]
              at com.liferay.portal.upgrade.internal.registry.UpgradeStepRegistratorTracker$UpgradeStepRegistratorServiceTrackerCustomizer.addingService(UpgradeStepRegistratorTracker.java:147) ~[?:?]
              at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:943) ~[org.eclipse.osgi.jar:?]
              at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1) ~[org.eclipse.osgi.jar:?]
              at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) ~[org.eclipse.osgi.jar:?]
              at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) ~[org.eclipse.osgi.jar:?]
              at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:903) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469) ~[org.eclipse.osgi.jar:?]
              at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:906) ~[?:?]
              at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:892) ~[?:?]
              at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) ~[?:?]
              at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:959) ~[?:?]
              at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:732) ~[?:?]
              at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1053) ~[?:?]
              at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1007) ~[?:?]
              at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216) ~[?:?]
              at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137) ~[?:?]
              at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944) ~[?:?]
              at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880) ~[?:?]
              at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168) ~[?:?]
              at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125) ~[?:?]
              at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469) ~[org.eclipse.osgi.jar:?]
              at com.liferay.portal.aop.internal.AopServiceRegistrar.register(AopServiceRegistrar.java:84) ~[?:?]
              at com.liferay.portal.aop.internal.AopServiceResolver.addAopServiceRegistrar(AopServiceResolver.java:38) ~[?:?]
              at com.liferay.portal.aop.internal.AopServiceManager$AopServiceServiceTrackerCustomizer.addingService(AopServiceManager.java:124) ~[?:?]
              at com.liferay.portal.aop.internal.AopServiceManager$AopServiceServiceTrackerCustomizer.addingService(AopServiceManager.java:96) ~[?:?]
              at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:943) ~[org.eclipse.osgi.jar:?]
              at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1) ~[org.eclipse.osgi.jar:?]
              at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) ~[org.eclipse.osgi.jar:?]
              at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) ~[org.eclipse.osgi.jar:?]
              at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:903) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469) ~[org.eclipse.osgi.jar:?]
              at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:906) ~[?:?]
              at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:892) ~[?:?]
              at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) ~[?:?]
              at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:959) ~[?:?]
              at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:732) ~[?:?]
              at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1053) ~[?:?]
              at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1007) ~[?:?]
              at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216) ~[?:?]
              at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137) ~[?:?]
              at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944) ~[?:?]
              at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880) ~[?:?]
              at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168) ~[?:?]
              at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125) ~[?:?]
              at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469) ~[org.eclipse.osgi.jar:?]
              at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:906) ~[?:?]
              at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:892) ~[?:?]
              at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) ~[?:?]
              at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:959) ~[?:?]
              at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:732) ~[?:?]
              at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1053) ~[?:?]
              at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1007) ~[?:?]
              at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216) ~[?:?]
              at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137) ~[?:?]
              at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944) ~[?:?]
              at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880) ~[?:?]
              at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168) ~[?:?]
              at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125) ~[?:?]
              at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:487) ~[org.eclipse.osgi.jar:?]
              at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1004) ~[org.eclipse.osgi.jar:?]
              at com.liferay.portal.spring.extender.internal.configuration.ServiceConfigurationInitializer.start(ServiceConfigurationInitializer.java:68) ~[?:?]
              at sun.reflect.GeneratedMethodAccessor144.invoke(Unknown Source) ~[?:?]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_301]
              at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_301]
              at org.apache.felix.dm.impl.InvocationUtil.invokeMethod(InvocationUtil.java:157) ~[bundleFile:?]
              at org.apache.felix.dm.impl.InvocationUtil.invokeCallbackMethod(InvocationUtil.java:112) ~[bundleFile:?]
              at org.apache.felix.dm.impl.ComponentImpl.invokeCallbackMethod(ComponentImpl.java:638) ~[bundleFile:?]
              at org.apache.felix.dm.impl.ComponentImpl.invoke(ComponentImpl.java:1783) ~[bundleFile:?]
              at org.apache.felix.dm.impl.ComponentImpl.invokeStart(ComponentImpl.java:1281) ~[bundleFile:?]
              at org.apache.felix.dm.impl.ComponentImpl.performTransition(ComponentImpl.java:1232) ~[bundleFile:?]
              at org.apache.felix.dm.impl.ComponentImpl.handleChange(ComponentImpl.java:1166) ~[bundleFile:?]
              at org.apache.felix.dm.impl.ComponentImpl.handleAdded(ComponentImpl.java:1337) ~[bundleFile:?]
              at org.apache.felix.dm.impl.ComponentImpl.lambda$handleEvent$6(ComponentImpl.java:565) ~[bundleFile:?]
              at org.apache.felix.dm.impl.DispatchExecutor.runTask(DispatchExecutor.java:182) [bundleFile:?]
              at org.apache.felix.dm.impl.DispatchExecutor.run(DispatchExecutor.java:165) [bundleFile:?]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_301]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_301]
              at java.lang.Thread.run(Thread.java:748) [?:1.8.0_301]
      Caused by: com.liferay.portal.kernel.exception.NoSuchLayoutPrototypeException: No LayoutPrototype exists with the primary key 0
              at com.liferay.portal.service.persistence.impl.LayoutPrototypePersistenceImpl.findByPrimaryKey(LayoutPrototypePersistenceImpl.java:4217) ~[portal-impl.jar:?]
              at com.liferay.portal.service.persistence.impl.LayoutPrototypePersistenceImpl.findByPrimaryKey(LayoutPrototypePersistenceImpl.java:4235) ~[portal-impl.jar:?]
              at com.liferay.portal.service.base.LayoutPrototypeLocalServiceBaseImpl.getLayoutPrototype(LayoutPrototypeLocalServiceBaseImpl.java:280) ~[portal-impl.jar:?]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_301]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_301]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_301]
              at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_301]
              at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50) ~[portal-impl.jar:?]
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69) ~[portal-impl.jar:?]
              at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57) ~[portal-impl.jar:?]
              at com.liferay.change.tracking.internal.aop.CTTransactionAdvice.invoke(CTTransactionAdvice.java:80) ~[?:?]
              at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57) ~[portal-impl.jar:?]
              at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49) ~[portal-impl.jar:?]
              at com.sun.proxy.$Proxy182.getLayoutPrototype(Unknown Source) ~[?:?]
              at com.liferay.layout.page.template.internal.upgrade.v3_3_1.LayoutPageTemplateEntryUpgradeProcess._updateLayoutPrototypeName(LayoutPageTemplateEntryUpgradeProcess.java:124) ~[?:?]
              at com.liferay.layout.page.template.internal.upgrade.v3_3_1.LayoutPageTemplateEntryUpgradeProcess._upgradeLayoutPageTemplateEntryNameAndKey(LayoutPageTemplateEntryUpgradeProcess.java:188) ~[?:?]
              at com.liferay.layout.page.template.internal.upgrade.v3_3_1.LayoutPageTemplateEntryUpgradeProcess.doUpgrade(LayoutPageTemplateEntryUpgradeProcess.java:54) ~[?:?]
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.lambda$upgrade$0(UpgradeProcess.java:122) ~[portal-kernel.jar:?]
              at com.liferay.portal.db.partition.DBPartitionUtil.forEachCompanyId(DBPartitionUtil.java:113) ~[portal-impl.jar:?]
              at com.liferay.portal.dao.db.BaseDB.process(BaseDB.java:339) ~[portal-impl.jar:?]
              at com.liferay.portal.kernel.dao.db.BaseDBProcess.process(BaseDBProcess.java:244) ~[portal-kernel.jar:?]
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:109) ~[portal-kernel.jar:?]
              ... 111 more

      Expected result:
      No error during upgrading in upgrade tool.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lu.liu Lu Liu
              Reporter:
              lu.liu Lu Liu
              Participants of an Issue:
              Recent user:
              Clarissa Velazquez
              Engineering Assignee:
              Jonathan McCann
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                23 weeks, 6 days ago

                  Packages

                  Version Package
                  7.4.3.14 CE GA14
                  Master