2019-03-10 10:12:48.829 INFO 6488 — [0.1-2700-exec-7] o.h.h.i.QueryTranslatorFactoryInitiator : HHH000397: Using ASTQueryTranslatorFactory
Hibernate: select businessau0_.id as id1_0_, businessau0_.actiontable as actiontable2_0_, businessau0_.actiontype as actiontype3_0_, businessau0_.actiontime as actiontime4_0_, businessau0_.datadescription as datadescription5_0_, businessau0_.description as description6_0_, businessau0_.msgtype as msgtype7_0_, businessau0_.opaicaocd as opaicaocd8_0_, businessau0_.primarykey as primarykey9_0_, businessau0_.rolename as rolename10_0_, businessau0_.username as username11_0_, businessau0_.workernumber as workernumber12_0_ from businessaudit businessau0_ where 1=1 order by businessau0_.actiontime desc fetch first ? rows only
2019-03-10 10:12:49.167 WARN 6488 — [0.1-2700-exec-7] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 933, SQLState: 42000
2019-03-10 10:12:49.168 ERROR 6488 — [0.1-2700-exec-7] o.h.engine.jdbc.spi.SqlExceptionHelper : ORA-00933: SQL 命令未正确结束

Oracle采用分页查询的时候,需要选择正确的数据库方言。

1、JPA默认情况下使用的数据库方言是SQLServer语法
2、oracle 11g 和12c 的数据库方言不同:
12c方言:dialect: org.hibernate.dialect.Oracle12cDialect
11g方言:dialect:
org.hibernate.dialect.Oracle10gDialect

更多推荐

四、Oracle 数据库方言选择: