'Platform is not supported' supported when trying to run OSGi debug target

此生再无相见时 提交于 2019-12-05 00:31:59

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/4585933/platform-is-not-supported-supported-when-trying-to-run-osgi-debug-target

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!