Uploaded image for project: 'PUBLIC - Liferay Portal Web Content Experience'
  1. PUBLIC - Liferay Portal Web Content Experience
  2. WCM-738

Unknown column 'ctactionim0_.companyId' in 'field list' when restarting after upgrading

    Details

    • Type: Regression Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Content Targeting
    • Labels:
      None

      Description

      Steps to reproduce issue:

      1. Execute an upgrade from 6.2 to 7.0 using the attached MySQL database and data folder
      2. Leave indexReadOnly=true in com.liferay.portal.search.configuration.IndexStatusManagerConfiguration.cfg
      3. Start up portal
      4. Deploy content targeting

      Expected result: Content targeting modules upgrade successfully with no errors
      Actual result: Errors are thrown during upgrade process:

      17:38:26,754 ERROR [liferay/scheduler_dispatch-4][JDBCExceptionReporter:234] Unknown column 'ctactionim0_.companyId' in 'field list'
      17:38:26,762 ERROR [liferay/scheduler_dispatch-4][ParallelDestination:55] Unable to process message {destinationName=liferay/scheduler_dispatch, response=null, responseDestinationName=null, responseId=null, payload=null, values={GROUP_NAME=com.liferay.content.targeting.report.campaign.tracking.action.messaging.CheckML, companyId=0, groupId=0, DESTINATION_NAME=liferay/scheduler_dispatch, EXCEPTIONS_MAX_SIZE=0, JOB_STATE=com.liferay.portal.kernel.scheduler.JobState@482fee1a, STORAGE_TYPE=MEMORY_CLUSTERED, JOB_NAME=com.liferay.content.targeting.report.campaign.tracking.action.messaging.CheckML}}
      com.liferay.portal.kernel.messaging.MessageListenerException: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: could not execute query
              at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:32)
              at com.liferay.portal.kernel.scheduler.messaging.SchedulerEventMessageListenerWrapper.receive(SchedulerEventMessageListenerWrapper.java:65)
              at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
              at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:756)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:667)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: could not execute query
              at com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:267)
              at com.liferay.content.targeting.report.campaign.tracking.action.service.persistence.impl.CTActionPersistenceImpl.findByReportInstanceId(CTActionPersistenceImpl.java:779)
              at com.liferay.content.targeting.report.campaign.tracking.action.service.persistence.impl.CTActionPersistenceImpl.findByReportInstanceId(CTActionPersistenceImpl.java:664)
              at com.liferay.content.targeting.report.campaign.tracking.action.service.persistence.impl.CTActionPersistenceImpl.findByReportInstanceId(CTActionPersistenceImpl.java:626)
              at com.liferay.content.targeting.report.campaign.tracking.action.service.impl.CTActionLocalServiceImpl.checkCTActionEvents(CTActionLocalServiceImpl.java:133)
              at com.liferay.content.targeting.report.campaign.tracking.action.service.impl.CTActionLocalServiceImpl.checkCTActionEvents(CTActionLocalServiceImpl.java:125)
              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:497)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
              at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:85)
              at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.RetryAdvice.invoke(RetryAdvice.java:46)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:40)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
              at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
              at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
              at com.sun.proxy.$Proxy851.checkCTActionEvents(Unknown Source)
              at com.liferay.content.targeting.report.campaign.tracking.action.messaging.CheckML.doReceive(CheckML.java:64)
              at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
              ... 6 more
      Caused by: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: could not execute query
              at com.liferay.portal.dao.orm.hibernate.ExceptionTranslator.translate(ExceptionTranslator.java:33)
              at com.liferay.portal.dao.orm.hibernate.QueryImpl.list(QueryImpl.java:129)
              at com.liferay.portal.dao.orm.hibernate.QueryImpl.list(QueryImpl.java:108)
              at com.liferay.portal.kernel.dao.orm.QueryUtil.list(QueryUtil.java:59)
              at com.liferay.content.targeting.report.campaign.tracking.action.service.persistence.impl.CTActionPersistenceImpl.findByReportInstanceId(CTActionPersistenceImpl.java:760)
              ... 44 more
      Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
              at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92)
              at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
              at org.hibernate.loader.Loader.doList(Loader.java:2545)
              at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
              at org.hibernate.loader.Loader.list(Loader.java:2271)
              at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:940)
              at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
              at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
              at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
              at com.liferay.portal.dao.orm.hibernate.QueryImpl.list(QueryImpl.java:117)
              ... 47 more
      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'ctactionim0_.companyId' in 'field list'
              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
              at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
              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:1053)
              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
              at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
              at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
              at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2794)
              at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
              at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2322)
              at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
              at org.hibernate.loader.Loader.getResultSet(Loader.java:1953)
              at org.hibernate.loader.Loader.doQuery(Loader.java:802)
              at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
              at org.hibernate.loader.Loader.doList(Loader.java:2542)
              ... 54 more

      Reproduced on:
      Tomcat 8.0.32 + MySQL 5.7
      Portal ee-7.0.x GIT ID: 52045f35984efc47683fc4cbb4611c0fd30868fa
      Content Targeting GIT ID: bc5cac3ab96a4785859751df1268d53a3d4220ed (RC9)

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Packages

                  Version Package
                  2.0