Can Spring Boot be used with OSGi? If not, any plans to have an OSGi Spring Boot?

Yes, it’s possible to run Spring Boot apps in OSGI container. First of all, you’ll have to switch from Spring Boot jar packaging to OSGI bundle. If you’re using Maven you can use org.apache.felix:maven-bundle-plugin for doing that. As Spring Boot dependency jars are not valid OSGI bundles, we should either make them valid bundles with … Read more

Installing a new version of Groovy on my OSGi environment makes my bundle import it, though it shouldn’t

Don’t use a version range. Explicitly set the version of groovy.util This might not seem helpful, but I believe it will work. We get a very similar problem when we try to generate Karaf features.xml files on dependencies with version ranges (we worked around this by writing our own plugin that removed the upper versioned … Read more

How can I run a subprocess in Equinox with dynamic bundle installation?

you can use the Equinox Launcher API. Here’s an example of how you can use the Equinox Launcher api to launch a new instance of equinox with a set of bundles: ` EquinoxLauncher launcher = new EquinoxLauncher(); String equinoxHome = “/path/to/equinox/home”; String[] bundlePaths = { “/path/to/bundle1.jar”, “/path/to/bundle2.jar” }; EquinoxRunConfiguration runConfig = launcher.newConfiguration(); runConfig.setWorkingDir(new File(equinoxHome)); runConfig.setFramework(new … Read more

Better handling of Thread Context ClassLoader in OSGi

Great question, we’ve been doing the same work around (in Felix/Karaf/Servicemix4.2) and have been searching for a better solution. Here is the response that I got back from the Felix team… http://old.nabble.com/Can-the-thread-context-classloader-issue-be-solved-at-all–td28260809.html#a30704352 Essentially, they say that there isn’t a better solution at the moment. However, I do see that Equinox references some other options including … Read more

Scala in OSGI container?

Thanks to everyone for the answers, you led me to the solution! I will describe it here in a little simpler terms for a wider audience. Goal: Code in scala, deploy to OSGi. Tools used: Equinox OSGi implementation Eclipse Helios 3.6, Scala 2.9 Procedure Install Scala IDE for Eclipse. Find version that will work with … Read more

Java 8 & Missing required capability Require-Capability: osgi.ee; filter=”(&(osgi.ee=JavaSE)(version=1.8))”

The error means that your bundle has a Require-Capability: osgi.ee; filter=”(&(osgi.ee=JavaSE)(version=1.8))” entry in its manifest. So this means the bundle will only start when there is a bundle that provides this capability. In case of the osgi.ee capability it is the OSGi framework (equinox) that should provide this capability. Apparently it does not do this. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)