PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-46141

UpgradePermission fails because checkSystemRoles requires Role ResourceActions to be loaded

    Details

    • Branch Version/s:
      6.2.x
    • Backported to Branch:
      Committed
    • Fix Priority:
      3
    • Similar Issues:
      Show 5 results 

      Description

      Upgrading from 6.0.6 to master fails due to UpgradePermissions performs a checkSystemRoles operation, which (because of LPS-45731) adds resources to system roles. Those resources can't be added at that point during an upgrade process as resource actions haven't been checked yet.

      You get the following exception:

      15:20:53,133 INFO  [localhost-startStop-1][UpgradeProcess:164] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradePermission
      15:20:53,422 ERROR [localhost-startStop-1][JDBCExceptionReporter:82] Unknown column 'Role_.uuid_' in 'field list'
      15:20:53,777 ERROR [localhost-startStop-1][MainServlet:206] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.NoSuchResourceActionException: com.liferay.portal.model.Role#VIEW
      com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.NoSuchResourceActionException: com.liferay.portal.model.Role#VIEW
              at com.liferay.portal.events.StartupAction.run(StartupAction.java:75)
              at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1237)
              at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:203)
              at javax.servlet.GenericServlet.init(GenericServlet.java:160)
              at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
              at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
              at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176)
              at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
              at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:656)
              at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1635)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
              at java.util.concurrent.FutureTask.run(FutureTask.java:138)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
              at java.lang.Thread.run(Thread.java:662)
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.NoSuchResourceActionException: com.liferay.portal.model.Role#VIEW
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:170)
              at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:167)
              at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:119)
              at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:99)
              at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:148)
              at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:73)
              at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:138)
              at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:145)
              at com.liferay.portal.events.StartupAction.run(StartupAction.java:69)
              ... 20 more
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.NoSuchResourceActionException: com.liferay.portal.model.Role#VIEW
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:170)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:184)
              at com.liferay.portal.upgrade.UpgradeProcess_6_1_0.doUpgrade(UpgradeProcess_6_1_0.java:74)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:167)
              ... 28 more
      Caused by: com.liferay.portal.NoSuchResourceActionException: com.liferay.portal.model.Role#VIEW
              at com.liferay.portal.service.impl.ResourceActionLocalServiceImpl.getResourceAction(ResourceActionLocalServiceImpl.java:196)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
              at com.sun.proxy.$Proxy20.getResourceAction(Unknown Source)
              at com.liferay.portal.service.impl.ResourcePermissionLocalServiceImpl.doUpdateResourcePermission(ResourcePermissionLocalServiceImpl.java:1192)
              at com.liferay.portal.service.impl.ResourcePermissionLocalServiceImpl.updateResourcePermission(ResourcePermissionLocalServiceImpl.java:1314)
              at com.liferay.portal.service.impl.ResourcePermissionLocalServiceImpl.setResourcePermissions(ResourcePermissionLocalServiceImpl.java:1078)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
              at com.sun.proxy.$Proxy18.setResourcePermissions(Unknown Source)
              at com.liferay.portal.service.impl.RoleLocalServiceImpl.checkSystemRoles(RoleLocalServiceImpl.java:421)
              at com.liferay.portal.service.impl.RoleLocalServiceImpl.checkSystemRoles(RoleLocalServiceImpl.java:309)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
              at com.sun.proxy.$Proxy21.checkSystemRoles(Unknown Source)
              at com.liferay.portal.service.RoleLocalServiceUtil.checkSystemRoles(RoleLocalServiceUtil.java:708)
              at com.liferay.portal.upgrade.v6_1_0.UpgradePermission.doUpgrade(UpgradePermission.java:144)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:167)
              ... 31 more
      Stopping the server due to unexpected startup errors
      
      

        Issue Links

          Activity

          Hide
          John Co (Inactive) added a comment -

          PASSED Manual Testing using the following steps:
          1. Upgrade 6.0.6 to master
          2. Assert no exceptions

          Fixed on:
          Tomcat 7.0.42 + MySQL 5. Portal master GIT ID: 5b3eaf88695869e70d0ab3b7e00cca2125bda6d7.

          Roles uuid exception is not present during upgrade.

          Show
          John Co (Inactive) added a comment - PASSED Manual Testing using the following steps: 1. Upgrade 6.0.6 to master 2. Assert no exceptions Fixed on: Tomcat 7.0.42 + MySQL 5. Portal master GIT ID: 5b3eaf88695869e70d0ab3b7e00cca2125bda6d7. Roles uuid exception is not present during upgrade.
          Hide
          John Co (Inactive) added a comment -

          PASSED Manual Testing using the following steps:

          1. Upgrade 6.0.6 to ee-6.2.x
          2. Assert no exceptions

          Fixed on:
          Tomcat 7.0.42 + MySQL 5.5. Portal ee-6.2.x GIT ID: 95315c9bb42ba818a70144417323a15225f527c4.

          17:01:27,288 INFO  [localhost-startStop-1][UpgradeProcess:164] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradePermission
          17:01:27,351 ERROR [localhost-startStop-1][JDBCExceptionReporter:82] Unknown column 'Role_.uuid_' in 'field list'
          17:01:28,157 INFO  [localhost-startStop-1][UpgradeProcess:164] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradePortletPreferences
          17:01:28,171 INFO  [localhost-startStop-1][UpgradeProcess:164] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeCommunityProperties
          17:01:28,201 INFO  [localhost-startStop-1][UpgradeProcess:164] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeResourcePermission
          
          Show
          John Co (Inactive) added a comment - PASSED Manual Testing using the following steps: Upgrade 6.0.6 to ee-6.2.x Assert no exceptions Fixed on: Tomcat 7.0.42 + MySQL 5.5. Portal ee-6.2.x GIT ID: 95315c9bb42ba818a70144417323a15225f527c4. 17:01:27,288 INFO [localhost-startStop-1][UpgradeProcess:164] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradePermission 17:01:27,351 ERROR [localhost-startStop-1][JDBCExceptionReporter:82] Unknown column 'Role_.uuid_' in 'field list' 17:01:28,157 INFO [localhost-startStop-1][UpgradeProcess:164] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradePortletPreferences 17:01:28,171 INFO [localhost-startStop-1][UpgradeProcess:164] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeCommunityProperties 17:01:28,201 INFO [localhost-startStop-1][UpgradeProcess:164] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeResourcePermission

            People

            • Assignee:
              John Co (Inactive)
              Reporter:
              Daniel Sanz
              Recent user:
              Alberto Chaparro
              Participants of an Issue:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 5 weeks, 2 days ago

                Development

                  Subcomponents

                    Structure Helper Panel