"Platform not supported" when trying to launch the OSGi debug landing page

I am trying to launch a tiny OSGi project from IntelliJ Idea. I added the Equinox container in the OSGi configuration section in Idea. Then I added the OSGi facet to the project. Everything looks fine.

However, as soon as I try to start the project, I have problems. I use the "OSGi Bundles" runner from IntelliJ Idea. There I select my project packages and the OSGi container and run it. This is where the problem begins. I always repeat 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 had the same problem. Does anyone know what I'm doing wrong. Or which OSGi container versions are supported by IntelliJ?

+5
source share
1 answer

Osmorc (the IntelliJ OSGi plugin) sets the pax runner context with the name and version of the platform that you provide in the OSGi IDE settings (IDE parameters β†’ OSGi β†’ Framework Definitions).

The name is "platform." + the name you provided and the version is verbatim. Supported versions for different platforms are listed here . However, this list has not been updated.

You can check the actual versions by looking inside the can. Go to your_home / plugins / osmorc / lib idea, open the pax-runner -... jar. The META-INF directory contains a subdirectory for each platform with the definition of $ VERSION.xml.

In your example, you can see that there is no support for Felix 3.0.6 in pax-runner 1.5.0. The latest supported version is 3.0.2.

+9
source

Source: https://habr.com/ru/post/918005/


All Articles