当前位置: 代码迷 >> Oracle开发 >> 这是主键约束异常吗
  详细解决方案

这是主键约束异常吗

热度:103   发布时间:2016-04-24 07:21:50.0
这是主键约束错误吗?
运行程序时,报了下面的错误:
Java code
### Error updating database.  Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: Message 1 not found; No message file for product=RDBMS, facility=ORA; arguments: [OCMP] [FUNC_LEVEL_PK]### The error occurred while setting parameters### Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: Message 1 not found; No message file for product=RDBMS, facility=ORA; arguments: [OCMP] [FUNC_LEVEL_PK]com.octon.oft.dal.dao.DaoException: org.apache.ibatis.exceptions.PersistenceException: ### Error updating database.  Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: Message 1 not found; No message file for product=RDBMS, facility=ORA; arguments: [OCMP] [FUNC_LEVEL_PK]### The error occurred while setting parameters### Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: Message 1 not found; No message file for product=RDBMS, facility=ORA; arguments: [OCMP] [FUNC_LEVEL_PK]


这是什么错误啊,跟平时的主键约束错误类型不太一样
求解,先谢谢各位了。。

------解决方案--------------------
违反唯一性约束,插入了两条相同的记录。
------解决方案--------------------
键值重复,查看PK,看看是否已存在。
------解决方案--------------------
刚查了一下ORA-00001错误,应该就是违反唯一约束的错误。

unique constraint (string.string) violated

Cause: An UPDATE or INSERT statement attempted to insert a duplicate key. For Trusted Oracle configured in DBMS MAC mode, you may see this message if a duplicate entry exists at a different level.

Action: Either remove the unique restriction or do not insert the key.

  相关解决方案