{,…} code : 500 msg : "\n### Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (TPMDATA.EMS_M_DOC_HEAD_PK) violated\n\n### The error may exist in URL [jar:file:/home/itks_mgt/TPM/tpm.jar!/BOOT-INF/classes!/mybatis/business/EmsMDocHeadMapper.xml]\n### The error may involve com.ruoyi.project.business.mapper.EmsMDocHeadMapper.insertEmsMDocHead-Inline\n### The error occurred while setting parameters\n### SQL: insert into tpmdata.ems_m_doc_head ( mt_no, plant_id, start_date, end_date, begin_time, begin_by, status, doc_type, planner_group, schedule_id ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )\n### Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (TPMDATA.EMS_M_DOC_HEAD_PK) violated\n\n; ORA-00001: unique constraint (TPMDATA.EMS_M_DOC_HEAD_PK) violated\n; nested exception is java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (TPMDATA.EMS_M_DOC_HEAD_PK) violated\n" 解析这段报错
时间: 2024-02-10 21:29:12 浏览: 28
这段报错是由于执行数据库更新操作时出现了唯一约束冲突引起的。具体报错信息如下:
```
Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (TPMDATA.EMS_M_DOC_HEAD_PK) violated
The error may exist in URL [jar:file:/home/itks_mgt/TPM/tpm.jar!/BOOT-INF/classes!/mybatis/business/EmsMDocHeadMapper.xml]
The error may involve com.ruoyi.project.business.mapper.EmsMDocHeadMapper.insertEmsMDocHead-Inline
The error occurred while setting parameters
SQL: insert into tpmdata.ems_m_doc_head ( mt_no, plant_id, start_date, end_date, begin_time, begin_by, status, doc_type, planner_group, schedule_id ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (TPMDATA.EMS_M_DOC_HEAD_PK) violated
ORA-00001: unique constraint (TPMDATA.EMS_M_DOC_HEAD_PK) violated
nested exception is java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (TPMDATA.EMS_M_DOC_HEAD_PK) violated
```
其中,报错的原因是由于 `java.sql.SQLIntegrityConstraintViolationException` 引发的,该异常表示违反了数据库的完整性约束。具体的约束名称是 `TPMDATA.EMS_M_DOC_HEAD_PK`,这是一个唯一约束(unique constraint)。报错的SQL语句是一个插入语句,向表 `tpmdata.ems_m_doc_head` 插入数据,但插入的数据违反了该唯一约束。
总结起来,报错的原因是在插入数据时,违反了表 `tpmdata.ems_m_doc_head` 的主键约束,该主键约束要求插入的数据在某个字段上必须是唯一的。