AuditReader.find() causes SQL error ORA-00932 with oracle when using ClassicQueryTranslatorFactory

Description

Calling AuditReader.find() for a certain revision causes a ORA-00932 error with the message "ORA-00932: inconsistent datatypes: expected NUMBER got BINARY" (see surefire-report in attachment) when property hibernate.query.factory_class is set to org.hibernate.hql.internal.classic.ClassicQueryTranslatorFactory

The behaviour does not occur, when ClassicQueryTranslatorFactory is not used. The testcase provided with this report can be executed with the new translator factory by providing -DpersistenceUnitName=ENVERSTEST-ORACLE_DEFAULT; The error does also not occur when using H2 (-DpersistenceUnitName=ENVERSTEST-H2).
To run the provided test with oracle a user "enverstest" with password "enverstest" has to be created. It is also likely that the JDBC URL in persistence.xml has to be changed. The test can be executed under control of maven with "mvn clean install".

I reported the same behaviour for Hibernate 3.6.10 as HHH-8482. There's also an earlier report as HHH-6975.

Environment

Hibernate 4.2.5.Final, Oracle 11g XE

Status

Assignee

Lukasz Antoniak

Reporter

S

Fix versions

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure