我正在使用 Oracle 数据库。我们在调用我们的服务时经常看到失败。当我查看日志时,我在表上看到以下异常
java.sql.BatchUpdateException:ORA-00001:违反了唯一约束 (DBSCHEMA.IDX_CO_DETAILS)。
我检查了表上的索引以获取索引名称 DBSCHEMA.IDX_CO_DETAILS 。
它不包括任何列(INCLUDE_COLUMN 为空)。我怎么知道这个约束是为了什么?是主键约束吗?
我们将休眠用于 ORM。下面是休眠上下文中的回溯
Caused by: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:365)