I want to create a very simple (Hello Simple World) POC that demonstrates the ability to integrate OSGi (Felix) with Scala and Actors (Akka). Here is what I have so far:
$ tree
.
├── bin
│ └── felix.jar
├── bundle
│ └── akka-osgi_2.10-2.2.1.jar
├── conf
└── config.properties
$ cat conf/config.properties
org.osgi.framework.storage.clean: onFirstInit
org.osgi.framework.system.packages.extra: javafx
org.osgi.framework.bootdelegation: sun.misc
felix.auto.deploy.action=install,start
felix.log.level=1
org.osgi.service.http.port=8080
obr.repository.url=http://felix.apache.org/obr/releases.xml
$ java -jar bin/felix.jar
ERROR: Bundle com.typesafe.akka.osgi [1] Error starting file:/home/axiopisty/projects/test/bundle/akka-osgi_2.10-2.2.1.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle com.typesafe.akka.osgi [1]: Unable to resolve 1.0: missing requirement [1.0] osgi.wiring.package; (&(osgi.wiring.package=com.typesafe.config)(version>=0.4.1)(!(version>=1.1.0))))
org.osgi.framework.BundleException: Unresolved constraint in bundle com.typesafe.akka.osgi [1]: Unable to resolve 1.0: missing requirement [1.0] osgi.wiring.package; (&(osgi.wiring.package=com.typesafe.config)(version>=0.4.1)(!(version>=1.1.0)))
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2037)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
at java.lang.Thread.run(Thread.java:744)
I understand from this error message that there is no bundle that exports osgi.wiring.package
. But I don't know which bundle I would need to include that exports that package. Would it come from Akka, from Felix, or from somewhere else?
As can be seen in the provided config.properties I tried to follow the instructions about how to Configure the OSGi Framework from the akka documentation, but I don't know if I'm doing what they said needs to be done in the right way.
The akka documentation says:
To use Akka in an OSGi environment, the org.osgi.framework.bootdelegation property must be set to always delegate the sun.misc package to the boot classloader instead of resolving it through the normal OSGi class space.
How do you do this using Felix as the OSGi container, and using the default felix launcher?
A simple hello world example using OSGi (Felix is not required, but preferred) and Akka Actors is ideally what I'm looking for. If you know of anything on github (or elsewhere) that demonstrates this, I would accept that as an answer too.