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

Posted Aaron2705

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了使用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软件中执行, 就可以找出语句错误地方

 

以上是关于使用Hibarnate: 出现 java.sql.SQLException: ORA-00911: 无效字符, 解决思路的主要内容,如果未能解决你的问题,请参考以下文章

在使用JDBC连接数据库是出现java.sql.SQLException: No value specified for parameter 1

MySQL 本地sql查询 使用函数出现不可理解的错误

java.sql.SQLException: ORA-00604: 递归 SQL 级别 1 出现错误 ORA-01003: 语句未进行语法分析

为啥我的 JDBC SQLite 数据库中的“@”附近出现 java.sql.SQLException?

java.sql.SQLException:侦听器拒绝连接并出现以下错误:ORA-12505

hibernate 出现Caused by: java.sql.SQLException: Column 'id' not found.异常