Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Issue Upgrading Database from 6.2 to 7.x
Hello,
I am trying to upgrade my postgres database from 6.2 to 7.x using the upgrade tool.
However, I get the following error when attempting to upgrade -
2019-09-09 09:47:12.057 INFO [pool-3-thread-17][LoggingTimer:43] Completed com.liferay.portal.upgrade.util.UpgradeCompanyId$TableUpdater#call#PasswordTracker in 186 ms
2019-09-09 09:47:12.066 INFO [pool-3-thread-18][LoggingTimer:43] Completed com.liferay.portal.upgrade.util.UpgradeCompanyId$TableUpdater#call#PortletPreferences in 195 ms
2019-09-09 09:47:12.105 INFO [pool-3-thread-19][LoggingTimer:43] Completed com.liferay.portal.upgrade.util.UpgradeCompanyId$TableUpdater#call#RatingsStats in 234 ms
2019-09-09 09:47:12.106 INFO [main][UpgradeProcess:107] Failed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeCompanyId in 360 ms
2019-09-09 09:47:12.106 INFO [main][UpgradeProcess:107] Failed upgrade process com.liferay.portal.upgrade.UpgradeProcess_7_0_0 in 1536 ms
com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.util.concurrent.ExecutionException: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = bigint
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Position: 99
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:101)
at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:176)
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:151)
at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:85)
at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:173)
at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:106)
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.tools.db.upgrade.client.DBUpgraderLauncher.main(DBUpgraderLauncher.java:55)
Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.util.concurrent.ExecutionException: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = bigint
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Position: 99
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:101)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:142)
at com.liferay.portal.upgrade.UpgradeProcess_7_0_0.doUpgrade(UpgradeProcess_7_0_0.java:85)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:96)
... 12 more
Caused by: java.util.concurrent.ExecutionException: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = bigint
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Position: 99
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at com.liferay.portal.upgrade.util.UpgradeCompanyId.doUpgrade(UpgradeCompanyId.java:65)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:96)
... 15 more
Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = bigint
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Position: 99
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2412)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2125)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:297)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:428)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:354)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:301)
at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:287)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:264)
at org.postgresql.jdbc.PgStatement.executeUpdate(PgStatement.java:244)
at com.zaxxer.hikari.pool.ProxyStatement.executeUpdate(ProxyStatement.java:117)
at com.zaxxer.hikari.pool.HikariProxyStatement.executeUpdate(HikariProxyStatement.java)
at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:340)
at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:310)
at com.liferay.portal.kernel.dao.db.BaseDBProcess.runSQL(BaseDBProcess.java:41)
at com.liferay.portal.upgrade.util.UpgradeCompanyId$TableUpdater.update(UpgradeCompanyId.java:139)
at com.liferay.portal.upgrade.util.UpgradeCompanyId$TableUpdater.call(UpgradeCompanyId.java:121)
at com.liferay.portal.upgrade.util.UpgradeCompanyId$TableUpdater.call(UpgradeCompanyId.java:75)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
I've tried looking for someone else who has had this issue but I've not been able to find another post.
Any ideas?
Thanks for your help!
I am trying to upgrade my postgres database from 6.2 to 7.x using the upgrade tool.
However, I get the following error when attempting to upgrade -
2019-09-09 09:47:12.057 INFO [pool-3-thread-17][LoggingTimer:43] Completed com.liferay.portal.upgrade.util.UpgradeCompanyId$TableUpdater#call#PasswordTracker in 186 ms
2019-09-09 09:47:12.066 INFO [pool-3-thread-18][LoggingTimer:43] Completed com.liferay.portal.upgrade.util.UpgradeCompanyId$TableUpdater#call#PortletPreferences in 195 ms
2019-09-09 09:47:12.105 INFO [pool-3-thread-19][LoggingTimer:43] Completed com.liferay.portal.upgrade.util.UpgradeCompanyId$TableUpdater#call#RatingsStats in 234 ms
2019-09-09 09:47:12.106 INFO [main][UpgradeProcess:107] Failed upgrade process com.liferay.portal.upgrade.v7_0_0.UpgradeCompanyId in 360 ms
2019-09-09 09:47:12.106 INFO [main][UpgradeProcess:107] Failed upgrade process com.liferay.portal.upgrade.UpgradeProcess_7_0_0 in 1536 ms
com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: java.util.concurrent.ExecutionException: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = bigint
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Position: 99
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:101)
at com.liferay.portal.kernel.upgrade.util.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:176)
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:151)
at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:85)
at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:173)
at com.liferay.portal.tools.DBUpgrader.main(DBUpgrader.java:106)
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.tools.db.upgrade.client.DBUpgraderLauncher.main(DBUpgraderLauncher.java:55)
Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: java.util.concurrent.ExecutionException: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = bigint
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Position: 99
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:101)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:142)
at com.liferay.portal.upgrade.UpgradeProcess_7_0_0.doUpgrade(UpgradeProcess_7_0_0.java:85)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:96)
... 12 more
Caused by: java.util.concurrent.ExecutionException: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = bigint
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Position: 99
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at com.liferay.portal.upgrade.util.UpgradeCompanyId.doUpgrade(UpgradeCompanyId.java:65)
at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:96)
... 15 more
Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = bigint
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Position: 99
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2412)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2125)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:297)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:428)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:354)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:301)
at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:287)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:264)
at org.postgresql.jdbc.PgStatement.executeUpdate(PgStatement.java:244)
at com.zaxxer.hikari.pool.ProxyStatement.executeUpdate(ProxyStatement.java:117)
at com.zaxxer.hikari.pool.HikariProxyStatement.executeUpdate(HikariProxyStatement.java)
at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:340)
at com.liferay.portal.dao.db.BaseDB.runSQL(BaseDB.java:310)
at com.liferay.portal.kernel.dao.db.BaseDBProcess.runSQL(BaseDBProcess.java:41)
at com.liferay.portal.upgrade.util.UpgradeCompanyId$TableUpdater.update(UpgradeCompanyId.java:139)
at com.liferay.portal.upgrade.util.UpgradeCompanyId$TableUpdater.call(UpgradeCompanyId.java:121)
at com.liferay.portal.upgrade.util.UpgradeCompanyId$TableUpdater.call(UpgradeCompanyId.java:75)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
I've tried looking for someone else who has had this issue but I've not been able to find another post.
Any ideas?
Thanks for your help!
Hi Sammy,To be able to help you, what do you mean with 7.x? 7.0, 7.1, 7.2? CE or EE? Can you provide the exact Liferay version you are using?Thanks.
Hi Alberto,I am currently on version 6.2 CE and I'm trying to upgrade my database to 7.2 CE. However, I have also tried with 7.1 and 7.0 to upgrade but received the same error message.
Thanks
Thanks
Hi @Sammy,The upgrade is failing here:https://github.com/liferay/liferay-portal/blob/7.0.x/portal-impl/src/com/liferay/portal/upgrade/v7_0_0/UpgradeCompanyId.java#L70
And it seems that, for one reason, you have a field in the database that should be bigint but it is varchar. Can you check in you 6.2 database if all those fields RatingsStats.classPk, BookmarksEntry.entryId, BookmarksFolder.folderId, ..., WikiPage.pageId are BIGINT?
And it seems that, for one reason, you have a field in the database that should be bigint but it is varchar. Can you check in you 6.2 database if all those fields RatingsStats.classPk, BookmarksEntry.entryId, BookmarksFolder.folderId, ..., WikiPage.pageId are BIGINT?
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™