com.mongodb.MongoException: not authorized to create index on

JIRA | Rajesh Sharma | 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

    Issue with unique index - Mongodb

    GitHub | 4 years ago | regis-leray
    java.lang.IllegalArgumentException: Unexpected error reading data set file.
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.mongodb.MongoException

      not authorized to create index on

      at com.mongodb.CommandResult.getException()
    2. MongoDB Java Driver
      DBCollection.createIndex
      1. com.mongodb.CommandResult.getException(CommandResult.java:100)
      2. com.mongodb.CommandResult.throwOnError(CommandResult.java:134)
      3. com.mongodb.DBTCPConnector._checkWriteError(DBTCPConnector.java:142)
      4. com.mongodb.DBTCPConnector.say(DBTCPConnector.java:183)
      5. com.mongodb.DBTCPConnector.say(DBTCPConnector.java:155)
      6. com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:270)
      7. com.mongodb.DBApiLayer$MyCollection.createIndex(DBApiLayer.java:365)
      8. com.mongodb.DBCollection.createIndex(DBCollection.java:484)
      8 frames
    3. com.fitch.financial_statement_api
      NicknameChangeLogDAOTest.tesTTLIndex
      1. com.fitch.financial_statement_api.dao.NicknameChangeLogDAOTest.tesTTLIndex(NicknameChangeLogDAOTest.java:88)
      1 frame