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.


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;
    doc =;

Spark.setScriptData("doc", doc);


Results in the error from the title.

Login to post a comment