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]

Reply via email to