Questions tagged [osgi-fragment]

60 questions
3
votes
2 answers

How to create an osgi fragment with Bnd?

Today I had a deeper look inside the bndTools for Eclipse. I had a good start, but I ask myself if it is possible to create osgi fragments with bndTools or bnd. From the bnd project description it tells me that the Fragment-Host header is ignored by…
Toomy
  • 90
  • 1
  • 8
3
votes
3 answers

Replacing classes/resources with an OSGi fragment - possible without including a jar in the fragment?

We want to replace certain resources in a host OSGi bundle by adding an OSGi fragment. As I understand it, the resources included in an OSGi fragment are merely added to the classpath of the host bundle. There is no guarantee that if the fragment is…
Integrating Stuff
  • 5,253
  • 2
  • 33
  • 39
2
votes
1 answer

Best practices for runtime-only dependencies in OSGi

In line with the Open-Closed Principle, I typically design my Java packages and libraries in such a way that there is a generic "interface" or "API" package/library and one or more implementations (quite similar to many common APIs like JDBC or…
raner
  • 1,175
  • 1
  • 11
  • 21
2
votes
1 answer

use of fragments over plugin

In my project, I could see all the JUnit Test cases are written in eclipse fragments not in eclipse plugin. And we do run each test classes as JUnit plugin. I am not very much clear about the concepts. I am relatively new to this concept. I just…
user414967
  • 5,225
  • 10
  • 40
  • 61
2
votes
2 answers

Should OSGi fragments export packages contributed to their host?

I noticed a fragment I have uses a Export-Package directive for the package that is contributed to its host: Fragment-Host: org.eclipse.jetty.osgi.boot Export-Package: org.eclipse.jetty.osgi.boot.utils;version="1.0.1.felix" -buildpath:…
Dan Gravell
  • 7,855
  • 7
  • 41
  • 64
2
votes
1 answer

Accessing services from OSGi fragment bundles

In my project, there is an OSGi bundle which exposes an interface com.xyx.EventProvider as a declerative service. There is another 3rd party bundle org.eclipse.equinox.http.jetty, to which I have attached a fragment bundle…
atulb
  • 83
  • 5
2
votes
1 answer

Adding OSGi fragment bundles in Felix servletbridge war

I am trying to create war hosting OSGi bundles. The complete configuration should be able to host WAB bundles, and now I try to integrate pax-web-extender-war for that. It requires some dependencies like slf4j-api and slf4j-log4j12 and here is the…
Petr Kozelka
  • 7,670
  • 2
  • 29
  • 44
1
vote
1 answer

Adding pages to an OSGI webapp using bundles

I have a Spring MVC webapp which runs in an OSGi container using Spring DM 2. For the moment, the view technology I use is JSP. I would like to optionally add features to my app by packaging pages and @Controllers into bundles. I can achieve that…
user1310749
  • 141
  • 1
  • 5
1
vote
1 answer

OSGi - running outside eclipse

I have been working on getting my OSGi application to run outside eclipse. It has certainly wasn't as easy as I thought out would be certainly not just a case of running java -jar org.eclipse.osgi_3.7.1.jar and installing the plugins. I'm hoping…
Kris
  • 963
  • 1
  • 13
  • 22
1
vote
1 answer

How to specify multiple hosts in the manifest of an OSGI fragment bundle in apache karaf

According to the OSGI specification, a fragment bundle in OSGI can have multiple hosts. But in apache karaf it does not seem to work. I have tried the following. Fragment-Host: default_host;bundle-version=1.0.0,Second_host;bundle-version=1.0.0
1
vote
2 answers

How to get the Bundle object which represents a fragment bundle?

I tried the following code in the fragment bundle Bundle bundle = FrameworkUtil.getBundle( getClass() ) ; but the bundle object still represents the host bundle, how to get the Bundle object representing the fragment bundle ?
Bourbon_7
  • 161
  • 7
1
vote
1 answer

OSGI: asking Framework to load class exported by a bundle without visiting each bundle's classloader?

OK. So I have a org.osgi.framework.launch.Framework which I created programmatically in the following way. framework =…
The Pickle
  • 125
  • 1
  • 5
1
vote
1 answer

Resolving OSGi tests when upgrading from Groovy 2.4 to 2.5 due to "Fragment bundles can not be started"?

This is a follow-up question to How to upgrade groovy-all from 2.4 to 2.5 when running in OSGi?. The groovy-all artifact is no longer available as a jar file in version 2.5 in Groovy so the suggestion in the answer above was to instead use the…
Johan
  • 37,479
  • 32
  • 149
  • 237
1
vote
0 answers

Eclipse product export: fragment error (Host plugin not found)

I have a workspace in Eclipse RCP 3.8.2 IDE with 3 plugins and 2 fragments: P1 and P2 plugins BONECP1 fragment (P1 is the HOST) BONECP2 fragment (P2 is the HOST) MAIN plugin (requires P1 and P2) Life goes well running MAIN plugin inside the IDE...…
marcolopes
  • 9,232
  • 14
  • 54
  • 65
1
vote
1 answer

java.lang.ClassCastException: com.sun.xml.internal.ws.client.sei.SEIStub cannot be cast to org.apache.cxf.frontend.clientproxy AEM OSGi

I am trying to use the fuelsdk in an osgi environment in AEM. I am getting this error - java.lang.ClassCastException: com.sun.xml.internal.ws.client.sei.SEIStub cannot be cast to org.apache.cxf.frontend.ClientProxy This is because OSGi loads the…
cqsapientuser
  • 65
  • 3
  • 12