Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-3245

I'm trying to connect to cluster from my Android application and I always get error "java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/naming/directory/InitialDirContext;" while trying to use connection string

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 3.10.1
    • Connection Management
    • None
    • MongoDb 4, Java version 10, Mongo version 4, java driver for Mongo 3.10.1

    Description

      I'm trying to connect to cluster from my Android application and I always get error "java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/naming/directory/InitialDirContext;" while trying to use connection string. If I try to connect to localhost, then it is connected. Upon research I thought it was dependency issues and even downgraded to 3.9 java version of MongoDb too. Still the issue exists.

      Attachments

        Activity

          People

            jeff.yemin@mongodb.com Jeffrey Yemin
            yugeshwor09@gmail.com Sahil Bhatta
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: