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

New mongo-srv schema doesn't work in OSGi environment

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.8.0
    • Affects Version/s: 3.6.3
    • Component/s: Connection Management
    • None

      When using the mongo-srv schema in OSGi environment, following exception is logged:

      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]
      

      It's caused by the fact that the DnsResolver class uses types from the javax.naming package, but the package itself isn't listed in the Import-Package section of the manifest.

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            tomek Tomek R?kawek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: