-
Type: Bug
-
Resolution: Duplicate
-
Priority: 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.
- duplicates
-
JAVA-1673 Missing javax.net.SocketFactory when running in OSGi
- Closed