How does OSGi application work on Java 9?

I am trying to understand how OSGi application works in Java 9 assuming that OSGi bundle is not JPMS module (as far as I know there is still no solution that OSGi bundle could be at the same time JPMS module for production). And I have several questi...
more »

2017-09-17 13:09 (2) Answers

Where to place using Java 9?

I have an OSGI application and I have around 30 bundles (jar files). Today I decided to see how it works/if it works with Java 9. So I started my application and got WARNING: An illegal reflective access operation has occurred WARNING: Illegal refl...
more »

2017-09-05 20:09 (3) Answers

Add Apache Thrift to OSGi Bndtools Project

I am working with Bndtools in Eclipse. I am trying to add Apache Thrift as dependency to a project. My build.bnd has this code for adding the Maven Central as well as our Nexus repository: -plugin.5.Nexus = \ aQute.bnd.repository.maven.pom.provi...
more »

2017-08-25 15:08 (0) Answers

Java custom annotation not visible

For my project I am converting classes to json with jackson fasterXml. Now I have to change in one place the way the objects are converted so that @JsonIgnore is ignored and the property is serialised. I found out that I can do this with extending a...
more »

2017-07-31 10:07 (1) Answers

Eclipse OSGi fragment with Export-Package

I have two bundles, one of it being a host bundle for two fragment and the following dependencies between this bundles/fragments. Bundle A (import B.bpackage, import B1.b1package; export A.apackage) Host Bundle B (export B.bpackage) Fragment B1 (ex...
more »

2017-07-10 13:07 (1) Answers

Maven Tycho build fails

I'm working on an OSGi-based project. I've got following code in one of the methods: private void loadResourceSet(final URI... uris) { ResourceMirror resourceMirror = new ResourceMirror(resourceSet) { @Override protected voi...
more »

2017-06-10 16:06 (0) Answers

What is a p2 repository?

I'm working on a project now for a few months where we use "p2-repositories". I know that I get my dependencies from them. But now I want do dive deeper into the subject and I wonder what exactly is a p2-repository - the definition. I think it has s...
more »

2017-05-10 16:05 (1) Answers

Adding non-osgi jars to RCP4 project

I have the following situation. I rely on a 3rd party jar called foo.jar. That jar has many non-osgi dependencies. I created a new project "Plug-in from existing JAR archives", selected all of foo.jars non-osgi dependencies and exported it as a "d...
more »

2017-03-24 20:03 (1) Answers

OSGI plugin access the file in the resources.jar

I have to modify existing application to act as an OSGI plugin, I have stumbled on the following issue. This application depends on the xml file which is in the jar file, this application also loads this file during the runtime, and because of that i...
more »

2016-10-14 16:10 (1) Answers

XML attributes are not parsed in karaf

In karaf 4.0.3, XML attributes are not parsed via JAXB. The same application works with Eclipse internal OSGI container, but fails with karaf container. JDK7 JAXB implementation is used in both cases. Any ideas why it fails? Incoming XML: <?xml...
more »

2016-09-28 13:09 (1) Answers

Cant reference org.osgi.* in plugins

Some time ago, I created a project with multiple OSGi plugins. Today I reinstalled Eclipse for RCP and RAP Developers, imported the project, and discovered that some errors are occurring in the plugins. Specifically, the org.osgi.* path can't be refe...
more »

2016-07-02 10:07 (2) Answers

Debug a compiled Java Equinox program

Is there a way to debug a Java application that is started via Eclipse Equinox? Something similar to the ".net reflector" does with C #. We have this big program that was developed years ago by an internal team and we have to understand how it works ...
more »

2016-06-01 12:06 (1) Answers