简体   繁体   中英

How do I upgrade the MongoDB driver in a Kogito Quarkus project?

I'm new to Kogito and Quarkus, so help me a little bit here.

Our application has been recently affected by this bug:

https://jira.mongodb.org/browse/JAVA-4018

Now I want to upgrade the Mongo DB driver version to use the version with the fix but I'm not sure where do I need to do that.

I see these two in the pom.xml:

<project>
  ...
  <dependencies>
    ...
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-mongodb-client</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-addons-quarkus-persistence-mongodb</artifactId>
    </dependency>
  </dependencies>
</project>

But I'm not sure if I should look for the driver referenced by these dependencies and then add the version tag for any of them...

Can you point me the direction where I need to look to upgrade the driver version?

Which Kogito version are you using? The latest Kogito Quarkus version already uses the latest MongoDB driver :

[INFO] ----< org.kie.kogito.examples:process-mongodb-persistence-quarkus >-----
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ process-mongodb-persistence-quarkus ---
[INFO] org.kie.kogito.examples:process-mongodb-persistence-quarkus:jar:2.0.0-SNAPSHOT
[INFO] +- org.kie.kogito:kogito-addons-quarkus-persistence-mongodb:jar:2.0.0-SNAPSHOT:compile
[INFO] |  +- org.kie.kogito:kogito-addons-persistence-mongodb:jar:2.0.0-SNAPSHOT:compile
[INFO] |  \- io.quarkus:quarkus-mongodb-client:jar:2.13.0.Final:compile
[INFO] |     +- org.mongodb:mongodb-driver-sync:jar:4.7.1:compile
[INFO] |     |  +- org.mongodb:bson:jar:4.7.1:compile
[INFO] |     |  \- org.mongodb:mongodb-driver-core:jar:4.7.1:compile
[INFO] |     |     \- org.mongodb:bson-record-codec:jar:4.7.1:runtime
[INFO] |     +- org.mongodb:mongodb-driver-reactivestreams:jar:4.7.1:compile
[INFO] |     \- org.mongodb:mongodb-crypt:jar:1.5.2:compile
[INFO] |  |  +- org.testcontainers:mongodb:jar:1.17.3:test

Can you try upgrading to Kogito 1.27.0.Final?

MongoDB 4.7.1 includes the fix you're looking for .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM