0

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

val query = BSONDocument("_id" -> binId)
val update = BSONDocument(
  "$inc" -> BSONDocument(
    "fieldA" -> 1L
  ))

coll.update(query, update, GetLastError(), upsert = true)

在哪里

binId = BSONBinary(id, UuidSubtype):

我从 reactivemongo 得到异常,它在日志中看起来像这样:

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]

任何提示将不胜感激!

4

1 回答 1

0

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

于 2014-01-17T02:30:26.560 回答