I'm trying to query Mongocollection from
Java Program. Connection is LDAP. Everything looks OK, till I create a MongoCursor object. But at the line where MongoCursor object is created, I'm getting socket exception as follows
INFO: Closed connection [connectionId{localValue:2}] to "Host:Port" because there was a socket exception raised by this connection.
Message-Exception authenticating MongoCredential{mechanism=PLAIN, userName='uname', source='dbname', password=hidden, mechanismProperties={}}
I'm wondering, Am I following the right way to query a collection, to retrieve documents (here I'm using 'create date' criteria). Why Am I getting socket excpetion?
Here is what I tried so far-