Bug 975374 - Automatic Hibernate dialect detection does not work with PostgresPlus 9.2
Summary: Automatic Hibernate dialect detection does not work with PostgresPlus 9.2
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss Enterprise Portal Platform 6
Classification: JBoss
Component: Portal
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER03
: 6.1.0
Assignee: Viliam Rockai
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-18 09:48 UTC by Dominik Pospisil
Modified: 2015-09-01 03:31 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
An issue with Hibernate caused the PostgresPlus 9.2 database to not be detected automatically. To work around the issue, specify the PostgresPlus dialect in the 'JPP_HOME/gatein/gatein.ear/portal.war/WEB-INF/conf/organization/idm-configuration.xml' file to ensure the portal runs correctly. [source,XML] ---- <property name="hibernate.dialect" value="org.hibernate.dialect.PostgresPlusDialect"/> ----
Clone Of:
Environment:
Last Closed: 2013-07-09 09:08:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker GTNPORTAL-2960 0 Major Resolved Unable to determine Dialect to use [name=EnterpriseDB, majorVersion=9] - for PostgresPlus 9.2 2015-11-12 08:40:36 UTC

Description Dominik Pospisil 2013-06-18 09:48:44 UTC
Hibernate DialectFactory cannot determine "hibernate.dialect" for PostgresPlus 9.2 (EnterpriseDB).
... 
org.hibernate.HibernateException: Unable to determine Dialect to use [name=EnterpriseDB, majorVersion=9]; user must register resolver or explicitly set 'hibernate.dialect'
at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:105) [hibernate-core-4.1.6.Final.jar:4.1.6.Final]
at 
...

As a workaroud, IDM datasource dialect may be set manually to "org.hibernate.dialect.PostgresPlusDialect".

Comment 1 Boleslaw Dawidowicz 2013-06-18 10:03:38 UTC
We'll need to check if this can be fixed by Hibernate upgrade (Vlasta tried with 4.2.1 already). If there is no easy fix it should be documented as a known issue with workaround to set the dialect manually.

Comment 3 Viliam Rockai 2013-07-03 14:32:42 UTC
I've tried to run the JPP ER02 with the configuration used in the QA:
https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/EPP/view/EPP/view/6.1/view/UI%20Database%20Support/job/epp6_ui_selenium_tests_db_postgresplus92/

The exception described above wasn't raised even if I changed the configuration to:
gatein.jcr.datasource.dialect=auto

Instead of this problem, there is a new one and is related to the jdbc driver:
https://bugzilla.redhat.com/show_bug.cgi?id=979528

Switching the hibernate version to 4.2.2 didn't affect this bug in any way.

By switching I mean replacing these libs in modules:
./modules/system/layers/base/org/hibernate/main/hibernate-entitymanager-4.2.0.Final-redhat-1.jar
./modules/system/layers/base/org/hibernate/main/hibernate-core-4.2.0.Final-redhat-1.jar
./modules/system/layers/base/org/hibernate/main/hibernate-infinispan-4.2.0.Final-redhat-1.jar
./modules/system/layers/base/org/hibernate/envers/main/hibernate-envers-4.2.0.Final-redhat-1.jar

Comment 4 Viliam Rockai 2013-07-03 15:25:12 UTC
I was using the "edb-jdbc14.jar" driver.

Comment 5 Tomas Kyjovsky 2013-07-04 17:40:07 UTC
I still reproduced this issue with ER2 (and also with the latest gatein-master). I still get the "Unable to determine Dialect to use [name=EnterpriseDB, majorVersion=9]" exception if I don't set the dialect for JCR datasource explicitly.

Comment 6 Martin Simka 2013-07-08 12:14:21 UTC
FYI: https://hibernate.atlassian.net/browse/HHH-8349

Comment 7 Viliam Rockai 2013-07-08 14:07:04 UTC
I've inspected this bug again and configured it to pg+ from scratch. I was able to reproduce the issue and I'm getting the same error as tkyjovsky.

After specifying the dialect in:
gatein/gatein.ear/portal.war/WEB-INF/conf/organization/idm-configuration.xml
by adding
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgresPlusDialect"/>

I'm not getting the dialect error anymore, and I have this one instead:
https://bugzilla.redhat.com/show_bug.cgi?id=979528


Switching the hibernate version to 4.2.2 didn't affect this bug in any way.

Comment 8 JBoss JIRA Server 2014-01-06 20:10:58 UTC
Tomas Kyjovsky <tkyjovsk> updated the status of jira GTNPORTAL-2960 to Resolved


Note You need to log in before you can comment on or make changes to this bug.