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

VerifyProcesses from a physically partitioned database (sharding enabled) will fail after an upgrade

    Details

      Description

      Reproduced on:
      MySQL 3 Shards + Instances created
      ee-6.2.10 > ee-7.0.x GIT ID: 2dc4b5a01d974207c825416a926b440f74c6648d.

      Not Reproducible on:
      MySQL 3 Shards without Instance configuration
      ee-6.2.10 > ee-7.0.x GIT ID: 2dc4b5a01d974207c825416a926b440f74c6648d.

      Steps to Reproduce:

      1. Download attached database dump
      2. Create 3 databases in MySQL (70x, 70x1, 70x2)
      3. Import 3 dumps into databases
      4. Copy over attached data folder to 7.0 bundle
      5. Configure portal-upgrade-database.properties for sharded databases
        jdbc.default.driverClassName=com.mysql.jdbc.Driver
        jdbc.default.url=jdbc:mysql://172.16.71.138:3306/70x?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
        jdbc.default.username=root
        jdbc.default.password=
        
        jdbc.one.driverClassName=com.mysql.jdbc.Driver
        jdbc.one.url=jdbc:mysql://172.16.71.138:3306/70x1?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
        jdbc.one.username=root
        jdbc.one.password=
        
        jdbc.two.driverClassName=com.mysql.jdbc.Driver
        jdbc.two.url=jdbc:mysql://172.16.71.138:3306/70x2?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
        jdbc.two.username=root
        jdbc.two.password=
        
      6. Set index property
        1. File: osgi/configs/com.liferay.portal.search.configuration.IndexStatusManagerConfiguration.cfg
        2. Property: indexReadOnly=false
      7. Run upgrade
        java -jar com.liferay.portal.tools.db.upgrade.client.jar

      Expected Result:
      Upgrade completes without error.

      Actual Result:
      Upgrade fails with error:

      18:08:32,626 ERROR [main][DBUpgrader:114] Unable to execute verify process: com.liferay.portal.verify.VerifyException: com.liferay.portal.kernel.exception.NoSuchRoleException: No Role exists with the key {companyId=21025, name=Power User}
      com.liferay.portal.verify.VerifyException: com.liferay.portal.verify.VerifyException: com.liferay.portal.kernel.exception.NoSuchRoleException: No Role exists with the key {companyId=21025, name=Power User}
      	at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:73)
      	at com.liferay.portal.verify.VerifyProcessUtil._verifyProcess(VerifyProcessUtil.java:113)
      	at com.liferay.portal.verify.VerifyProcessUtil._verifyProcess(VerifyProcessUtil.java:78)
      	at com.liferay.portal.verify.VerifyProcessUtil.verifyProcess(VerifyProcessUtil.java:47)
      	at com.liferay.portal.events.StartupHelper.verifyProcess(StartupHelper.java:175)
      	at com.liferay.portal.events.StartupHelperUtil.verifyProcess(StartupHelperUtil.java:87)
      	at com.liferay.portal.tools.DBUpgrader.verify(DBUpgrader.java:252)
      	at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:97)
      Caused by: com.liferay.portal.verify.VerifyException: com.liferay.portal.kernel.exception.NoSuchRoleException: No Role exists with the key {companyId=21025, name=Power User}
      	at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:73)
      	at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:88)
      	at com.liferay.portal.verify.VerifyProcessSuite.doVerify(VerifyProcessSuite.java:33)
      	at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:70)
      	... 7 more
      Caused by: com.liferay.portal.kernel.exception.NoSuchRoleException: No Role exists with the key {companyId=21025, name=Power User}
      	at com.liferay.portal.service.persistence.impl.RolePersistenceImpl.findByC_N(RolePersistenceImpl.java:5639)
      	at com.liferay.portal.service.impl.RoleLocalServiceImpl.loadGetRole(RoleLocalServiceImpl.java:1144)
      	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.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
      	at com.sun.proxy.$Proxy76.loadGetRole(Unknown Source)
      	at com.liferay.portal.service.impl.RoleLocalServiceImpl.getRole(RoleLocalServiceImpl.java:755)
      	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.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
      	at com.sun.proxy.$Proxy76.getRole(Unknown Source)
      	at com.liferay.portal.kernel.service.RoleLocalServiceUtil.getRole(RoleLocalServiceUtil.java:275)
      	at com.liferay.portal.verify.VerifyPermission.fixUserDefaultRolePermissionsMySQL(VerifyPermission.java:278)
      	at com.liferay.portal.verify.VerifyPermission.fixUserDefaultRolePermissions(VerifyPermission.java:222)
      	at com.liferay.portal.verify.VerifyPermission.doVerify(VerifyPermission.java:135)
      	at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:70)
      	... 10 more
      com.liferay.portal.verify.VerifyException: com.liferay.portal.verify.VerifyException: com.liferay.portal.kernel.exception.NoSuchRoleException: No Role exists with the key {companyId=21025, name=Power User}
      	at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:73)
      	at com.liferay.portal.verify.VerifyProcessUtil._verifyProcess(VerifyProcessUtil.java:113)
      	at com.liferay.portal.verify.VerifyProcessUtil._verifyProcess(VerifyProcessUtil.java:78)
      	at com.liferay.portal.verify.VerifyProcessUtil.verifyProcess(VerifyProcessUtil.java:47)
      	at com.liferay.portal.events.StartupHelper.verifyProcess(StartupHelper.java:175)
      	at com.liferay.portal.events.StartupHelperUtil.verifyProcess(StartupHelperUtil.java:87)
      	at com.liferay.portal.tools.DBUpgrader.verify(DBUpgrader.java:252)
      	at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:97)
      Caused by: com.liferay.portal.verify.VerifyException: com.liferay.portal.kernel.exception.NoSuchRoleException: No Role exists with the key {companyId=21025, name=Power User}
      	at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:73)
      	at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:88)
      	at com.liferay.portal.verify.VerifyProcessSuite.doVerify(VerifyProcessSuite.java:33)
      	at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:70)
      	... 7 more
      Caused by: com.liferay.portal.kernel.exception.NoSuchRoleException: No Role exists with the key {companyId=21025, name=Power User}
      	at com.liferay.portal.service.persistence.impl.RolePersistenceImpl.findByC_N(RolePersistenceImpl.java:5639)
      	at com.liferay.portal.service.impl.RoleLocalServiceImpl.loadGetRole(RoleLocalServiceImpl.java:1144)
      	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.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
      	at com.sun.proxy.$Proxy76.loadGetRole(Unknown Source)
      	at com.liferay.portal.service.impl.RoleLocalServiceImpl.getRole(RoleLocalServiceImpl.java:755)
      	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.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
      	at com.sun.proxy.$Proxy76.getRole(Unknown Source)
      	at com.liferay.portal.kernel.service.RoleLocalServiceUtil.getRole(RoleLocalServiceUtil.java:275)
      	at com.liferay.portal.verify.VerifyPermission.fixUserDefaultRolePermissionsMySQL(VerifyPermission.java:278)
      	at com.liferay.portal.verify.VerifyPermission.fixUserDefaultRolePermissions(VerifyPermission.java:222)
      	at com.liferay.portal.verify.VerifyPermission.doVerify(VerifyPermission.java:135)
      	at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:70)
      	... 10 more
      

      This does not occur if sharding is enabled but instances are not configured by the user. But it is probably not a real use case to have no instances.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 13 weeks, 4 days ago

                  Packages

                  Version Package
                  7.0.1 CE GA2