我正在使用scalatest-embedMongo作为 Scala 应用程序的内存版本的 mongoDB。我目前已将我的 reactivemongo 驱动程序从 0.10.x 版本升级到 0.11.5 版本。scalatest -embedMongo与以前版本的响应式 mongo scala 驱动程序一起工作正常,但是随着响应式 mongo 驱动程序的升级版本,WriteResult Future 总是返回一个包含来自 reactiveMongo 驱动程序 API 的 ArrayIndexOutOfBounds 的失败。我对这个新的例外感到困惑。
这是整个堆栈跟踪:
java.lang.ArrayIndexOutOfBoundsException: 123
at org.jboss.netty.buffer.LittleEndianHeapChannelBuffer.getInt(LittleEndianHeapChannelBuffer.java:69)
at reactivemongo.api.SerializationPack$class.readAndDeserialize(serializationpack.scala:31)
at reactivemongo.api.BSONSerializationPack$.readAndDeserialize(serializationpack.scala:41)
at reactivemongo.api.collections.GenericCollection$$anonfun$update$1$$anonfun$apply$14.apply(genericcollection.scala:314)
at reactivemongo.api.collections.GenericCollection$$anonfun$update$1$$anonfun$apply$14.apply(genericcollection.scala:313)
at scala.util.Success$$anonfun$map$1.apply(Try.scala:206)
at scala.util.Try$.apply(Try.scala:161)
at scala.util.Success.map(Try.scala:206)
at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235)
at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235)
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
at scala.concurrent.impl.ExecutionContextImpl$$anon$3.exec(ExecutionContextImpl.scala:107)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
提前致谢!!