Launching OSGI Felix on android gives error: “java.lang.UnsupportedOperationException: can't load this type of class file”

巧了我就是萌 提交于 2020-01-24 19:57:45

问题


I am trying to launch OSGI Felix framework on android. I followed this link and things were going fine. In the bundle directory, I added a bundle that was an eclipse plugin project that I created earlier in order to launch it on android. It has only one activator class with a "Hello" Message in the start() method. Now, when I launched Felix on android shell, I noticed that the bundle I added is causing a problem and can't be launched on android. Here's the errors I get when I launch Felix:

ERROR: Error starting file:bundle/HelloforAndroid_1.0.0.201307312320.jar (org.os
gi.framework.BundleException: Activator start error in bundle HelloforAndroid [5
].)
java.lang.UnsupportedOperationException: can't load this type of class file
        at java.lang.VMClassLoader.defineClass(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:292)
        at org.apache.felix.framework.searchpolicy.ContentClassLoader.findClass(
ContentClassLoader.java:223)
        at org.apache.felix.framework.searchpolicy.ContentClassLoader.loadClassF
romModule(ContentClassLoader.java:94)
        at org.apache.felix.framework.searchpolicy.ContentLoaderImpl.getClass(Co
ntentLoaderImpl.java:166)
        at org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClassO
rResource(R4SearchPolicyCore.java:471)
        at org.apache.felix.framework.searchpolicy.R4SearchPolicyCore.findClass(
R4SearchPolicyCore.java:185)
        at org.apache.felix.framework.searchpolicy.R4SearchPolicy.findClass(R4Se
archPolicy.java:45)
        at org.apache.felix.moduleloader.ModuleImpl.getClass(ModuleImpl.java:216
)
        at org.apache.felix.framework.Felix.createBundleActivator(Felix.java:346
8)
        at org.apache.felix.framework.Felix._startBundle(Felix.java:1649)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1578)
        at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:11
72)
        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:265
)

Can anyone help me to figure out what's missing or wrong with this bundle? Thanks.

来源:https://stackoverflow.com/questions/18005326/launching-osgi-felix-on-android-gives-error-java-lang-unsupportedoperationexce

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