java.sql.SQLException: ORA-00911…
来源:互联网 发布:qq三国软件模式 编辑:程序博客网 时间:2024/06/03 14:49
控制台抛出这个异常:java.sql.SQLException: ORA-00911: invalidcharacter
查了一下说是oracle字符集设置的问题。我将抛异常的SQL语句在控制台输出如下:
select count(t.id) as onerowc,t.id as areatravelid ,b.id asairpotid from base_areatravel t inner join base_airpot b onb.areaid=t.id group by t.id ,b.id;
以上是完完整整的输出结果,然后我将语句复制到PL/SQL中执行是完全可以的,没有任何异常的。。
而我在程序中定义的sql如下:
String sql="select count(t.id) as onerowc,t.id as areatravelid,b.id as airpotid from base_areatravel t"+
呵呵,花费了半个多小时终于找到原因::::
哈哈,,定义语句中sql后面多了一个分号。(“;”)晕菜。。这样的话在PL/SQL中是无所谓的,可是Java的数据库驱动却不识别这样的语句了。汗,,,太大意了。记录下来防止再次犯错,呵呵。。。
0 0
- java.sql.SQLException: ORA-00911…
- java.sql.SQLException: ORA-00911: 无效字符
- java.sql.SQLException: ORA-00911: 无效字符
- java.sql.SQLException: ORA-00911: 无效字符
- java.sql.SQLException: ORA-00911: 无效字符
- java.sql.SQLException: ORA-00911: invalid character
- java.sql.SQLException: ORA-00911: 无效字符
- java.sql.SQLException: ORA-00911: invalid character
- java.sql.SQLException: ORA-00911: 无效字符
- java.sql.SQLException: ORA-00911: 无效字符
- java.sql.SQLException: ORA-00911: 无效字符
- java.sql.SQLException: ORA-00911: 无效字符
- java.sql.SQLException: ORA-08102
- java.sql.SQLException: ORA-01428
- java.sql.SQLException: ORA-01841
- java.sql.SQLException: ORA-00911: 无效字符 解决方法
- java.sql.SQLException: ORA-00911: invalid character 解决方法
- java.sql.SQLException: ORA-00911: invalid character 解决方法
- Struts2 中后台属性值带有的HTML标…
- url中文乱码解决大全
- 如何在struts2配置文件xml的…
- ORA-01790 错误处理
- oracle10g中,如何给开发用户授予d…
- java.sql.SQLException: ORA-00911…
- struts2 s:select 标签
- struts2中<s:if>标签
- struts2配置文件中参数的传递
- <s:checkbox> fieldValue取值问题
- 如何让日志文件写到相对路径中
- jQuery获取,设置下拉框的值
- linux中Cron定时任务系统命令详解
- Mysql与Oracle区别