Skip to content

安装时提示java.sql.SQLIntegrityConstraintViolationException: Can't write; duplicate key in table '#sql-10d45_171'错误  #46

@jivaklong

Description

@jivaklong

按视频教程搭建环境 https://www.bilibili.com/video/BV1gs4y187Fg/?spm_id_from=333.999.0.0&vd_source=82d81fb18165953940c055be0287076e
提示下面 错误, sql 是直接导入进去的

2024-03-22 00:52:40.920 [main] DEBUG druid.sql.Statement - {conn-110005, stmt-120031} executed. 33.446482 millis. alter table ACT_ID_MEMBERSHIP
add constraint ACT_FK_MEMB_GROUP
foreign key (GROUP_ID_)
references act_id_group (ID_)
2024-03-22 00:52:40.966 [main] ERROR druid.sql.Statement - {conn-110005, stmt-120032} execute error. alter table act_id_membership
add constraint ACT_FK_MEMB_GROUP
foreign key (GROUP_ID_)
references ACT_ID_GROUP (ID_)
java.sql.SQLIntegrityConstraintViolationException: Can't write; duplicate key in table '#sql-10d45_171'
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:117)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:782)
at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:666)
at com.alibaba.druid.filter.FilterChainImpl.statement_execute(FilterChainImpl.java:2958)
at com.alibaba.druid.filter.FilterAdapter.statement_execute(FilterAdapter.java:2473)
at com.alibaba.druid.filter.FilterEventAdapter.statement_execute(FilterEventAdapter.java:188)
at com.alibaba.druid.filter.FilterChainImpl.statement_execute(FilterChainImpl.java:2956)
at com.alibaba.druid.wall.WallFilter.statement_execute(WallFilter.java:414)
at com.alibaba.druid.filter.FilterChainImpl.statement_execute(FilterChainImpl.java:2956)
at com.alibaba.druid.filter.FilterAdapter.statement_execute(FilterAdapter.java:2473)
at com.alibaba.druid.filter.FilterEventAdapter.statement_execute(FilterEventAdapter.java:188)
at com.alibaba.druid.filter.FilterChainImpl.statement_execute(FilterChainImpl.java:2956)
at com.alibaba.druid.proxy.jdbc.StatementProxyImpl.execute(StatementProxyImpl.java:147)
at com.alibaba.druid.pool.DruidPooledStatement.execute(DruidPooledStatement.java:619)
at org.apache.shardingsphere.shardingjdbc.executor.StatementExecutor$8.execute(StatementExecutor.java:213)
at org.apache.shardingsphere.shardingjdbc.executor.StatementExecutor$12.executeSQL(StatementExecutor.java:275)
at org.apache.shardingsphere.shardingjdbc.executor.StatementExecutor$12.executeSQL(StatementExecutor.java:271)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions