Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
2.9.2
-
None
-
Unknown
-
Description
Steps to reproduce
- Install Test Reporting Application 2.9.2.
- Open a test space home page with a few tests and executions.
- Sort the LiveTable by an environment column, e.g. "Java" or "Servlet Container".
Result
The server logs are flooded with Hibernate warnings, dozens per LiveTable request (more than 1,100 lines after a few sorts, about 60% of the log):
WARN o.h.d.f.TemplateRenderer - HHH000174: Function template anticipated 3 arguments, but 2 arguments encountered WARN o.h.d.f.TemplateRenderer - HHH000174: Function template anticipated 4 arguments, but 1 arguments encountered
The LiveTable results are still correct.
Expected
No warnings in the logs.
Cause
The version ordering built by the versionOrderClauses macro in QA.LiveTableResults (introduced by TESTREPORT-27 and used when sorting environment columns by version) uses locate() with 2 arguments and trim() with 1 argument, while Hibernate's dialect templates are locate(?1, ?2, ?3) and trim(?1 ?2 ?3 ?4). Hibernate still generates valid SQL but logs a warning for each call. Passing the start position to locate (e.g. locate('-', x, 1)) and using trim(both ' ' from x) should remove them.