vertx-mongo-client
vertx-mongo-client copied to clipboard
Unable to insert JsonObject with BigDecimal attribute in it.
java.lang.IllegalStateException: Unknown BsonType for '-0.0002623000'
at io.vertx.ext.mongo.impl.codec.json.AbstractJsonCodec.writeValue(AbstractJsonCodec.java:83) ~[]
at io.vertx.ext.mongo.impl.codec.json.AbstractJsonCodec.lambda$writeDocument$1(AbstractJsonCodec.java:261) ~[]
I am trying to convert JavaObject to JsonObject and trying to persist in Mongo. I am able to convert JavaObject to JsonObject with the help of JsonObject.mapFrom()
After converting when I try to persist in Mongo, BSONDocument is not supporting BigDecimal.
I have attached maven project to replicate the issue.
The version of the driver you're using? I assume the zip file contains a sample code?
The version of the driver - mongodb-driver-async - 3.10.1 I assume the zip file contains a sample code - Yes. Zip file has sample code. You can replicate the issue
@naveedh27 Can you try again with the latest vertx Mongo client (nightly) - we've swapped to reactive streams and the support should be there now