最近使用Oracle时老是遇到java.sql.SQLException错误,害得我在网上查得累死累活的,所以一口气查了一下几个常见的,在此列了列.英文是来自官方的,用中文简单翻译了一下,有一些实在不知道怎么翻译,也没有尝试重现,所以将英文原文一并列出,供有需要的人查阅!
ORA-00904:    invalid column name 无效列名
ORA-00942:  table or view does not exist 表或者视图不存在
ORA-01400:  cannot insert NULL into () 不能将空值插入
ORA-00936: 缺少表达式
ORA-00933: SQL 命令未正确结束
ORA-01722: 无效数字:(一般可能是企图将字符串类型的值填入数字型而造成)
ORA-06530: ACCESS_INTO_NULL 
Your program attempts to assign values to the attributes of an uninitialized (atomically null) object.
企图将值写入未初化对象的属性
ORA-06592: CASE_NOT_FOUND
None of the choices in the WHEN clauses of a CASE statement is selected, and there is no ELSE clause.
case语句格式有误,没有分支语句
ORA-06531: COLLECTION_IS_NULL
Your program attempts to apply collection methods other than EXISTS to an uninitialized (atomically null) 
nested table or varray, or the program attempts to assign values to the elements of an uninitialized nested 
table or varray.
企图将集合填入未初始化的嵌套表中
ORA-06511: CURSOR_ALREADY_OPEN
Your program attempts to open an already open cursor. A cursor must be closed before it can be reopened. A
cursor FOR loop automatically opens the cursor to which it refers. So, your program cannot open that cursor
inside the loop.
企图打开已经打开的指针.指针已经打开,要再次打开必须先关闭.
ORA-00001: DUP_VAL_ON_INDEX
Your program attempts to store duplicate values in a database column that is constrained by a unique index.
数据库字段存储重复,主键唯一值冲突
ORA-01001: INVALID_CURSOR 无效指针
Your program attempts an illegal cursor operation such as closing an unopened cursor.
非法指针操作,例如关闭未打开的指针
ORA-01722: INVALID_NUMBER 无效数字
In a SQL statement, the conversion of a character string into a number fails because the string does not 
represent a valid number. (In procedural statements, VALUE_ERROR is raised.) This exception is also raised 
when the LIMIT-clause expression in a bulk FETCH statement does not evaluate to a positive number.
在sql语句中,字符数字类型转换错误,无法将字符串转化成有效数字.此错误也可能因为在limit从句表达式中fetch语句无法对应指定数字
ORA-01017: LOGIN_DENIED 拒绝访问
Your program attempts to log on to Oracle with an invalid username and/or password.
企图用无效的用户名或密码登录oracle
ORA-01403: NO_DATA_FOUND 无数据发现
A SELECT INTO statement returns no rows, or your program references a deleted element in a nested table or 
an uninitialized element in an index-by table. SQL aggregate functions such as AVG and SUM always return a 
value or a null. So, a SELECT INTO statement that calls an aggregate function never raises NO_DATA_FOUND. 
The FETCH statement is expected to return no rows eventually, so when that happens, no exception is raised.

ORA-01012: NOT_LOGGED_ON   未登录
Your program issues a database call without being connected to Oracle.
程序发送数据库命令,但未与oracle建立连接

ORA-06501: PROGRAM_ERROR 程序错误
PL/SQL has an internal problem.
pl/sql系统问题

ORA-06504: ROWTYPE_MISMATCH 行类型不匹配
The host cursor variable and PL/SQL cursor variable involved in an assignment have incompatible return types. 
For example, when an open host cursor variable is passed to a stored subprogram, the return types of the 
actual and formal parameters must be compatible.

ORA-30625: SELF_IS_NULL 
Your program attempts to call a MEMBER method on a null instance. That is, the built-in parameter SELF 
(which is always the first parameter passed to a MEMBER method) is null.

ORA-06500: STORAGE_ERROR 存储错误
PL/SQL runs out of memory or memory has been corrupted.
PL/SQL运行内存溢出或内存冲突
      
ORA-06533: SUBSCRIPT_BEYOND_COUNT   子句超出数量
Your program references a nested table or varray element using an index number larger than the number of 
elements in the collection.

ORA-06532: SUBSCRIPT_OUTSIDE_LIMIT   子句非法数量
Your program references a nested table or varray element using an index number (-1 for example) that is 
outside the legal range.

ORA-01410: SYS_INVALID_ROWID   无效的字段名
The conversion of a character string into a universal rowid fails because the character string does not 
represent a valid rowid.

ORA-00051: TIMEOUT_ON_RESOURCE    资源等待超时
A time-out occurs while Oracle is waiting for a resource.

ORA-01422: TOO_MANY_ROWS    返回超过一行
A SELECT INTO statement returns more than one row.

ORA-06502: VALUE_ERROR   值错误
An arithmetic, conversion, truncation, or size-constraint error occurs. For example, when your program selects 
a column value into a character variable, if the value is longer than the declared length of the variable, 
PL/SQL aborts the assignment and raises VALUE_ERROR. In procedural statements, VALUE_ERROR is raised if the 
conversion of a character string into a number fails. (In SQL statements, INVALID_NUMBER is raised.)

ORA-01476: ZERO_DIVIDE 除0错误

本文转自enables 51CTO博客,原文链接:http://blog.51cto.com/niuzu/551434,如需转载请自行联系原作者

Oracle关于java.sql.SQLException常见错误集锦相关推荐

  1. nslang oracle_解决ojdbc14连接oracle报“java.sql.SQLException: Io 异常: Size Data Unit (SDU) mismatch”异常问题...

    一.前言 通过ojdbc14.jar连接oracle数据库,应用运行期间报出"java.sql.SQLException: Io 异常: Size Data Unit (SDU) misma ...

  2. oracle错误(一) ORA-各种常见java.sql.SQLException小结

    ORA-00904: --invalid column name 无效列名ORA-00942: --table or view does not exist 表或者视图不存在ORA-01400: -- ...

  3. oracle ora-各种常见java.sql.SQLException归结

    oracle ora-各种常见java.sql.SQLException归纳 java.sql.SQLException错误! ORA-00904:     --invalid column name ...

  4. ORACLE各种常见java.sql.SQLException归纳

    java.sql.SQLException错误! ORA-00904:     --invalid column name 无效列名 ORA-00942: --table or view does n ...

  5. oracle ora-各种常见java.sql.SQLException归纳

    va.sql.SQLException错误! ORA-00904:     --invalid column name 无效列名 ORA-00942: --table or view does not ...

  6. java.sql.SQLException错误

    java.sql.SQLException错误! ORA-00904: –invalid column name 无效列名 ORA-00942: –table or view does not exi ...

  7. kettle [表输入]选择Oracle数据源时预览错误--需要指定一个数据库连接.、错误初始化步骤[表输入 2]、Caused by: java.sql.SQLException: ORA-0091

    错误产生环境 使用kettle [输入-表输入-数据源为Oracel 时] 预览出现错误 错误描述 2022/10/10 16:53:39 - 表输入 2.0 - at org.pentaho.di. ...

  8. JAVA编程常见错误集锦

    本文转自:http://hi.baidu.com/zzcc_8/blog/item/23f83a43dda0611f72f05d02.html 项目中遇到的错误(c9bcf64c) sql错误 找不到 ...

  9. [转载]“java.sql.SQLException:指定了无效的 Oracle URL”

    原文地址:"java.sql.SQLException:指定了无效的 Oracle URL"作者:康愚 昨天晚上用MyEclipse连接Oracle,出现了" java. ...

最新文章

  1. python服务器消息分发_Python实现分发数据块到多台服务器上
  2. 什么样的对象会进入老年代
  3. 学知识的时候出去看看的意义
  4. Thread源码分析之join方法
  5. Linux lvs 多端口组成
  6. IScroll5中文API整理,用法与参考
  7. 整理的一些比较基础的面试知识点
  8. Python 类的属性和实例属性 Python 的动态语言
  9. Unity网络--HLAPI(2):Unity HLAPI NetworkManager与NetworkBehaviour的回调函数
  10. 给模型添加ORM,与持久化记录
  11. 蓝桥杯 ADV-154 算法提高 质数的后代
  12. 判断回文(0315)SWUST-OJ
  13. 什么是动态代理?两种常用的动态代理方式
  14. 也谈说话这件事--《好好说话》读后感
  15. 一文搞懂保险的前世今生,说实话,每个人其实都需要保险
  16. Python学习日志12 - 办公自动化
  17. IDEA设置自动生成注释模板
  18. 百万美元“未来科技大奖”揭晓:山东大学彭实戈教授荣获数学与计算机科学奖-547。
  19. 《信号与系统》(吴京)部分课后习题答案与解析——第三章(离散LTI系统的时域分析)
  20. 华硕java安装教程win10_华硕骁龙835笔记本安装win10系统操作教程

热门文章

  1. 在浏览器上浏览vue项目,后退按钮是可以正常返回上一页的,但打包成app后,点击手机上的物理返回按钮就直接退出app回到桌面...
  2. 【sql】牛客网练习题 (共 61 题)
  3. Kibana安装及简单使用
  4. 浏览器加载和渲染html的顺序
  5. hdu 1175 连连看
  6. HDUOJ-----Brave Game
  7. 客户跟进节奏(转至索菲外贸日记)
  8. 产品问答 | 3-5年的PM,如何提升竞争力?
  9. 互联网公司败局汇总,这些公司都是怎么死的?(上篇)
  10. 限免 | PMCAFF 产品经理第一课,面向3-5年产品经理,全面提升产品能力