| yes, stacktrace from FooBarTest.testLimit
javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154)
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181)
at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1514)
at org.hibernate.test.legacy.FooBarTest.testLimit(FooBarTest.java:1651)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:45)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63)
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:69)
at org.hibernate.loader.Loader.getResultSet(Loader.java:2167)
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1930)
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1892)
at org.hibernate.loader.Loader.doQuery(Loader.java:937)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:340)
at org.hibernate.loader.Loader.doList(Loader.java:2689)
at org.hibernate.loader.Loader.doList(Loader.java:2672)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2506)
at org.hibernate.loader.Loader.list(Loader.java:2501)
at org.hibernate.hql.internal.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:1031)
at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:220)
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1508)
at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1537)
at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1505)
... 16 more
Caused by: java.sql.SQLSyntaxErrorException: ORA-00932: inconsistent datatypes: expected - got BLOB
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494)
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:446)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1054)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:623)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:252)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:612)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:226)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:59)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:747)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:904)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1082)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3780)
at oracle.jdbc.driver.T4CPreparedStatement.executeInternal(T4CPreparedStatement.java:1343)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3822)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1165)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:60)
... 30 more
Caused by: Error : 932, Position : 687, Sql = select distinct foo0_."foo_idcolumnname123" as foo_idcolumnname1_35_, foo0_.version as version2_35_, foo0_.foo as foo4_35_, foo0_.long_ as long_5_35_, foo0_."integer__" as integer__6_35_, foo0_.float_ as float_7_35_, foo0_.x as x8_35_, foo0_.double_ as double_9_35_, foo0_.date_ as date_10_35_, foo0_.timestamp_ as timestamp_11_35_, foo0_.boolean_ as boolean_12_35_, foo0_.bool_ as bool_13_35_, foo0_.null_ as null_14_35_, foo0_.short_ as short_15_35_, foo0_.char_ as char_16_35_, foo0_.zero_ as zero_17_35_, foo0_.int_ as int_18_35_, foo0_.string_ as string_19_35_, foo0_.byte_ as byte_20_35_, foo0_.yesno as yesno21_35_, foo0_.blobb_ as blobb_22_35_, foo0_.nullBlob as nullBlob23_35_, foo0_.bin_ as bin_24_35_, foo0_."localeayzabc123" as localeayzabc25_35_, foo0_.first_name as first_name26_35_, foo0_.surname as surname27_35_, foo0_.count_ as count_28_35_, foo0_.name_ as name_29_35_, foo0_.g__ as g__30_35_, foo0_.cmpnt_null_ as cmpnt_null_31_35_, foo0_.subname as subname32_35_, foo0_.fee_sub as fee_sub33_35_, foo0_.null_cmpnt_ as null_cmpnt_34_35_, foo0_1_.joinedProp as joinedProp2_46_, foo0_2_.dependent as dependent2_32_, foo0_.the_time as the_time35_35_, foo0_.baz as baz41_35_, foo0_.bar_string as bar_string36_35_, foo0_.bar_count as bar_count37_35_, foo0_.name as name38_35_, foo0_.clazz as clazz39_35_, foo0_.gen_id as gen_id40_35_, foo0_3_.name_name as name_name2_1_, foo0_.int_/2 as formula0_, foo0_."foo_subclass_1234" as foo_subclass_3_35_ from "foos" foo0_ inner join jointable foo0_1_ on foo0_."foo_idcolumnname123"=foo0_1_.fooid inner join foo_dep_table foo0_2_ on foo0_."foo_idcolumnname123"=foo0_2_.fooid left outer join bar_join_table foo0_3_ on foo0_."foo_idcolumnname123"=foo0_3_.bar_id where foo0_."foo_subclass_1234" in ('F', 'B', 'T') offset :1 rows fetch next :2 rows only, OriginalSql = select distinct foo0_."foo_idcolumnname123" as foo_idcolumnname1_35_, foo0_.version as version2_35_, foo0_.foo as foo4_35_, foo0_.long_ as long_5_35_, foo0_."integer__" as integer__6_35_, foo0_.float_ as float_7_35_, foo0_.x as x8_35_, foo0_.double_ as double_9_35_, foo0_.date_ as date_10_35_, foo0_.timestamp_ as timestamp_11_35_, foo0_.boolean_ as boolean_12_35_, foo0_.bool_ as bool_13_35_, foo0_.null_ as null_14_35_, foo0_.short_ as short_15_35_, foo0_.char_ as char_16_35_, foo0_.zero_ as zero_17_35_, foo0_.int_ as int_18_35_, foo0_.string_ as string_19_35_, foo0_.byte_ as byte_20_35_, foo0_.yesno as yesno21_35_, foo0_.blobb_ as blobb_22_35_, foo0_.nullBlob as nullBlob23_35_, foo0_.bin_ as bin_24_35_, foo0_."localeayzabc123" as localeayzabc25_35_, foo0_.first_name as first_name26_35_, foo0_.surname as surname27_35_, foo0_.count_ as count_28_35_, foo0_.name_ as name_29_35_, foo0_.g__ as g__30_35_, foo0_.cmpnt_null_ as cmpnt_null_31_35_, foo0_.subname as subname32_35_, foo0_.fee_sub as fee_sub33_35_, foo0_.null_cmpnt_ as null_cmpnt_34_35_, foo0_1_.joinedProp as joinedProp2_46_, foo0_2_.dependent as dependent2_32_, foo0_.the_time as the_time35_35_, foo0_.baz as baz41_35_, foo0_.bar_string as bar_string36_35_, foo0_.bar_count as bar_count37_35_, foo0_.name as name38_35_, foo0_.clazz as clazz39_35_, foo0_.gen_id as gen_id40_35_, foo0_3_.name_name as name_name2_1_, foo0_.int_/2 as formula0_, foo0_."foo_subclass_1234" as foo_subclass_3_35_ from "foos" foo0_ inner join jointable foo0_1_ on foo0_."foo_idcolumnname123"=foo0_1_.fooid inner join foo_dep_table foo0_2_ on foo0_."foo_idcolumnname123"=foo0_2_.fooid left outer join bar_join_table foo0_3_ on foo0_."foo_idcolumnname123"=foo0_3_.bar_id where foo0_."foo_subclass_1234" in ('F', 'B', 'T') offset ? rows fetch next ? rows only, Error Msg = ORA-00932: inconsistent datatypes: expected - got BLOB
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:498)
... 45 more
similar for ImplicitJoinTest.testImplicitJoinFromExplicitCollectionJoin, which fails with query
Caused by:
Error : 932, Position : 111, Sql = select distinct order0_.ID as ID1_12_, order0_.FK4_FOR_CUSTOMER_TABLE as FK5_12_, order0_.domen as domen2_12_, order0_.fld_number as fld_number3_12_, order0_.FK0_FOR_LINEITEM_TABLE as FK6_12_, order0_.TOTALPRICE as TOTALPRICE4_12_ from ORDER_TABLE order0_ inner join LINEITEM_TABLE lineitems1_ on order0_.ID=lineitems1_.FK1_FOR_ORDER_TABLE where lineitems1_.QUANTITY<2, OriginalSql = select distinct order0_.ID as ID1_12_, order0_.FK4_FOR_CUSTOMER_TABLE as FK5_12_, order0_.domen as domen2_12_, order0_.fld_number as fld_number3_12_, order0_.FK0_FOR_LINEITEM_TABLE as FK6_12_, order0_.TOTALPRICE as TOTALPRICE4_12_ from ORDER_TABLE order0_ inner join LINEITEM_TABLE lineitems1_ on order0_.ID=lineitems1_.FK1_FOR_ORDER_TABLE where lineitems1_.QUANTITY<2, Error Msg = ORA-00932: inconsistent datatypes: expected - got BLOB
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:498)
... 33 more
workaround is to set property hibernate.dialect.oracle.prefer_long_raw=true |