mongodb/mongo-java-driver — pull request #49 by efroese (2011-10-20 14:31:58+00:00)
Title: JAVA-272 - OSGi Manifest is incorrect

Fixes JAVA-272. Using org.mongodb classes fails in an OSGi environment because the bundle does not import javax.net. The bundle will become active but it doesn't have all of the necessary classes available.

Here's the first few lines of the stacktrace when this happens.

The activate method has thrown an exception (java.lang.NoClassDefFoundError: javax/net/SocketFactory) java.lang.NoClassDefFoundError: javax/net/SocketFactory
at com.mongodb.MongoOptions.reset(MongoOptions.java:48)
at com.mongodb.MongoOptions.(MongoOptions.java:29)
at com.mongodb.MongoURI.(MongoURI.java:264)

After this patch this behavior stops and the driver works correctly.