Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-7486

mongo-srv schema doesn't work in OSGi

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.0
    • Fix Version/s: 1.10.0, 1.9.10
    • Component/s: documentmk, mongomk
    • Labels:
      None

      Description

      The mongo-java-driver 3.6.x introduces a new URI schema support, which allows to reduce the length of the MongoDB Atlas connection string: mongo-srv. However, it doesn't work in the OSGi environment. Following exception is logged when trying to use mongo-srv URIs:

      08.05.2018 13:18:51.063 *ERROR* [FelixStartLevel] org.apache.jackrabbit.oak-store-document bundle org.apache.jackrabbit.oak-store-document:1.9.0 (108)[org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService(224)] : The activate method has thrown an exception (java.lang.NoClassDefFoundError: javax/naming/NamingException)
      java.lang.NoClassDefFoundError: javax/naming/NamingException
              at com.mongodb.ConnectionString.<init>(ConnectionString.java:321) [org.mongodb.mongo-java-driver:3.6.3]
              at com.mongodb.MongoClientURI.<init>(MongoClientURI.java:234) [org.mongodb.mongo-java-driver:3.6.3]
              at com.mongodb.MongoClientURI.<init>(MongoClientURI.java:216) [org.mongodb.mongo-java-driver:3.6.3]
              at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.registerNodeStore(DocumentNodeStoreService.java:279) [org.apache.jackrabbit.oak-store-document:1.9.0]
              at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.registerNodeStoreIfPossible(DocumentNodeStoreService.java:252) [org.apache.jackrabbit.oak-store-document:1.9.0]
              at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.activate(DocumentNodeStoreService.java:236) [org.apache.jackrabbit.oak-store-document:1.9.0]
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mreutegg Marcel Reutegger
                Reporter:
                tomek.rekawek Tomek Rękawek
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: