vert-x3 / vertx-mongo-client

Mongo Client for Eclipse Vert.x
http://vertx.io
Apache License 2.0
58 stars 98 forks source link

CodecConfigurationException on uploading nested metadata to GridFS #291

Closed muthenberg closed 10 months ago

muthenberg commented 1 year ago

Version

I tried on Vert.x Version 4.3.2 and 4.3.3

Context

When uploading a file to GridFS using the Vert.x Client I get org.bson.codecs.configuration.CodecConfigurationException: Can't find a codec for class java.util.LinkedHashMap$Entry.. This seems to be caused by providing nested JSON metadata in the form of new JsonObject().put("test", new JsonObject().put("test", "test")).

Do you have a reproducer?

A reproducer is a simple project hosted on GitHub (or another forge supporting git clone operation) that has a build file that can be executed to reproduce the issue.

Reproducers are very helpful for contributors and will likely help them fixing your bug faster.

Steps to reproduce

  1. Clone the reproducer
  2. Start a fresh empty Mongo Database (I used Version 5.0.12) with no authentication. I usually use the Mongo Docker Image.
  3. Run either JavaTest or AppTest from the reproducer

Extra

muthenberg commented 1 year ago

Hm. If I update the mongo-driver-core and mongo-driver-reactivestreams to 4.7.1 manually it starts to work again. It seems there is an issue with the current dependency version (4.2.1).

tsegismont commented 10 months ago

Fixed by 4d4f07f