osgi

osgi start bundle NoClassDefFoundError

时间秒杀一切 提交于 2021-01-29 20:17:14
问题 I am working through Neil Bartlett's series at EclipseZone on getting started with OSGi. I'm on the 3rd lesson at http://www.eclipsezone.com/eclipse/forums/t90796.html. After creating and installing the jar file, I get a problem starting it: org.osgi.framework.BundleException: The activator osgitut.movies.impl.MovieListerActivator for bundle MoviesLister is invalid at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:171) at org.eclipse.osgi

osgi-in-action pax exam example code not working

匆匆过客 提交于 2021-01-29 15:44:12
问题 I am studying osgi-in-action to understand pax exam unfortunately the provided examples are not working. I have downloaded the source from osgi-in-action code on github changed into the directory [osgi-in-action]/chapter07/testing-example executed: ant test.container in the logfile i see ... Caused by: org.ops4j.pax.runner.platform.PlatformException: [mvn:org.ops4j.pax.exam/pax-exam/1.1.0] is not a valid bundle ... Caused by: java.util.zip.ZipException: error in opening zip file ... I am

ClassNotFoundException for org.osgi.framework.BundleActivator despite of Import-Package

我与影子孤独终老i 提交于 2021-01-27 06:32:35
问题 I tried running a really simple OSGi "Hello World"-style example with an activator after a longer while again and got a ClassNotFoundException for org.osgi.framework.BundleActivator (see stack trace below). The environment is basic Equinox (org.eclipse.osgi_3.7.2...). All bundles (besides mine) are ACTIVE. I have "org.osgi.framework" in my "Import-Package" declaration in the manifest, and I can see the class in the package dependencies in Eclipse. Can someone give me a hint on what to try to

ClassNotFoundException for org.osgi.framework.BundleActivator despite of Import-Package

僤鯓⒐⒋嵵緔 提交于 2021-01-27 06:32:25
问题 I tried running a really simple OSGi "Hello World"-style example with an activator after a longer while again and got a ClassNotFoundException for org.osgi.framework.BundleActivator (see stack trace below). The environment is basic Equinox (org.eclipse.osgi_3.7.2...). All bundles (besides mine) are ACTIVE. I have "org.osgi.framework" in my "Import-Package" declaration in the manifest, and I can see the class in the package dependencies in Eclipse. Can someone give me a hint on what to try to

Eclipse/OSGI, Java 11, JAXB, and the Classloader

一曲冷凌霜 提交于 2021-01-07 01:21:08
问题 I have two Java modules, A and B. A provides a core model with JAXB annotations and helper classes for creating doing JAXB stuff (creating the context, marshalling, unmarshalling, etc.) B provides additional classes that are included in the model via @XmlAnyElement(lax = true) and must therefore be added to the JAXB context. This works fine in plain Java - B's classloader sees all the relevant classes and can instantiate the JAXB context with: JAXBContext.newInstance(RootFromA.class,

Eclipse/OSGI, Java 11, JAXB, and the Classloader

与世无争的帅哥 提交于 2021-01-07 01:19:06
问题 I have two Java modules, A and B. A provides a core model with JAXB annotations and helper classes for creating doing JAXB stuff (creating the context, marshalling, unmarshalling, etc.) B provides additional classes that are included in the model via @XmlAnyElement(lax = true) and must therefore be added to the JAXB context. This works fine in plain Java - B's classloader sees all the relevant classes and can instantiate the JAXB context with: JAXBContext.newInstance(RootFromA.class,

Eclipse/OSGI, Java 11, JAXB, and the Classloader

醉酒当歌 提交于 2021-01-07 01:17:17
问题 I have two Java modules, A and B. A provides a core model with JAXB annotations and helper classes for creating doing JAXB stuff (creating the context, marshalling, unmarshalling, etc.) B provides additional classes that are included in the model via @XmlAnyElement(lax = true) and must therefore be added to the JAXB context. This works fine in plain Java - B's classloader sees all the relevant classes and can instantiate the JAXB context with: JAXBContext.newInstance(RootFromA.class,

Eclipse/OSGI, Java 11, JAXB, and the Classloader

↘锁芯ラ 提交于 2021-01-07 01:12:33
问题 I have two Java modules, A and B. A provides a core model with JAXB annotations and helper classes for creating doing JAXB stuff (creating the context, marshalling, unmarshalling, etc.) B provides additional classes that are included in the model via @XmlAnyElement(lax = true) and must therefore be added to the JAXB context. This works fine in plain Java - B's classloader sees all the relevant classes and can instantiate the JAXB context with: JAXBContext.newInstance(RootFromA.class,

2.架构设计-OSGi结合spring cloud架构讨论

吃可爱长大的小学妹 提交于 2021-01-03 11:17:35
大纲【osgi和微服务spring cloud是两种思路的架构,osgi:面对模块开发热插拔,可以将功能模块化,热插拔到任何系统,大大降低重复的设计,但是osgi要求开发者对中心的抽象能力要求极强。osgi还可以节约运营成本,现实中很多商业的系统资源利用率不足,osgi模块化可以大大降低运维成本。 spring cloud就是微服务的王者,他微服务话但是要求更多的资源,部署也麻烦,但是可以将一个服务的性能发挥到极致。 脑洞:如果将2者结合一起回有什么化学反应? 蚂蚁金服类似产品 】 待更新 来源: oschina 链接: https://my.oschina.net/u/4262730/blog/4874233

In bndtools, what causes a Require-Capability header for execution environment to be generated?

徘徊边缘 提交于 2020-12-30 06:52:29
问题 I have the following bnd file: Bundle-Version: 1.0.12 Bundle-Activator: a.b.Activator Private-Package: a.b -buildpath: osgi.core;version=4.3.0,\ org.apache.felix.bundlerepository;version=1.6.6,\ osgi.cmpn;version=4.3.0.201111022214 -sources: false In the generated MANIFEST.MF: Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.6))" I don't want this there... there's no reason I can see that it should be. So how do I avoid it? 回答1: bnd 2.3 automatically adds this. You can