-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sharding
-
Labels:None
Expected:
Mongo m = new Mongo("config");
DBCollection coll = m.getCollection("shard");
DBObject f = coll.findOne();
works. Actual:
~/gitroot/java-driver$ java com.mongodb.Tester
Apr 22, 2009 5:44:58 PM com.mongodb.DBTCP <init>
INFO: 127.0.0.1:27017/config
Exception in thread "main" java.lang.UnsupportedOperationException: can't handle : -1
at com.mongodb.ByteDecoder.decodeNext(ByteDecoder.java:247)
at com.mongodb.ByteDecoder.decodeNext(ByteDecoder.java:232)
at com.mongodb.ByteDecoder.readObject(ByteDecoder.java:104)
at com.mongodb.DBApiLayer$SingleResult.<init>(DBApiLayer.java:534)
at com.mongodb.DBApiLayer$MyCollection.find(DBApiLayer.java:415)
at com.mongodb.DBCollection.findOne(DBCollection.java:258)
at com.mongodb.DBCollection.findOne(DBCollection.java:249)
at com.mongodb.Tester.main(Tester.java:9)
Aaron says to mention that BSONObj clientReadable() const; is the relevant function.