project_key: JBPAPP6 https://hibernate.onjira.com/browse/HHH-6655 Failing test:com.sun.ts.tests.ejb30.persistence.criteriaapi.querybuilder.Client testname=trim For DB2 a warning message is generated by TempateRenderer which is not seen for other databases: WARN: HHH00174:Function template anticipated 3 arguments, but 2 arguments encountered Also the query created is different in case of DB2: Hibernate: select replace(replace(ltrim(rtrim(replace(replace(customer0_.NAME,' ','${space}$'),?,' '))),' ',?),'${space}$',' ') as col_0_0_ from CUSTOMER_TABLE customer0_ where customer0_.NAME=? fetch first 2 rows only and finally it fails because of above warning: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: DB2 SQL Error: SQLCODE=-313, SQLSTATE=07001 For other DBs same code generates following query and test passes: Hibernate: select trim(BOTH ? from customer0_.NAME) as col_0_0_ from CUSTOMER_TABLE customer0_ where customer0_.NAME=? limit ? Attaching log and testcode
Attachment: Added: Client_trim_from_standalone_DB2.jtr Attachment: Added: Client_trim_from_standalone_postgresql.jtr Attachment: Added: Client.java
Strong can you please take a look at this? assigning to you.
may relates to this one https://hibernate.onjira.com/browse/HHH-1949
http://opensource.atlassian.com/projects/hibernate/browse/HHH-6655
Link: Added: This issue is a dependency of JBPAPP-8827
Affects: Added: Release Notes
Affects: Removed: Release Notes
Link: Added: This issue is a dependency of JBPAPP-9292
Link: Removed: This issue is a dependency of JBPAPP-8827
https://hibernate.onjira.com/browse/HHH-6280
After re-running the test on DB2 9, HHH-6280 appears to be no longer relevant. I updated HHH-6655 with the real issue.
HHH-6655 is resolved. Unless there's a critical reason to patch this in EAP 6.0.1, I'm holding off until the component upgrade in 6.1.0.
Release Notes Docs Status: Added: Documented as Resolved Issue Release Notes Text: Added: For DB2 databases, the "trim" function had problems using parameter values as arguments. Forcing Hibernate to default to using literal values in TrimFunction corrected the issue.
Release Notes Docs Status: Removed: Documented as Resolved Issue Release Notes Text: Removed: For DB2 databases, the "trim" function had problems using parameter values as arguments. Forcing Hibernate to default to using literal values in TrimFunction corrected the issue. Docs QE Status: Removed: NEW