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

Missing Import-Package entries

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: 3.0.0
    • Component/s: None
    • Environment:
      OSGi container (Equinox) using the latest version of BNDTools in Eclipse.

      Because the java driver is shipped with correct manifest headers to run the driver as a bundle in an OSGi container, I dropped it into my local repository in BNDTools and started to write some code:

      try (MongoClient mongoClient = new MongoClient( "localhost" , 27017 )) {
      ...
      }
      

      The result was suppringing becasue I end up with an error stating that no class definition was found for javax.net.SocketFactory.

      A look into the driver's manifest revealed the missing Import-Package entry for the package "javax.net". After manually adding this entry to the manifest I got the same error for javax.management.ObjectName.

      So, for my currently very simple needs, it is enough to add additional Import-Package entries javax.net and javax.management.

      Read more about this topic.

            Assignee:
            Unassigned Unassigned
            Reporter:
            Viktor Stoehr Viktor Stoehr [X]
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: