I'm trying to run a tiny OSGi project from IntelliJ Idea. I've added the Equinox container in the OSGi configuration section in Idea. Then I added the OSGi facet to the project. Everything looks ok to this point.
However as soon as I try to run the project I get into trouble. I use the 'OSGi Bundles' runner from IntelliJ Idea. There I select my project bundles and the OSGi container and run it. Here the issue starts. I always the the same error message:
___
/ /
/ / Oops, there has been a problem!
/ /
/__/ Platform [platform.felix 3.0.6] is not supported
___
/__/
-> Exception caught during execution:
org.ops4j.pax.runner.ConfigurationException: Platform [platform.felix 3.0.6] is not supported
at org.ops4j.pax.runner.Run.installPlatform(Run.java:611)
at org.ops4j.pax.runner.Run.start(Run.java:221)
at org.ops4j.pax.runner.Run.main(Run.java:148)
at org.ops4j.pax.runner.Run.main(Run.java:121)
I tried to use other OSGi containers, like Felix or Knopflerfish and have the same issue. Does anyone know what I'm doing wrong. Or which versions of OSGi containers are supported by IntelliJ?
Osmorc (IntelliJ OSGi plugin) sets up pax runner context with the platform name and version you provide in OSGi settings of the IDE (IDE Settings -> OSGi -> Framework Definitions).
The name is "platform."+the name you provided, and the version is verbatim. The supported versions for different platforms are listed here. The list is not up-to-date, though.
You can check the actual versions by looking inside the runner jar. Go to your idea_home/plugins/osmorc/lib, open pax-runner-...jar. META-INF directory contains sub-directory for each platform with definition-$VERSION.xml.
For your example, you can see there is no support for Felix 3.0.6 in pax-runner 1.5.0. The latest supported version is 3.0.2.