Now it just means that you have to install both BlueCove bundles ;) I would suggest you not to use "raw" Felix, but rather use Karaf which makes use of Felix and adds some nice features around it. Also it is very easy to package a full product with Karaf.
JP -----Message d'origine----- De : imo [mailto:[email protected]] Envoyé : jeudi 10 mars 2016 11:07 À : [email protected] Objet : RE: Felix+Bkuetooth: Missing requirement? I have restart all the process but again without success I created a new bundle project from the ground up (netbeans, ubuntu) File , new maven osgi bundle, name=Bundle1 Added some printlns to activator… public class Activator implements BundleActivator { public void start(BundleContext context) throws Exception { System.out.println("Starting bundle"); } public void stop(BundleContext context) throws Exception { System.out.println("Stopping bundle"); } } and build... Then, i openned gogo console: sudo java -jar bin/felix.jar and: g! install file:/home/user1/NetBeansProjects/bundle1/target/bundle1-1.0-SNAPSHOT.jar Bundle ID: 30 g! start 30 Starting bundle g! OK! Now, I have just added BlueCove support: In the pom.xml I added: <dependency> <groupId>net.sf.bluecove</groupId> <artifactId>bluecove</artifactId> <version>2.1.0</version> </dependency> <dependency> <groupId>net.sf.bluecove</groupId> <artifactId>bluecove-gpl</artifactId> <version>2.1.0</version> </dependency> then build and: g! uninstall 30 Stopping bundle g! install file:/home/user1/NetBeansProjects/bundle1/target/bundle1-1.0-SNAPSHOT.jar Bundle ID: 31 g! start 31 Starting bundle g! OK! Then, in the activator class (to turn this more simple) i added: import javax.bluetooth.*; import javax.microedition.io.*; then build and: g! uninstall 31 Stopping bundle g! install file:/home/user1/NetBeansProjects/bundle1/target/bundle1-1.0-SNAPSHOT.jar Bundle ID: 32 g! start 32 Starting bundle g! OK! Then, in the activator, (just to make this simpler) next to println: public void start(BundleContext context) throws Exception { System.out.println("Starting bundle"); try { LocalDevice localDevice = LocalDevice.getLocalDevice(); } catch(Exception ex) { } } build and g! uninstall 32 Stopping bundle g! install file:/home/user1/NetBeansProjects/bundle1/target/bundle1-1.0-SNAPSHOT.jar Bundle ID: 33 g! start 33 org.osgi.framework.BundleException: Unable to resolve com.mycompany.bundle1 [33](R 33.0): missing requirement [com.mycompany.bundle1 [33](R 33.0)] osgi.wiring.package; (osgi.wiring.package=javax.bluetooth) Unresolved requirements: [[com.mycompany.bundle1 [33](R 33.0)] osgi.wiring.package; (osgi.wiring.package=javax.bluetooth)] g! Why? In simple words, what does “Unresolved requirements: [[com.mycompany.bundle1 [33](R 33.0)] osgi.wiring.package; (osgi.wiring.package=javax.bluetooth)]” means? Thanks again -- View this message in context: http://apache-felix.18485.x6.nabble.com/Felix-Bluetooth-Missing-requirement-tp5016686p5016721.html Sent from the Apache Felix - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

