ora-00001

Where can I find a complete list of predefined Oracle pl/SQL Exceptions?

女生的网名这么多〃 提交于 2019-12-03 03:41:58
问题 Where can I find a full list of all predefined Oracle pl/SQL Exceptions? In this link i found this list, are there anymore? ACCESS_INTO_NULL ORA-06530 CASE_NOT_FOUND ORA-06592 COLLECTION_IS_NULL ORA-06531 CURSOR_ALREADY_OPEN ORA-06511 DUP_VAL_ON_INDEX ORA-00001 INVALID_CURSOR ORA-01001 INVALID_NUMBER ORA-01722 LOGIN_DENIED ORA-01017 NO_DATA_FOUND ORA-01403 NOT_LOGGED_ON ORA-01012 PROGRAM_ERROR ORA-06501 ROWTYPE_MISMATCH ORA-06504 SELF_IS_NULL ORA-30625 STORAGE_ERROR ORA-06500 SUBSCRIPT_BEYOND

捕获“ORA-00001: 违反唯一约束条件”异常并抛出业务相关的错误信息

荒凉一梦 提交于 2019-11-30 00:43:18
1.背景:T表F字段唯一索引,保存F字段重复的数据后台异常(附后),不做处理MVC框架包装异常后,前台显示"Could not execute JDBC batch update; nested exception is org.hibernate.exception...",报错信息不友好,故主动捕获后跑出友好业务相关信息"XXXXXXXXXX重复"。 2.框架:Hibernate+Spring+公司MVC。 3.异常详情: Could not execute JDBC batch update; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at org.springframework.orm

How to automatically generate identity for an Oracle database through Entity framework?

懵懂的女人 提交于 2019-11-28 23:37:12
I'm using Oracle provider for Entity framework (beta), and I'm facing a problem. Our tables have Id columns, which are set to be Identity in StoreGeneratedPattern. I thought that EF will automatically do "underlying works", such as create sequences, and get new identity for each record I add to the table. But when I run code to add a new record, such as: var comment = new Comment { ComplaintId = _currentComplaintId, Content = CommentContent.Text, CreatedBy = CurrentUser.UserID, CreatedDate = DateTime.Now }; context.Comments.AddObject(comment); context.SaveChanges(); an Exception still throws,

Java - find the first cause of an exception

最后都变了- 提交于 2019-11-28 07:12:46
I need to check if an exception is caused by some database problem. I receive an Exception and check if its cause contains the "ORA" string and return that (something like "ORA-00001"). The problem here is that the exception I receive is nested inside other exceptions, so if I don't find out if it's an oracle exception, I have to check into the cause of that exception and so on. Is there a cleaner way to do this? Is there a way to know the first cause (the deep-nested exception) of a given exception? My current code looks like this: private String getErrorOracle(Throwable e){ final String

Java - find the first cause of an exception

廉价感情. 提交于 2019-11-27 01:46:25
问题 I need to check if an exception is caused by some database problem. I receive an Exception and check if its cause contains the "ORA" string and return that (something like "ORA-00001"). The problem here is that the exception I receive is nested inside other exceptions, so if I don't find out if it's an oracle exception, I have to check into the cause of that exception and so on. Is there a cleaner way to do this? Is there a way to know the first cause (the deep-nested exception) of a given