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

NoSuchRoleException upgraded partitioned database from 7.4 EP2

Description

    Steps to Reproduce:

    1. Start 7.4 DXP EP2 bundle connected to MySQL with "database.partition.enabled=true"
    2. Create 2 virtual instances
    3. Login to both instances
    4. Shutdown DXP
    5. Execute upgrade to master

    Expected Result:
    Upgrade can be completed on partitioned database.

    Actual Result:
    Upgrade fails to complete

    INFO  [main][VerifyProcess:91] Completed verification process com.liferay.portal.verify.VerifyResourcePermissions in 17 ms
    com.liferay.portal.verify.VerifyException: com.liferay.portal.kernel.exception.NoSuchRoleException: No Role exists with the key {companyId=41169, name=Owner}
            at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:85)
            at com.liferay.portal.tools.DBUpgrader.verify(DBUpgrader.java:191)
            at com.liferay.portal.tools.DBUpgrader._upgradePortal(DBUpgrader.java:433)
            at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:170)
            at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:162)
            at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:136)
            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:54)
    Caused by: com.liferay.portal.kernel.exception.NoSuchRoleException: No Role exists with the key {companyId=41169, name=Owner}
            at com.liferay.portal.service.persistence.impl.RolePersistenceImpl.findByC_N(RolePersistenceImpl.java:5767)
            at com.liferay.portal.service.impl.RoleLocalServiceImpl.getRole(RoleLocalServiceImpl.java:889)
            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.$Proxy189.getRole(Unknown Source)
            at com.liferay.portal.kernel.service.RoleLocalServiceUtil.getRole(RoleLocalServiceUtil.java:587)
            at com.liferay.portal.verify.VerifyResourcePermissions.verify(VerifyResourcePermissions.java:59)
            at com.liferay.portal.verify.VerifyResourcePermissions.doVerify(VerifyResourcePermissions.java:90)
            at com.liferay.portal.verify.VerifyProcess.lambda$verify$0(VerifyProcess.java:81)
            at com.liferay.portal.db.partition.DBPartitionUtil.forEachCompanyId(DBPartitionUtil.java:119)
            at com.liferay.portal.dao.db.BaseDB.process(BaseDB.java:307)
            at com.liferay.portal.kernel.dao.db.BaseDBProcess.process(BaseDBProcess.java:228)
            at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:68)
            ... 10 more

    SQL dumps attached for each schema from 7.4 DXP EP2

    Attachments

      1. lpartition_41169.sql
        2.15 MB
        Victor Ware
      2. lpartition_43375.sql
        2.15 MB
        Victor Ware
      3. lportal.sql
        2.77 MB
        Victor Ware

      Issue Links

        Activity

          People

            victor.ware Victor Ware
            victor.ware Victor Ware
            Kiyoshi Lee Kiyoshi Lee
            Alberto Chaparro Alberto Chaparro
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              1 year, 18 weeks, 6 days ago

              Packages

                Version Package
                7.0.0 DXP FP102
                7.0.10.16 DXP SP17
                7.0.X
                7.1.10 DXP FP25
                7.1.X
                7.2.10 DXP FP15
                7.2.X
                7.3.10.3 DXP SP3
                7.3.X
                7.4.2 CE GA3 DXP 7,4
                7.4.13 DXP GA1
                Master