使用Hibarnate: 出现 java.sql.SQLException: ORA-00911: 无效字符, 解决思路

1. 查看到: Hibernat自动生成的sql查询语句

Hibernate: select * from ( select module0_.MODULE_ID as MODULE_ID1_1_, module0_.CREATE_BY as CREATE_BY2_1_, module0_.CREATE_DEPT as CREATE_DEPT3_1_, module0_.CREATE_TIME as CREATE_TIME4_1_, module0_.UPDATE_BY as UPDATE_BY5_1_, module0_.UPDATE_TIME as UPDATE_TIME6_1_, module0_.BELONG as BELONG7_1_, module0_.CPERMISSION as CPERMISSION8_1_, module0_.CTYPE as CTYPE9_1_, module0_.CURL as CURL10_1_, module0_.CWHICH as CWHICH11_1_, module0_.ICO; as ICO12_1_, module0_.IS_LEAF as IS_LEAF13_1_, module0_.LAYER_NUM as LAYER_NUM14_1_, module0_.NAME as NAME15_1_, module0_.ORDER_NO as ORDER_NO16_1_, module0_.PARENT_ID as PARENT_ID17_1_, module0_.PARENT_NAME as PARENT_NAME18_1_, module0_.QUOTE_NUM as QUOTE_NUM19_1_, module0_.REMARK as REMARK20_1_, module0_.STATE as STATE21_1_ from MODULE_P module0_ ) where rownum <= ?

 

2. 将sql语句放到plsql软件中执行, 就可以找出语句错误地方

 

posted @ 2018-08-23 12:37  Aaron2705  阅读(455)  评论(0编辑  收藏  举报