Foren

Upgrade database from liferay 6.2 to 7.0

florian toto, geändert vor 7 Jahren.

Upgrade database from liferay 6.2 to 7.0

New Member Beiträge: 13 Beitrittsdatum: 06.02.17 Neueste Beiträge
Hi every one

I am upgrading my liferay app.
It's working in 6.1 and i would like to uprgade to the 7.0 yet I have some issues whyle I run the database process upgrade. emoticon
(this cmd : java -jar com.liferay.portal.tools.db.upgrade.client.jar )

In fact I get some SQL error like these :

####### SQL errors
####### 1
com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: Incorrect string value: '\xEC\x84\xB8\xEA\xB3\x84...' for column 'name' at row 3
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:91)
at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:175)
at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:143)
at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:125)
at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:164)
at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:81)
at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:157)
at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:103)
Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.sql.SQLException: Incorrect string value: '\xEC\x84\xB8\xEA\xB3\x84...' for column 'name' at row 3
.......
Caused by: java.sql.SQLException: Incorrect string value: '\xEC\x84\xB8\xEA\xB3\x84...' for column 'name' at row 3
......
####### 2
11:16:53,006 ERROR [main][JDBCExceptionReporter:234] Unknown column 'appimpl0_.title' in 'field list'
11:16:53,025 ERROR [main][com_liferay_marketplace_service:97] [com.liferay.marketplace.internal.lpkg.deployer.LPKGDeployerRegistrar(1563)] The activate method has thrown an exception
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.marketplace.service.persistence.impl.AppPersistenceImpl.fetchByRemoteAppId(AppPersistenceImpl.java:1831)
at com.liferay.marketplace.service.persistence.impl.AppPersistenceImpl.fetchByRemoteAppId(AppPersistenceImpl.java:1752)
at com.liferay.marketplace.service.impl.AppLocalServiceImpl.updateApp(AppLocalServiceImpl.java:376)
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.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.in
Caused by: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: could not execute query
.....
Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
.....
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'appimpl0_.title' in 'field list'
.....

####### 3
11:17:12,066 ERROR [main][com_liferay_portal_upgrade:97] Invocation to listener threw exception
java.lang.RuntimeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
......
Caused by: org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
.......
Caused by: java.sql.BatchUpdateException: Incorrect string value: '\xEC\x9B\xB9 \xEB\x82...' for column 'name' at row 1
......
Caused by: java.sql.SQLException: Incorrect string value: '\xEC\x9B\xB9 \xEB\x82...' for column 'name' at row 1
.....
####### End SQL Errors

The first error message is relying on the table `Group_' . When I delete the line in error the issue disapire, yet I dont want to delete lines in my database ...

Plz suggest.

Thanks

PS : I strictly followed the upgrade process for Liferay Portal at this link : https://dev.liferay.com/discover/deployment/-/knowledge_base/7-0/upgrading-to-liferay-7
thumbnail
Milen Dyankov, geändert vor 7 Jahren.

RE: Upgrade database from liferay 6.2 to 7.0

Expert Beiträge: 310 Beitrittsdatum: 30.10.12 Neueste Beiträge
It seams you have 4 byte unicode character in your database but connection/db/table/column encoding does not support that.

Have a look at http://stackoverflow.com/questions/13653712/java-sql-sqlexception-incorrect-string-value-xf0-x9f-x91-xbd-xf0-x9f which explains this in quite some details.
florian toto, geändert vor 7 Jahren.

RE: Upgrade database from liferay 6.2 to 7.0 (Antwort)

New Member Beiträge: 13 Beitrittsdatum: 06.02.17 Neueste Beiträge
Thanks for your reply,

I resolved my problem using the post : https://web.liferay.com/fr/community/forums/-/message_boards/message/76256549#_19_message_76582698

It was due to a bad encoding of tables in my data base.
I also had to configure my database to use utf8 as default encoding.

Thanks for your help.
megan joe, geändert vor 4 Jahren.

RE: Upgrade database from liferay 6.2 to 7.0

New Member Beitrag: 1 Beitrittsdatum: 03.10.19 Neueste Beiträge
Very helpful reply.