Sign In Register

How can we help you today?

Start a new topic

Can't find a codec for class com.mongodb.rhino.internal.DateWrapper.

Hello,


I found an issue when using Date() objects in arrays in mongoDB.

To reproduce:

 

var collection = Spark.runtimeCollection("test");
collection.insert({"foo": "foo", "data": [1, null, "string", new Date()]});
var cursor = collection.find({}).limit(1);
var doc;
while(cursor.hasNext())
{
    doc = cursor.next();
}

Spark.setScriptData("doc", doc);

 

Results in the error from the title.

Login to post a comment