Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to insert JsonObject with BigDecimal attribute in it. #223

Open
naveedh27 opened this issue Jan 30, 2020 · 3 comments
Open

Unable to insert JsonObject with BigDecimal attribute in it. #223

naveedh27 opened this issue Jan 30, 2020 · 3 comments

Comments

@naveedh27
Copy link

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) ~[]

mongotest.zip

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.

@karianna
Copy link
Contributor

The version of the driver you're using? I assume the zip file contains a sample code?

@naveedh27
Copy link
Author

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

@karianna
Copy link
Contributor

@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

@karianna karianna removed this from the 4.0.0 milestone May 12, 2020
@karianna karianna removed the question label May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants