Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-1251

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

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 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

      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 Unassigned
            Reporter:
            ceefour Hendy Irawan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: