Liferay 7.0 does not work with Postgres

Thomas Kellerer, modified 11 Years ago. Expert Posts: 490 Join Date: 6/9/08 Recent Posts
I wanted to try out Liferay 7.0 but the installation fails when using Postgres as the database:

13:50:04,371 INFO  [http-bio-8080-exec-8][VerifyProcess:79] Completed verification process com.liferay.portal.verify.VerifyGroupedModel in 10ms
13:50:04,372 INFO  [http-bio-8080-exec-8][VerifyProcess:69] Verifying com.liferay.portal.verify.VerifyJournal
13:50:04,553 ERROR [http-bio-8080-exec-8][JDBCExceptionReporter:82] 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: 1762 [Sanitized]
13:50:04,557 INFO  [http-bio-8080-exec-8][VerifyProcess:79] Completed verification process com.liferay.portal.verify.VerifyJournal in 185ms
13:50:04,558 INFO  [http-bio-8080-exec-8][VerifyProcess:79] Completed verification process com.liferay.portal.verify.VerifyProcessSuite in 1022ms
13:50:23,252 ERROR [http-bio-8080-exec-4][CompanyThreadLocal:64] com.liferay.portal.NoSuchCompanyException: No Company exists with the primary key 20153
com.liferay.portal.NoSuchCompanyException: No Company exists with the primary key 20153
	at com.liferay.portal.service.persistence.impl.CompanyPersistenceImpl.findByPrimaryKey(CompanyPersistenceImpl.java:1643)
	at com.liferay.portal.service.persistence.impl.CompanyPersistenceImpl.findByPrimaryKey(CompanyPersistenceImpl.java:1660)
	at com.liferay.portal.service.base.CompanyLocalServiceBaseImpl.getCompany(CompanyLocalServiceBaseImpl.java:238)


The culprit is this error message:

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

Which means the database is not initialized correctly and the whole site doesn't work:

I am using:
  • Liferay 7.0 M3
  • Postgres 9.4
  • Windows 7
  • Java 1.7
thumbnail
David H Nebinger, modified 11 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
Earlier in the startup process is it reporting the correct Hibernate dialect?

Oh, and BTW we're not really debugging LR7 here in the forums, but please open bugs in jira so Liferay will know about them.
Thomas Kellerer, modified 11 Years ago. Expert Posts: 490 Join Date: 6/9/08 Recent Posts
David H Nebinger:
Earlier in the startup process is it reporting the correct Hibernate dialect?
Yes it did.
Determine dialect for PostgreSQL 9
Found dialect org.hibernate.dialect.PostgreSQLDialect


Oh, and BTW we're not really debugging LR7 here in the forums, but please open bugs in jira so Liferay will know about them.

OK, done: https://issues.liferay.com/browse/LPS-53193