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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by janbartel
, 6 months ago
not authorized to create index on HttpSessions.jettySessions
via Google Groups by MeBigFatGuy, 2 years ago
can only have 1 index plugin / bad index key pattern
com.mongodb.MongoException: not authorized to create index on
at com.mongodb.CommandResult.getException(CommandResult.java:100)
at com.mongodb.CommandResult.throwOnError(CommandResult.java:134)
at com.mongodb.DBTCPConnector._checkWriteError(DBTCPConnector.java:142)
at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:183)
at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:155)
at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:270)
at com.mongodb.DBApiLayer$MyCollection.createIndex(DBApiLayer.java:365)
at com.mongodb.DBCollection.createIndex(DBCollection.java:484)
at com.fitch.financial_statement_api.dao.NicknameChangeLogDAOTest.tesTTLIndex(NicknameChangeLogDAOTest.java:88)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Know the solutions? Share your knowledge to help other developers to debug faster.