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

issue reported where certain types of map functions can't be parsed by java driver

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.1
    • Affects Version/s: None
    • Component/s: None
    • None

      Eval JS Function = mc={m:function () { emit(

      {hid:this.hid}

      , this.vt); }}
      Exception in thread "main" java.lang.UnsupportedOperationException: can't handle CODE yet
      at org.bson.BSONDecoder.decodeElement(BSONDecoder.java:165)
      at org.bson.BSONDecoder.decodeElement(BSONDecoder.java:181)
      at org.bson.BSONDecoder.decode(BSONDecoder.java:71)
      at org.bson.BSONDecoder.decode(BSONDecoder.java:55)
      at org.bson.BSONDecoder.decode(BSONDecoder.java:42)
      at com.mongodb.Response.<init>(Response.java:70)
      at com.mongodb.DBPort.go(DBPort.java:81)
      at com.mongodb.DBPort.call(DBPort.java:57)
      at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:181)
      at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:277)
      at com.mongodb.DBCollection.findOne(DBCollection.java:366)
      at com.mongodb.DBCollection.findOne(DBCollection.java:355)
      at com.mongodb.DB.command(DB.java:135)
      at com.mongodb.DB.doEval(DB.java:148)
      at com.mongodb.DB.eval(DB.java:157)
      ...

      Adding another statement before emit worked.

      mc={m:function() {var test=""; emit(

      {hid:this.hid}

      , this.vt);}}

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: