Questions tagged [osgi-fragment]
60 questions
1
vote
1 answer
how does the classloader when duplicated class between bundle and its fragment
I have some misunderstanding of OSGI fragment,
Suppose I have deployed a bundle "B" with two classes "com.company.C1" and "com.company.C2" where C1 use C2.
And then, I deployed a fragment "F" for the host bundle "B" where F contains only one class…

Jugu
- 787
- 1
- 9
- 23
1
vote
2 answers
Eclipse RCP - Using fragment for providing translations
I've got short question about using Fragments in Eclipse RCP. Currently I'm using the Messages-mechanism to translate my strings. The Messages.java and the *.properties files are located in my Plugin and everything is working fine. Now I'd like to…

AnarchoEnte
- 558
- 4
- 20
1
vote
1 answer
eclipse4 RCP Fragment "Unable to load class from bundle"
I currently try to migrate an Eclipse 3 RCP application to e4. The project is based on a main plugin project and several fragment projects. I'm using Eclipse Mars for developing. The following description is based on a sample project I created for…

Gordon Damerau
- 31
- 6
1
vote
2 answers
Reflection with OSGI bundles, for Dependent jars
I wrote a framework ( Let's call A), and it depends upon jdbc drivers & data source and loads the classes using reflection.
It uses 3 parametered Class.Forname with Thread.currentThread().getContextClassLoader()
Now, I want to use this framework…

coder000001
- 476
- 4
- 22
1
vote
0 answers
Patch/Override a .jsp file in /resources directory in OSGi bundles
Say I have a osgi bundle (xyz.jar) with multiple class files, jsp's, css files etc. I need to patch one .jsp file (say admin.jsp) in this bundle using osgi fragment bundle and/or require-bunlde.
What I have done is created a patch bundle with the…

Shariq
- 229
- 1
- 3
- 9
1
vote
0 answers
Host bundle fails to start on Karaf restart when two fragments are present
I am using Karaf 3.0.1 and have two fragment bundles A and B that attach to a host bundle C. I am able to install A, then B, then C, and start C and everything works fine.
When I stop and start Karaf though, the host usually has a failure and does…

schmke
- 11
- 3
1
vote
1 answer
Blocked threads due to ServiceRegistry
I have a relatively high volume/requests system in which we are using OSGi. We get close to 800M requests per day.
We are seeing some issues currently where threads are getting blocked. For every request that comes in, we forward the event/data to…

Masti
- 151
- 1
- 10
1
vote
1 answer
How do I register custom Logback Filters using OSGi fragment bundle?
I have a custom Filter called foo.bar.MatcherFilter.
I have it declared in logback.xml,
java.net.ConnectException: Connection refused
At…

Augustus Thoo
- 492
- 4
- 13
1
vote
2 answers
OSGI Pax logging
I want to write a custom appender which will collect all the logs coming to Fuse.log in Fuse container and relay them over Scribe to a central log store. I want to add a event listener for that in the container. But I couldn't figure out how I can…

Nipun Talukdar
- 4,975
- 6
- 30
- 42
1
vote
1 answer
How to define an OSGI/Eclipse plugin with binary components for multiple platforms
I created an Eclipse plugin and there is a native binary needed to support its functionality. I have the native code ready for Win and Mac. The invocation of the native code is different for each platform, so there is also some plugin code related…

Peter Kofler
- 9,252
- 8
- 51
- 79
1
vote
1 answer
OSGi fragment update versus bundle update?
Just wondering is there any significant difference between OSGi fragment update versus the bundle update?
When a fragment bundle is updated, should we call FrameworkWiring.refreshBundles method on the updated fragment or on its parent bundle?
can…

Nadeem
- 556
- 1
- 4
- 13
0
votes
0 answers
How to skip the test classes in OSGI integration test?
In the junit we can use the Assume.assumeTrue(false) to skip the execution of the test cases.
@BeforeClass public static void beforeClass() { Assume.assumeTrue(booleanCondition()); }
But in OSGI integration i am not able to use the assumeTrue.
So…

Vasu. Tk
- 1
- 1
0
votes
0 answers
Fragment Bundle refresh in Karaf
We are using karaf 4.3.7 in which we observed refresh for our application bundles. We tried to debug by removing all the application bundles from Karaf. Still we observed refresh for the karaf framework bundles. Attaching the logs which has only the…

Shriram
- 4,343
- 8
- 37
- 64
0
votes
1 answer
Spring OSGi integration: ClassCastException when getting osgi service in springContext
New to OSGi. I'm trying to get a service from osgi in Spring. Git link for the code : https://github.com/shinevs/SpringIntegrationTest
Getting ClassCastException.
java.lang.ClassCastException: com.bundle.Activator cannot be cast to…

jAvA
- 557
- 1
- 8
- 22
0
votes
1 answer
Which way does Fragment-Host operate with OSGi fragments?
I am having some difficulty getting a fragment to work as I intend. It has raised a question to my mind that is not answered by various articles on the web.
First, my understanding of a fragment is that it is much like an OSGi Bundle except it…

majixin
- 186
- 9