Bug 900303 (JBPAPP6-936) - Tests fail on Postgresql due to failure in typecasts
Summary: Tests fail on Postgresql due to failure in typecasts
Keywords:
Status: CLOSED NEXTRELEASE
Alias: JBPAPP6-936
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Hibernate
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: EAP 6.0.1
Assignee: Strong Liu
QA Contact:
URL: http://jira.jboss.org/jira/browse/JBP...
Whiteboard:
Depends On:
Blocks: JBPAPP6-905
TreeView+ depends on / blocked
 
Reported: 2012-04-26 16:00 UTC by Madhumita Sadhukhan
Modified: 2014-06-28 12:33 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-04 09:35:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBPAPP6-936 0 Major Closed Tests fail on Postgresql due to failure in typecasts 2016-02-01 14:19:55 UTC

Description Madhumita Sadhukhan 2012-04-26 16:00:03 UTC
project_key: JBPAPP6

Created :
https://hibernate.onjira.com/browse/HHH-7281

Quite a few tests started failing asking for explicit typecasts after upgrade of dialect in postgresql

https://hudson.qa.jboss.com/hudson/view/EAP6/view/EAP6-Hibernate/job/eap6-hibernate-core-master-testsuite/database=postgresql91,jdk=java16_default,label=hibernate/lastCompletedBuild/testReport/

Exception which varies in failing tests but core reason is same:(for eg)

org.hibernate.exception.SQLGrammarException: ERROR: operator does not exist: integer = boolean
  Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
  Position: 427

Stacktrace

org.hibernate.exception.SQLGrammarException: ERROR: operator does not exist: integer = boolean
  Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
  Position: 427
	at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:122)
	at


I found this issue in previous version of the product which was fixed by skipping some queries in the test specific to dialect and i think the new dialect should be added similarly.
Referring older issues
https://issues.jboss.org/browse/JBPAPP-2716
https://hibernate.onjira.com/browse/HHH-4115

Comment 1 Strong Liu 2012-04-27 03:14:52 UTC
alright, just change the dialect back to _org.hibernate.dialect.PostgreSQLDialect_

we have this code 
{quote}
@Deprecated
public class PostgreSQLDialect extends PostgreSQL82Dialect {
}
{quote}

so, change it back won't missing anything wrt testing, these are just caused by the bad test

for example, the _org.hibernate.test.bidi.AuctionTest.testLazy_, it seems this @SkipForDialect won't skip if a parent class is used here.

{quote}
	@Test
	@SuppressWarnings( {"unchecked"})
	@SkipForDialect( value = PostgreSQLDialect.class, comment = "doesn't like boolean=1" )
	public void testLazy()
{quote}

Comment 2 Madhumita Sadhukhan 2012-04-27 08:11:58 UTC
reassigning to myself to revert the change in dialect,Strong please resolve the hibernate jira

we dont need to revert the dialect as it has been fixed in code...reassigning to Strong for update

Comment 3 Strong Liu 2012-04-27 08:58:21 UTC
this will be included into next eap build, meanwhile, for the QA testing of ER6, it is still needed to use _PostgreSQLDialect_ 

Comment 4 Rajesh Rajasekaran 2012-05-04 16:22:29 UTC
Link: Added: This issue is related to JBPAPP-8827


Comment 5 Rajesh Rajasekaran 2012-05-04 16:22:37 UTC
Link: Removed: This issue is related to JBPAPP-8827 


Comment 6 Rajesh Rajasekaran 2012-05-04 16:22:48 UTC
Link: Added: This issue is a dependency of JBPAPP-8827


Comment 7 Madhumita Sadhukhan 2012-05-11 13:21:47 UTC
Strong,

      I still see test failures with ER7 on postgre with the new dialect

https://hudson.qa.jboss.com/hudson/view/EAP6/view/EAP6-Hibernate/job/eap6-hibernate-core-master-testsuite/186/database=postgresql91,jdk=java16_default,label=hibernate/

this is only test issue but i am reopening the jira.

Comment 8 Strong Liu 2012-05-23 13:32:07 UTC
https://hibernate.onjira.com/browse/HHH-7346

Comment 9 Strong Liu 2012-05-23 13:33:00 UTC
test only issue, will be included in EAP 6.0.1

Comment 10 Rajesh Rajasekaran 2012-06-06 22:26:13 UTC
Link: Added: This issue is a dependency of JBPAPP-9292


Comment 11 Rajesh Rajasekaran 2012-06-06 22:26:38 UTC
Link: Removed: This issue is a dependency of JBPAPP-8827 


Comment 12 Zbyněk Roubalík 2012-10-04 09:35:53 UTC
Verified.

Comment 13 Anne-Louise Tangring 2012-11-13 20:07:51 UTC
Docs QE Status: Removed: NEW 



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