com.mongodb.MongoException$DuplicateKey: { "serverUsed" : "localhost/ 127.0.0.1:27017" , "connectionId" : 413 , "err" : "insertDocument :: caused by :: 11000 E11000 duplicate key error index: sbtest.sbtest4.$_id_ dup key: { : 1 }" , "code" : 11000 , "n" : 0 , "ok" : 1.0}

Google Groups | 彪 杨 | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    run sysbench-mongodb error

    Google Groups | 3 years ago | 彪 杨
    com.mongodb.MongoException$DuplicateKey: { "serverUsed" : "localhost/ 127.0.0.1:27017" , "connectionId" : 413 , "err" : "insertDocument :: caused by :: 11000 E11000 duplicate key error index: sbtest.sbtest4.$_id_ dup key: { : 1 }" , "code" : 11000 , "n" : 0 , "ok" : 1.0}

    Root Cause Analysis

    1. com.mongodb.MongoException$DuplicateKey

      { "serverUsed" : "localhost/ 127.0.0.1:27017" , "connectionId" : 413 , "err" : "insertDocument :: caused by :: 11000 E11000 duplicate key error index: sbtest.sbtest4.$_id_ dup key: { : 1 }" , "code" : 11000 , "n" : 0 , "ok" : 1.0}

      at com.mongodb.CommandResult.getException()
    2. MongoDB Java Driver
      CommandResult.throwOnError
      1. com.mongodb.CommandResult.getException(CommandResult.java:74)
      2. com.mongodb.CommandResult.throwOnError(CommandResult.java:110)
      2 frames