Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 900396 (JBPAPP6-958)

Summary: DiscriminatorFormulaTest in Hibernate envers Testsuite fails on Sybase(15.7)
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Madhumita Sadhukhan <msadhukh>
Component: HibernateAssignee: Strong Liu <stliu>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: msadhukh, pslavice, zroubali
Target Milestone: ---   
Target Release: EAP 6.0.1   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBPAPP6-958
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-04 09:27:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 900612    

Description Madhumita Sadhukhan 2012-05-09 16:12:43 UTC
project_key: JBPAPP6

http://hudson.qa.jboss.com/hudson/view/EAP6/view/EAP6-Hibernate/job/eap6-hibernate-envers-testsuite/database=sybase157,jdk=java16_default,label=hibernate/lastCompletedBuild/testReport/

DiscriminatorFormulaTest in Hibernateenvesr Testsuite fails with RollbackException on sybase 15.7 with following stacktrace:

Stacktrace

javax.persistence.RollbackException: Error while committing the transaction
	at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:92)
	at org.hibernate.envers.test.integration.inheritance.single.discriminatorformula.DiscriminatorFormulaTest.initData(DiscriminatorFormulaTest.java:75)
...................................................................................................................................................
....................................................................................................................................................

Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: A SELECT FOR UPDATE query cannot be used with DISTINCT, GROUP BY, HAVING, COMPUTE, UNION, aggregates, computed columns, subqueries or SELECT INTO.

	at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1372)
	at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1295)
	at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:80)
	... 63 more
Caused by: org.hibernate.exception.GenericJDBCException: A SELECT FOR UPDATE query cannot be used with DISTINCT, GROUP BY, HAVING, COMPUTE, UNION, aggregates, computed columns, subqueries or SELECT INTO.

	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)
..................................................................................................................................................
..................................................................................................................................................
Caused by: java.sql.SQLException: A SELECT FOR UPDATE query cannot be used with DISTINCT, GROUP BY, HAVING, COMPUTE, UNION, aggregates, computed columns, subqueries or SELECT INTO.

	at com.sybase.jdbc4.jdbc.SybConnection.getAllExceptions(Unknown Source)
	at com.sybase.jdbc4.jdbc.SybStatement.handleSQLE(Unknown Source)

Comment 1 Madhumita Sadhukhan 2012-05-09 16:14:15 UTC
Query failing:

select childentit0_.id as id1290_, childentit0_.REV as REV1290_, childentit0_.REVTYPE as REVTYPE1290_, childentit0_.REVEND as REVEND1290_, childentit0_.data as data1290_, childentit0_.typeId as typeId1290_, childentit0_.specificData as specificData1290_ from ParentEntity_AUD childentit0_ where (SELECT c.type FROM ClassTypeEntity c WHERE c.id = childentit0_.typeId)='Child' and childentit0_.id=? and (childentit0_.REVEND is null) for update
05:25:35,604  WARN SqlExceptionHelper:143 - SQL Error: 16336, SQLState: ZZZZZ
05:25:35,604 ERROR SqlExceptionHelper:144 - A SELECT FOR UPDATE query cannot be used with DISTINCT, GROUP BY, HAVING, COMPUTE, UNION, aggregates, computed columns, subqueries or SELECT INTO.



Comment 2 Madhumita Sadhukhan 2012-05-10 11:14:37 UTC
created https://hibernate.onjira.com/browse/HHH-7313 and assigned to Lukas .

Comment 3 Zbyněk Roubalík 2012-06-07 09:22:12 UTC
Link: Added: This issue is a dependency of JBPAPP-9292


Comment 4 Zbyněk Roubalík 2012-10-04 09:27:42 UTC
Verified.

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