将BSONBinary写入MongoDB失败,reactivemongo



我正在尝试将数据保存到二进制类型的数据库中。调用是:

val query = BSONDocument("_id" -> binId)
val update = BSONDocument(
  "$inc" -> BSONDocument(
    "fieldA" -> 1L
  ))
coll.update(query, update, GetLastError(), upsert = true)

哪里

binId = BSONBinary(id, UuidSubtype):

我从日志中看起来像这样的反应性mongo中得到异常:

ERROR akka.remote.EndpointWriter ClusterSystem-akka.acto
r.default-dispatcher-3 - Transient association error (association remains live)
java.io.NotSerializableException: reactivemongo.bson.buffer.ArrayReadableBuffer
    at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[na:1.7.0_45]

任何提示将不胜感激!

我发现了问题,这不是来自反应式mongo的消息,而是来自数据库事务之前的akka的消息。基本上是Akka无法序列化BSONBinary以通过网络发送。

最新更新