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

JournalArticle and Calendar subscriptions missing groupId

    Details

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

      Description

      Issue
      GroupId is missing for Journal Article and Calendar subscriptions

      Steps to Reproduce for Journal Article

      1. Startup in Liferay Portal 6.2.x
      2. Sign in as test@liferay.com
      3. Add a new Web Content Article
      4. Render the new Web Content Article on the Welcome page via the Web Content Display portlet
      5. Configure the Web Content Display portlet so that comment subscriptions are enabled
      6. Subscribe to the comments
      7. Check the subscription table and assert that there is a record created with a classNameId that corresponds to com.liferay.portlet.journal.model.JournalArticle(cross reference the classNameId with the one in the ClassName_ table)
      8. Remove the Web Content Display portlet from the page, and assert that the subscription table still contains the row created above.
      9. Shut down the server
      10. Upgrade to Master

      Steps to Reproduce for Calendar

      1. Startup in Liferay Portal 6.2.x
      2. Sign in as test@liferay.com
      3. Deploy the calendar portlet on a page
      4. Open the calendar settings: Click on the arrow that is in the right of "Liferay" calendar => Click on "Calendar Settings"
      5. Check "Enable Comments" option
      6. Create an Event in the Liferay calendar
      7. Click on the Event and open "View Details"
      8. Click on "Subscribe to Comments"
      9. Check the subscription table and assert that there is a record created with a classNameId that corresponds to com.liferay.calendar.model.CalendarBooking(cross reference the classNameId with the one in the ClassName_ table)
      10. Shut down the server
      11. Upgrade to Master

      Actual Result
      Upgrade process fails due to the following error

      2020-10-27 07:31:34.065 INFO  [main][UpgradeProcess:107] Failed upgrade process com.liferay.comment.upgrade.UpgradeDiscussionSubscriptionClassName in 10 ms
      2020-10-27 07:31:34.072 ERROR [main][ReleaseManagerOSGiCommands:93] bundle com.liferay.portal.upgrade.impl:3.0.19 (393)[com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands(700)] : The activate method has thrown an exception 
      com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the primary key 0
       at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:101)
       at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:137)
       at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor$UpgradeInfosRunnable.run(UpgradeExecutor.java:200)
       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:155)
       at com.liferay.portal.upgrade.internal.executor.UpgradeExecutor.execute(UpgradeExecutor.java:118)
       at com.liferay.portal.upgrade.internal.release.osgi.commands.ReleaseManagerOSGiCommands.activate(ReleaseManagerOSGiCommands.java:287)
       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.invoke(BaseMethod.java:510)
       at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:317)
       at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:307)
       at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:341)
       at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:114)
       at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:983)
       at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:956)
       at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:756)
       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)
       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.register(ServiceRegistrationImpl.java:127)
       at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
       at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469)
       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)
       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.register(ServiceRegistrationImpl.java:127)
       at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
       at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469)
       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)
       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.register(ServiceRegistrationImpl.java:127)
       at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
       at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469)
       at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:487)
       at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1004)
       at com.liferay.registry.internal.RegistryImpl.registerService(RegistryImpl.java:374)
       at com.liferay.portal.tools.DBUpgrader._registerModuleServiceLifecycle(DBUpgrader.java:435)
       at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:117)
       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 com.liferay.portal.tools.db.upgrade.client.DBUpgraderLauncher.main(DBUpgraderLauncher.java:55)
      Caused by: com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the primary key 0
       at com.liferay.portal.service.persistence.impl.GroupPersistenceImpl.findByPrimaryKey(GroupPersistenceImpl.java:13329)
       at com.liferay.portal.service.persistence.impl.GroupPersistenceImpl.findByPrimaryKey(GroupPersistenceImpl.java:13345)
       at com.liferay.portal.service.impl.GroupLocalServiceImpl.getGroup(GroupLocalServiceImpl.java:1603)
       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 com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
       at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69)
       at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
       at com.liferay.portal.cache.thread.local.ThreadLocalCacheAdvice.invoke(ThreadLocalCacheAdvice.java:69)
       at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
       at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
       at com.sun.proxy.$Proxy125.getGroup(Unknown Source)
       at com.liferay.portlet.asset.service.impl.AssetEntryLocalServiceImpl.updateEntry(AssetEntryLocalServiceImpl.java:764)
       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 com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
       at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69)
       at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57)
       at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
       at com.sun.proxy.$Proxy127.updateEntry(Unknown Source)
       at com.liferay.comment.upgrade.UpgradeDiscussionSubscriptionClassName.lambda$_updateSubscriptions$3(UpgradeDiscussionSubscriptionClassName.java:129)
       at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery.performAction(DefaultActionableDynamicQuery.java:394)
       at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery$1.call(DefaultActionableDynamicQuery.java:306)
       at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery$1.call(DefaultActionableDynamicQuery.java:268)
       at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery.doPerformActions(DefaultActionableDynamicQuery.java:326)
       at com.liferay.portal.kernel.dao.orm.DefaultActionableDynamicQuery.performActions(DefaultActionableDynamicQuery.java:86)
       at com.liferay.comment.upgrade.UpgradeDiscussionSubscriptionClassName._updateSubscriptions(UpgradeDiscussionSubscriptionClassName.java:140)
       at com.liferay.comment.upgrade.UpgradeDiscussionSubscriptionClassName.doUpgrade(UpgradeDiscussionSubscriptionClassName.java:85)
       at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:96)
       ... 84 more

      Reproduced in

      • Master: fc92511c4f2d4aadfcc30af70f7d09c429a05784

        Attachments

          Activity

            People

            Assignee:
            summer.zhang Summer Zhang
            Reporter:
            samuel.ziemer Sam Ziemer
            Participants of an Issue:
            Recent user:
            Yunlin "Steven" Sun
            Engineering Assignee:
            Sam Ziemer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              17 weeks, 5 days ago

                Packages

                Version Package
                7.0.0 DXP FP97
                7.0.X
                7.1.10 DXP FP20
                7.1.10.5 SP5
                7.1.X
                7.2.X
                7.3.X
                Master