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

Unable to upgrade from 6.0 to 7.0 with Bookmarks content

    Details

      Description

      Steps to reproduce

      1. Download attached MySQL dump file
      2. Import database into MySQL 5.6
      3. Add data folder to DXP bundle
      4. Update your portal-ext.properties to include the following:
        upgrade.processes.6012=\
        com.liferay.portal.upgrade.UpgradeProcess_6_0_12_to_6_1_0\,\
        com.liferay.portal.upgrade.UpgradeProcess_6_1_1\,\
        com.liferay.portal.upgrade.UpgradeProcess_6_2_0\,\
        com.liferay.portal.upgrade.UpgradeProcess_7_0_0\,\
        com.liferay.portal.upgrade.UpgradeProcess_7_0_1
        
      5. Upgrade to 7.0

      Expected result:
      Upgrade completes successfully without errors.

      Actual result:
      Upgrade fails to complete and throws the following console errors:

       [java] 18:05:29,995 INFO  [main][LoggingTimer:70] Starting com.liferay.portal.upgrade.v6_1_0.UpgradePermission#convertResourcePermissions#com.liferay.portlet.bookmarks.model.BookmarksEntry
       [java] com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
       [java]     at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:91)
       [java]     at com.liferay.portal.upgrade.Pre7UpgradeProcess.upgrade(Pre7UpgradeProcess.java:42)
       [java]     at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:175)
       [java]     at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:143)
       [java]     at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:125)
       [java] 18:05:30,269 ERROR [main][JDBCExceptionReporter:234] Unknown column 'companyId' in 'field list'
       [java]     at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:164)
       [java] 18:05:30,272 INFO  [main][LoggingTimer:38] Completed com.liferay.portal.upgrade.v6_1_0.UpgradePermission#convertResourcePermissions#com.liferay.portlet.bookmarks.model.BookmarksEntry in 277 ms
       [java]     at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:81)
       [java] 18:05:30,273 INFO  [main][UpgradeProcess:97] Completed upgrade process com.liferay.portal.upgrade.v6_0_12_to_6_1_0.UpgradePermission in 278ms       at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:158)
       [java]
       [java] 18:05:30,273 INFO  [main][UpgradeProcess:97] Completed upgrade process com.liferay.portal.upgrade.UpgradeProcess_6_0_12_to_6_1_0 in 12454ms
       [java]     at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:96)
       [java] Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
       [java]     at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:91)
       [java]     at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:115)
       [java]     at com.liferay.portal.upgrade.UpgradeProcess_6_0_12_to_6_1_0.doUpgrade(UpgradeProcess_6_0_12_to_6_1_0.java:65)
       [java]     at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:88)
       [java]     ... 8 more
       [java] Caused by: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
       [java]     at com.liferay.portal.dao.orm.hibernate.ExceptionTranslator.translate(ExceptionTranslator.java:33)
       [java]     at com.liferay.portal.dao.orm.hibernate.SessionImpl.flush(SessionImpl.java:177)
       [java]     at com.liferay.portal.kernel.dao.orm.ClassLoaderSession.flush(ClassLoaderSession.java:282)
       [java]     at com.liferay.portal.dao.orm.hibernate.SessionFactoryImpl.closeSession(SessionFactoryImpl.java:46)
       [java]     at com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl.closeSession(BasePersistenceImpl.java:93)
       [java]     at com.liferay.portal.service.persistence.impl.ResourceBlockPermissionPersistenceImpl.updateImpl(ResourceBlockPermissionPersistenceImpl.java:1630)
       [java]     at com.liferay.portal.service.persistence.impl.ResourceBlockPermissionPersistenceImpl.updateImpl(ResourceBlockPermissionPersistenceImpl.java:67)
       [java]     at com.liferay.portal.kernel.service.persistence.impl.BasePersistenceImpl.update(BasePersistenceImpl.java:345)
       [java]     at com.liferay.portal.service.base.ResourceBlockPermissionLocalServiceBaseImpl.updateResourceBlockPermission(ResourceBlockPermissionLocalServiceBaseImpl.java:320)
       [java]     at com.liferay.portal.service.impl.ResourceBlockPermissionLocalServiceImpl.addResourceBlockPermissions(ResourceBlockPermissionLocalServiceImpl.java:63)
       [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
       [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       [java]     at java.lang.reflect.Method.invoke(Method.java:497)
       [java]     at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
       [java]     at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
       [java]     at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
       [java]     at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
       [java]     at com.sun.proxy.$Proxy193.addResourceBlockPermissions(Unknown Source)
       [java]     at com.liferay.portal.service.impl.ResourceBlockLocalServiceImpl.addResourceBlock(ResourceBlockLocalServiceImpl.java:200)
       [java]     at com.liferay.portal.service.impl.ResourceBlockLocalServiceImpl.updateResourceBlockId(ResourceBlockLocalServiceImpl.java:885)
       [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
       [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       [java]     at java.lang.reflect.Method.invoke(Method.java:497)
       [java]     at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
       [java]     at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
       [java]     at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
       [java]     at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
       [java]     at com.sun.proxy.$Proxy69.updateResourceBlockId(Unknown Source)
       [java]     at com.liferay.portal.kernel.service.ResourceBlockLocalServiceUtil.updateResourceBlockId(ResourceBlockLocalServiceUtil.java:206)
       [java]     at com.liferay.portal.upgrade.v6_1_0.UpgradePermission.convertResourcePermissions(UpgradePermission.java:75)
       [java]     at com.liferay.portal.upgrade.v6_1_0.UpgradePermission.convertResourcePermissions(UpgradePermission.java:98)
       [java]     at com.liferay.portal.upgrade.v6_0_12_to_6_1_0.UpgradePermission.doUpgrade(UpgradePermission.java:26)
       [java]     at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:88)
       [java]     ... 11 more
       [java] Caused by: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
       [java]     at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92)
       [java]     at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
       [java]     at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
       [java]     at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)
       [java]     at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
       [java]     at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
       [java]     at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
       [java]     at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
       [java]     at com.liferay.portal.dao.orm.hibernate.SessionImpl.flush(SessionImpl.java:174)
       [java]     ... 44 more
       [java] Caused by: java.sql.BatchUpdateException: Unknown column 'companyId' in 'field list'
       [java]     at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2054)
       [java]     at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1467)
       [java]     at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
       [java]     at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
       [java]     ... 50 more
       [java] Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'companyId' in 'field list'
       [java]     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       [java]     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
       [java]     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
       [java]     at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
       [java]     at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
       [java]     at com.mysql.jdbc.Util.getInstance(Util.java:386)
       [java]     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053)
       [java]     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
       [java]     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
       [java]     at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
       [java]     at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
       [java]     at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2794)
       [java]     at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
       [java]     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2458)
       [java]     at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2006)
       [java]     ... 53 more
       [java] Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
       [java] Java Result: 1
      

      Upgraded from:
      MySQL 5.5.48
      Liferay EE 6.0.12

      Reproduced on:
      Tomcat 8.0.32 + MySQL 5.6
      Liferay DXP DE 7.0 B3

        Attachments

          Activity

            People

            • Assignee:
              patricia.perez Patricia Perez
              Reporter:
              patricia.perez Patricia Perez
              Participants of an Issue:
              Recent user:
              Esther Sanz
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

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

                Packages

                Version Package
                7.0.1 CE GA2