首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

这是主键约束异常吗

2012-09-20 
这是主键约束错误吗?运行程序时,报了下面的错误:Java code### Error updating database.Cause: java.sql.S

这是主键约束错误吗?
运行程序时,报了下面的错误:

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.

热点排行