[DOCS-16093] JNDI documentation still refers to legacy java driver Created: 02/May/23  Updated: 07/Dec/23  Resolved: 07/Dec/23

Status: Closed
Project: Documentation
Component/s: drivers
Affects Version/s: 4.3.5, 4.5.1, 4.6.0, 4.4.1, 4.7.0, 4.8.0, 4.9.0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Jason McLaren Assignee: Jordan Smith
Resolution: Done Votes: 0
Labels: bug
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 10 weeks, 2 days ago
Epic Link: DOCSP-8754

 Description   

The page "Connect to MongoDB Using a JNDI Datasource" refers to files or code from the legacy Java driver in a couple of places:

  1. Both the Wildfly and Tomcat instructions say to copy the `mongo-java-driver.jar` file, which was replaced by `mongodb-driver-sync.jar`. For Tomcat at least, there are several other .jar files that need to be copied since this is not an uber jar anymore. (I'm not sure this is a complete list – it doesn't work for me yet.)
    1. mongodb-driver-sync-VERSION.jar
    2. mongodb-driver-core-VERSION.jar
    3. slf4j-api-VERSION.jar
    4. slf4j-log4j12-VERSION.jar
    5. log4j-VERSION.jar
    6. bson-VERSION.jar
    7. bson-record-codec-VERSION.jar
  2. The Tomcat instructions for the `<Resource>` entity specifies the non-legacy factory `com.mongodb.client.MongoClientFactory`, but the legacy resource type `com.mongodb.MongoClient` (I believe this resource type should be `com.mongodb.client.MongoClient`.)

 

This change applies to all documented versions of the Java documentation

 

A/C:

As a user, I can find up to date information on the dependencies needed to connect to JNDI.



 Comments   
Comment by Jordan Smith [ 28/Nov/23 ]

https://github.com/mongodb/docs-java/pull/489

Comment by Mike Woofter [ 01/Sep/23 ]

Per Jeff, "slf4j and log4j shouldn’t need to be mentioned, since they were not part of the mongo-java-driver uber jar.  The rest look right."

Generated at Thu Feb 08 08:14:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.