[JAVA-1680] Missing Import-Package entries Created: 11/Mar/15  Updated: 11/Mar/15  Resolved: 11/Mar/15

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: 3.0.0
Fix Version/s: None

Type: Bug Priority: Trivial - P5
Reporter: Viktor Stoehr [X] Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: import-package, osgi
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OSGi container (Equinox) using the latest version of BNDTools in Eclipse.


Issue Links:
Duplicate
duplicates JAVA-1673 Missing javax.net.SocketFactory when ... Closed

 Description   

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.



 Comments   
Comment by Jeffrey Yemin [ 11/Mar/15 ]

Looks like this duplicates JAVA-1673.

Generated at Thu Feb 08 08:55:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.