DBCollection.getIndexInfo() throws "java.lang.IllegalStateException: open" without explanation

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.12.1
    • Component/s: API, Error Handling
    • None
    • Environment:
      Oracle JDK 8, Linux Mint 16 64-bit, MongoDB 2.6.1
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Sometimes... DBCollection.getIndexInfo() simply throws java.lang.IllegalStateException: open without explanation.

      Please handle this case or provide a more detailed exception message.

      BTW, we reuse a MongoClient connection through the lifetime of the application.

      java.lang.IllegalStateException: open
           at org.bson.util.Assertions.isTrue(Assertions.java:36)
           at com.mongodb.DBTCPConnector.isMongosConnection(DBTCPConnector.java:377)
           at com.mongodb.Mongo.isMongosConnection(Mongo.java:645)
           at com.mongodb.DBCursor._check(DBCursor.java:454)
           at com.mongodb.DBCursor._hasNext(DBCursor.java:546)
           at com.mongodb.DBCursor.hasNext(DBCursor.java:571)
           at com.mongodb.DBCollection.getIndexInfo(DBCollection.java:1697)
      

              Assignee:
              Unassigned
              Reporter:
              Hendy Irawan
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: