java.sql.SQLException: ORA-00911: 无效字符 解决方法

时间:2021-10-20 22:49:32
Java链接Oracle数据库,进行查询操作,报如下错误:

java.sql.SQLException: ORA-00911: 无效字符

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:799)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1037)
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:839)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1132)
at oracle.jdbc.driver.OracleStatement.doScrollExecuteCommon(OracleStatement.java:4051)

 

百度了下:网上达人们给出如下解决方法:

 

 原因是:你的sql的结束多了一个";"去掉就可以了

 

自己按照修改了XML文化部,果然OK了。