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

RoleLocalService.checkSystemRoles(long) does not work properly in sharding environments

    Details

    • Branch Version/s:
      6.1.x, 6.0.x
    • Backported to Branch:
      Committed
    • Similar Issues:
      Show 3 results 

      Description

      If sharding is configured and the property verify.frequency is set to -1 (ALWAYS) Liferay duplicates the roles from non default shard in the the default shard database leading to constraint violation.

      08:40:49,245 ERROR [pool-2-thread-1][JDBCExceptionReporter:76] Duplicate entry '10345-Organization User' for key 'IX_EBC931B8'
      08:40:49,252 ERROR [pool-2-thread-1][PortalInstances:375] java.lang.reflect.UndeclaredThrowableException
      java.lang.reflect.UndeclaredThrowableException
      	at $Proxy163.checkCompany(Unknown Source)
      	at com.liferay.portal.service.CompanyLocalServiceUtil.checkCompany(CompanyLocalServiceUtil.java:308)
      	at com.liferay.portal.util.PortalInstances._initCompany(PortalInstances.java:370)
      	at com.liferay.portal.util.PortalInstances.initCompany(PortalInstances.java:92)
      	at com.liferay.portal.servlet.MainServlet.initCompanies(MainServlet.java:798)
      	at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:355)
      	at javax.servlet.GenericServlet.init(GenericServlet.java:160)
      	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
      	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
      	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
      	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
      	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1099)
      	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1621)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      	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:886)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	at java.lang.Thread.run(Thread.java:680)
      Caused by: java.lang.reflect.InvocationTargetException
      	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.dao.shard.advice.ShardCompanyAdvice.invoke(ShardCompanyAdvice.java:104)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
      	... 24 more
      Caused by: java.lang.reflect.UndeclaredThrowableException
      	at $Proxy163.checkCompany(Unknown Source)
      	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:122)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
      	at $Proxy164.checkCompany(Unknown Source)
      	at com.liferay.portal.service.impl.CompanyLocalServiceImpl.checkCompany(CompanyLocalServiceImpl.java:157)
      	... 33 more
      Caused by: java.lang.reflect.InvocationTargetException
      	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.dao.shard.advice.ShardCompanyAdvice.invoke(ShardCompanyAdvice.java:104)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      	... 44 more
      Caused by: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
      	at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:193)
      	at com.liferay.portal.service.persistence.RolePersistenceImpl.updateImpl(RolePersistenceImpl.java:437)
      	at com.liferay.portal.service.persistence.RolePersistenceImpl.updateImpl(RolePersistenceImpl.java:1)
      	at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.update(BasePersistenceImpl.java:257)
      	at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:320)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      	at com.liferay.portal.dao.shard.advice.ShardPersistenceAdvice.invoke(ShardPersistenceAdvice.java:102)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      	at $Proxy60.update(Unknown Source)
      	at com.liferay.portal.service.base.RoleLocalServiceBaseImpl.updateRole(RoleLocalServiceBaseImpl.java:442)
      	at sun.reflect.GeneratedMethodAccessor154.invoke(Unknown Source)
      	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:122)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
      	at $Proxy252.updateRole(Unknown Source)
      	at com.liferay.portal.service.impl.RoleLocalServiceImpl.checkSystemRole(RoleLocalServiceImpl.java:1214)
      	at com.liferay.portal.service.impl.RoleLocalServiceImpl.checkSystemRoles(RoleLocalServiceImpl.java:269)
      	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:122)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:57)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:118)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
      	at $Proxy252.checkSystemRoles(Unknown Source)
      	at com.liferay.portal.service.impl.CompanyLocalServiceImpl.checkCompany(CompanyLocalServiceImpl.java:357)
      	... 53 more
      Caused by: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
      	at com.liferay.portal.dao.orm.hibernate.ExceptionTranslator.translate(ExceptionTranslator.java:30)
      	at com.liferay.portal.dao.orm.hibernate.SessionImpl.flush(SessionImpl.java:122)
      	at com.liferay.portal.kernel.dao.orm.ClassLoaderSession.flush(ClassLoaderSession.java:218)
      	at com.liferay.portal.service.persistence.BatchSessionImpl.update(BatchSessionImpl.java:95)
      	at com.liferay.portal.service.persistence.BatchSessionUtil.update(BatchSessionUtil.java:50)
      	at com.liferay.portal.service.persistence.RolePersistenceImpl.updateImpl(RolePersistenceImpl.java:432)
      	... 102 more
      Caused by: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
      	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)
      	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
      	at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
      	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)
      	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
      	at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
      	at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
      	at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
      	at com.liferay.portal.dao.orm.hibernate.SessionImpl.flush(SessionImpl.java:119)
      	... 106 more
      Caused by: java.sql.BatchUpdateException: Duplicate entry '10345-Organization User' for key 'IX_EBC931B8'
      	at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2054)
      	at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1467)
      	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)
      	at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
      	at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
      	... 112 more
      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '10345-Organization User' for key 'IX_EBC931B8'
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      	at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
      	at com.mysql.jdbc.Util.getInstance(Util.java:386)
      	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1040)
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)
      	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2468)
      	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629)
      	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2719)
      	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
      	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2450)
      	at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2006)
      	... 116 more
      

      To fix the problem you must add the following line at shard-data-source-spring.xml

      <aop:advisor advice-ref="com.liferay.portal.dao.shard.advice.ShardParameterAdvice" pointcut="execution(* com.liferay.portal.service.RoleLocalService.checkSystemRoles(long))" />

        Issue Links

          Activity

          Hide
          Michael Saechang added a comment -

          Committed on:
          Portal 6.2.x GIT ID: cf50df541985aaf902cd1be8ed585d7a9969f33c.

          Show
          Michael Saechang added a comment - Committed on: Portal 6.2.x GIT ID: cf50df541985aaf902cd1be8ed585d7a9969f33c.
          Hide
          Mark Jin added a comment -

          FAILED Manual Testing using the following steps:

          1. Configure a sharding environment with shards(Default,One,Two) in portal-ext.properties.
          2. Set portal-ext verify.frequency=-1.
          3. Go to Control Panel => Portal Instances.
          4. Add two instance which mapping to sharding (One,Two).
          5. Stop the server and restart.

          Reproduced on:
          Tomcat 7.0 + MySQL 5. Portal 6.1.20 EE GA2.

          Restart tomcat cause the error message in the description.

          Failed on:
          Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: cc2501b9b529235ec7261ebae63aba2cbbcc6b2d.
          Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: a3c1a29e70fcf688fda9548bbbbdf7573a464b17.

          Restart tomcat cause error message.

          06:35:22,046 ERROR [pool-2-thread-1][MainServlet:217] com.liferay.portal.kernel.events.ActionExcepti
          on: com.liferay.portal.verify.VerifyException: com.liferay.portal.verify.VerifyException: com.lifera
          y.portal.NoSuchUserException: No User exists with the key {companyId=10472, defaultUser=true}
          com.liferay.portal.kernel.events.ActionException: com.liferay.portal.verify.VerifyException: com.lif
          eray.portal.verify.VerifyException: com.liferay.portal.NoSuchUserException: No User exists with the
          key {companyId=10472, defaultUser=true}
                  at com.liferay.portal.events.StartupAction.run(StartupAction.java:59)
                  at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1306)
                  at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:214)
                  at javax.servlet.GenericServlet.init(GenericServlet.java:160)
                  at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
                  at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
                  at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
                  at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015)
                  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302)
                  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
                  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
                  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
                  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
                  at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
                  at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585)
                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
                  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:886)
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
                  at java.lang.Thread.run(Thread.java:662)
          Caused by: com.liferay.portal.verify.VerifyException: com.liferay.portal.verify.VerifyException: com
          .liferay.portal.NoSuchUserException: No User exists with the key {companyId=10472, defaultUser=true}
          
                  at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:61)
                  at com.liferay.portal.verify.VerifyProcessUtil._verifyProcess(VerifyProcessUtil.java:110)
                  at com.liferay.portal.verify.VerifyProcessUtil._verifyProcess(VerifyProcessUtil.java:76)
                  at com.liferay.portal.verify.VerifyProcessUtil.verifyProcess(VerifyProcessUtil.java:46)
                  at com.liferay.portal.events.StartupHelper.verifyProcess(StartupHelper.java:145)
                  at com.liferay.portal.events.StartupHelper$$FastClassByCGLIB$$d389986b.invoke(<generated>)
                  at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
                  at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cg
          lib2AopProxy.java:688)
                  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
          cation.java:150)
                  at com.liferay.portal.dao.shard.advice.ShardIterativelyAdvice.invoke(ShardIterativelyAdvice.
          java:49)
                  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
          cation.java:172)
                  at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationIn
          terceptor.java:90)
                  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
          cation.java:172)
                  at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cgli
          b2AopProxy.java:621)
                  at com.liferay.portal.events.StartupHelper$$EnhancerByCGLIB$$bec1a79e.verifyProcess(<generat
          ed>)
                  at com.liferay.portal.events.StartupHelperUtil.verifyProcess(StartupHelperUtil.java:65)
                  at com.liferay.portal.tools.DBUpgrader.verify(DBUpgrader.java:246)
                  at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:199)
                  at com.liferay.portal.events.StartupAction.run(StartupAction.java:53)
                  ... 20 more
          Caused by: com.liferay.portal.verify.VerifyException: com.liferay.portal.NoSuchUserException: No Use
          r exists with the key {companyId=10472, defaultUser=true}
                  at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:61)
                  at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:66)
                  at com.liferay.portal.verify.VerifyProcessSuite.doVerify(VerifyProcessSuite.java:35)
                  at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:58)
                  ... 38 more
          Caused by: com.liferay.portal.NoSuchUserException: No User exists with the key {companyId=10472, def
          aultUser=true}
                  at com.liferay.portal.service.persistence.UserPersistenceImpl.findByC_DU(UserPersistenceImpl
          .java:2641)
                  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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:320
          )
                  at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMe
          thodInvocation.java:183)
                  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
          cation.java:150)
                  at com.liferay.portal.dao.shard.advice.ShardPersistenceAdvice.invoke(ShardPersistenceAdvice.
          java:102)
                  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
          cation.java:172)
                  at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationIn
          terceptor.java:90)
                  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
          cation.java:172)
                  at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
                  at $Proxy66.findByC_DU(Unknown Source)
                  at com.liferay.portal.service.impl.UserLocalServiceImpl.loadGetDefaultUser(UserLocalServiceI
          mpl.java:2923)
                  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(ServiceBeanMethodInvoca
          tion.java:122)
                  at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
                  at $Proxy266.loadGetDefaultUser(Unknown Source)
                  at com.liferay.portal.service.impl.UserLocalServiceImpl.getDefaultUser(UserLocalServiceImpl.
          java:1954)
                  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(ServiceBeanMethodInvoca
          tion.java:122)
                  at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
                  at $Proxy266.getDefaultUser(Unknown Source)
                  at com.liferay.portal.service.impl.RoleLocalServiceImpl.checkSystemRole(RoleLocalServiceImpl
          .java:1256)
                  at com.liferay.portal.service.impl.RoleLocalServiceImpl.checkSystemRoles(RoleLocalServiceImp
          l.java:287)
                  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(ServiceBeanMethodInvoca
          tion.java:122)
                  at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
                  at $Proxy252.checkSystemRoles(Unknown Source)
                  at com.liferay.portal.service.RoleLocalServiceUtil.checkSystemRoles(RoleLocalServiceUtil.jav
          a:410)
                  at com.liferay.portal.verify.VerifyRole.doVerify(VerifyRole.java:40)
                  at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:58)
                  ... 41 more
          Stopping the server due to unexpected startup errors
          
          Show
          Mark Jin added a comment - FAILED Manual Testing using the following steps: Configure a sharding environment with shards(Default,One,Two) in portal-ext.properties. Set portal-ext verify.frequency=-1. Go to Control Panel => Portal Instances. Add two instance which mapping to sharding (One,Two). Stop the server and restart. Reproduced on: Tomcat 7.0 + MySQL 5. Portal 6.1.20 EE GA2. Restart tomcat cause the error message in the description. Failed on: Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: cc2501b9b529235ec7261ebae63aba2cbbcc6b2d. Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: a3c1a29e70fcf688fda9548bbbbdf7573a464b17. Restart tomcat cause error message. 06:35:22,046 ERROR [pool-2-thread-1][MainServlet:217] com.liferay.portal.kernel.events.ActionExcepti on: com.liferay.portal.verify.VerifyException: com.liferay.portal.verify.VerifyException: com.lifera y.portal.NoSuchUserException: No User exists with the key {companyId=10472, defaultUser= true } com.liferay.portal.kernel.events.ActionException: com.liferay.portal.verify.VerifyException: com.lif eray.portal.verify.VerifyException: com.liferay.portal.NoSuchUserException: No User exists with the key {companyId=10472, defaultUser= true } at com.liferay.portal.events.StartupAction.run(StartupAction.java:59) at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1306) at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:214) at javax.servlet.GenericServlet.init(GenericServlet.java:160) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1585) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) 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:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang. Thread .run( Thread .java:662) Caused by: com.liferay.portal.verify.VerifyException: com.liferay.portal.verify.VerifyException: com .liferay.portal.NoSuchUserException: No User exists with the key {companyId=10472, defaultUser= true } at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:61) at com.liferay.portal.verify.VerifyProcessUtil._verifyProcess(VerifyProcessUtil.java:110) at com.liferay.portal.verify.VerifyProcessUtil._verifyProcess(VerifyProcessUtil.java:76) at com.liferay.portal.verify.VerifyProcessUtil.verifyProcess(VerifyProcessUtil.java:46) at com.liferay.portal.events.StartupHelper.verifyProcess(StartupHelper.java:145) at com.liferay.portal.events.StartupHelper$$FastClassByCGLIB$$d389986b.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cg lib2AopProxy.java:688) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo cation.java:150) at com.liferay.portal.dao.shard.advice.ShardIterativelyAdvice.invoke(ShardIterativelyAdvice. java:49) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo cation.java:172) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationIn terceptor.java:90) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo cation.java:172) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cgli b2AopProxy.java:621) at com.liferay.portal.events.StartupHelper$$EnhancerByCGLIB$$bec1a79e.verifyProcess(<generat ed>) at com.liferay.portal.events.StartupHelperUtil.verifyProcess(StartupHelperUtil.java:65) at com.liferay.portal.tools.DBUpgrader.verify(DBUpgrader.java:246) at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:199) at com.liferay.portal.events.StartupAction.run(StartupAction.java:53) ... 20 more Caused by: com.liferay.portal.verify.VerifyException: com.liferay.portal.NoSuchUserException: No Use r exists with the key {companyId=10472, defaultUser= true } at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:61) at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:66) at com.liferay.portal.verify.VerifyProcessSuite.doVerify(VerifyProcessSuite.java:35) at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:58) ... 38 more Caused by: com.liferay.portal.NoSuchUserException: No User exists with the key {companyId=10472, def aultUser= true } at com.liferay.portal.service.persistence.UserPersistenceImpl.findByC_DU(UserPersistenceImpl .java:2641) 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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:320 ) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMe thodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo cation.java:150) at com.liferay.portal.dao.shard.advice.ShardPersistenceAdvice.invoke(ShardPersistenceAdvice. java:102) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo cation.java:172) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationIn terceptor.java:90) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo cation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy66.findByC_DU(Unknown Source) at com.liferay.portal.service.impl.UserLocalServiceImpl.loadGetDefaultUser(UserLocalServiceI mpl.java:2923) 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(ServiceBeanMethodInvoca tion.java:122) at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211) at $Proxy266.loadGetDefaultUser(Unknown Source) at com.liferay.portal.service.impl.UserLocalServiceImpl.getDefaultUser(UserLocalServiceImpl. java:1954) 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(ServiceBeanMethodInvoca tion.java:122) at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211) at $Proxy266.getDefaultUser(Unknown Source) at com.liferay.portal.service.impl.RoleLocalServiceImpl.checkSystemRole(RoleLocalServiceImpl .java:1256) at com.liferay.portal.service.impl.RoleLocalServiceImpl.checkSystemRoles(RoleLocalServiceImp l.java:287) 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(ServiceBeanMethodInvoca tion.java:122) at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211) at $Proxy252.checkSystemRoles(Unknown Source) at com.liferay.portal.service.RoleLocalServiceUtil.checkSystemRoles(RoleLocalServiceUtil.jav a:410) at com.liferay.portal.verify.VerifyRole.doVerify(VerifyRole.java:40) at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:58) ... 41 more Stopping the server due to unexpected startup errors
          Hide
          Tammy Fong added a comment -

          Committed on:
          Portal 6.2.x GIT ID: cb2c7929fbb656bb7ba78856ccb20077c0941a8b.

          Show
          Tammy Fong added a comment - Committed on: Portal 6.2.x GIT ID: cb2c7929fbb656bb7ba78856ccb20077c0941a8b.
          Hide
          Mark Jin added a comment -

          PASSED Manual Testing following the steps in my comment's.

          Fixed on:
          Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: 8d9f96de6c0d62c5df93c393ee0c5919c1e46c51.
          Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: fdced8a29e777f0b8be01207581e81f77b2ee4bb.

          Unable to see any error message, when restart tomcat server.

          Show
          Mark Jin added a comment - PASSED Manual Testing following the steps in my comment's. Fixed on: Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: 8d9f96de6c0d62c5df93c393ee0c5919c1e46c51. Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: fdced8a29e777f0b8be01207581e81f77b2ee4bb. Unable to see any error message, when restart tomcat server.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 15 weeks, 5 days ago

                Development

                  Structure Helper Panel