MongoClientFactory and JNDI

296 views
Skip to first unread message

alessandro.m...@gmail.com

unread,
Sep 14, 2016, 7:54:56 PM9/14/16
to mongodb-user
Hi everybody.

I wanted to example the JNDI functionality described here : http://mongodb.github.io/mongo-java-driver/3.3/driver/reference/connecting/jndi/

The problem is that there isn't such class (com.mongodb.client.jndi.MongoClientFactory) inside mongo-java-driver-3.3.0.jar

If I click on the "MongoClientFactory" link/reference (http://api.mongodb.com/java/3.3/?com/mongodb/client/jndi/MongoClientFactory.html) I get a 404 not found.

If I try to accomplish the described procedure, as already figured out, I get this error in WildFly 10 :

10:55:48,055 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 46) WFLYCTL0013: Operation ("add") failed - address: ([
    ("subsystem" => "naming"),
    ("binding" => "java:global/MyMongoClient")
]) - failure description: "WFLYNAM0053: Could not load class com.mongodb.client.jndi.MongoClientFactory from module org.mongodb:main"

So :

Am I missing something ?
Where can I find the complete driver or the version the reference is talking about ?

Thank you in advance for your kind answers.

Greetings
Alessandro Moscatelli  

Jeff Yemin

unread,
Sep 14, 2016, 8:29:58 PM9/14/16
to mongodb-user
Hi Alessandro,

Thanks for bringing this to our attention.  It looks like you have already opened an issue about this in Jira.

You can find the MongoClientFactory in the latest snapshot release, available on Sonatype.


Regards,
Jeff

rab...@redhat.com

unread,
Jun 20, 2017, 1:05:28 AM6/20/17
to mongodb-user
Still not working for me either with the example page at http://mongodb.github.io/mongo-java-driver/3.4/driver/tutorials/jndi/

Jeff Yemin

unread,
Jun 22, 2017, 2:18:17 PM6/22/17
to mongodb-user
@rabreu, can you be more specific about the error you're getting?  Are you getting the exact same error as Alessandro reported?  I wouldn't think so, as Alessandro was testing with a version of the driver that didn't yet support JNDI.





Regards,
Jeff Yemin
Reply all
Reply to author
Forward
0 new messages