osgi

Automated building equinox PDE : executable doesn't work

Hello everybody, I created an OSGi project in which one I've 2 projects : - one plugin project : that contains my source files, my product configuration that uses my feature project and the feature org.eclipse.equinox.p2.ui.user. It means that my program is able to install new software or to update the program. - one feature project tha...

Add system packages to PDE runtime configuration

I created an eclipse run configuration for a number of bundles. One of the bundles has a dependency to the following packages: com.sun.mirror.apt, com.sun.mirror.declaration, com.sun.mirror.type, com.sun.mirror.util I believe these are part of the Sun Java JVM. When I add these packages as system packages to a Felix container, the bun...

OSGi equinox : Bundle stay always in the state "RESOLVED"

Hello, I've created one main bundle in wich one I've installed the equinox p2. Then I export it to obtain an executable. My executable works correctly. I've also created one other Bundle that interact witt the first one. In eclipse, if I create a product configuration with this 2 bundles and run the product, everything works. After tha...

Glassfish as an OSGi Container

I'm evaluating OSGi containers and the subject came up of using Glassfish to contain my OSGi application components. My question is: Is Glassfish good for this? Does anybody have any experience using it in this way? Background: - The application is not a Java EE application, it's a Spring application. - I've been evaluating Felix + Tom...

Eclipse 3.5 customized with some plugins fails to start on target machine

Hi, i have been creating a customized Eclipse Version with some specific Plugins (CDT, AVR-Development) and after configuring and testing successfully on my machine, I zipped the eclipse-Folder and send it to my client to install onto the target machine. But when he tries to start eclipse he gets the following error in the Logfile: ...

OSGi service trackers not always working

Hey guys. We're using OSGi services in an Eclipse RCP application. To track them, we're using the org.osgi.util.tracker.ServiceTracker class. A sample code from the application looks like mailServiceTracker = new ServiceTracker(context, MailService.class.getName(), null); mailServiceTracker.open(); MailService service = (MailService) ma...

Disabling Cache in Apache Felix

Hi, i'm trying to follow the instructions in this thread (http://osdir.com/ml/dev-felix-apache/2009-05/msg00051.html) to disable file system bundle cache in felix. I couldn not find a concrete example online. Can somebody help me with this? Is this really working? Thanks in advance. Klaus. ...

Passing data to OSGI Bundles

Hi, I don't know how far the discussion in this thread is still relevant, but I'm not able to read system properties from a Felix BundleActivator. Is this working for anybody out there? Or can somebody help me figure out what is going on? Thanks, Klaus. ...

How to construct an OSGi service with dependencies and publish via DS

My sample classes: public class MyModel implements Model { : : } public class SingleModelProvider implements ModelProvider { public SingleModelProvider(Model providedModel, List actions) { : } } The plan is to reuse the SingleModelProvider class in several bundles to provide different implementations of ...

OSGI bundle error - Unresolved constraint in bundle 4: package; (package=com.sun.org.apache.xerces.internal.parsers)

I am new to OSGI bundle development. I am trying to create a bundle using Maven script, when I deploy it, i am getting the following error *BundleProvisioningResourceLocator->error: Unable to handle Bundle: [bundle-jar-file-name].jar. Bundle state: UPDATED org.osgi.framework.BundleException: Unresolved constraint in bundle 4: package; ...

EclipseLink : No Persistence provider for EntityManager named ...

Hi everybody, I'd like to create one Bundle that is able to use Java Persistence. To achieve this, I've created a plugin project within Eclipse. In my project, I've created a persistence.xml file into META-INF. I've aslo added in my MANIFEST.mf (into the depencies) those 3 packages : javax.persistence.jar org.eclipse.persistence.jar o...

Eclipselink : How do you get the EntityManager in each bundle?

Hi! I wonder about a good way to have an EntityManager in each Bundle. Or how to use correctly JPA in an OSGi program. Actually, I've one main bundle that loads the persistence.xml file and instanciates the EntityManager. After, my main bundle gives the instance of Entity manager to the other bundles via the services. So I use the powe...

Why my RCP project cannot build-generate update site?

Hello! Why my RCP project cannot build-generate update site? I've created 3 projects for my Eclipse RCP application: a plug-in project named 'formicary-client2'; a feature project named 'formicary-client-feature'; a update site project named 'formicary-client-site'. Now the plug-in project works well and can be exported as a product...

JSP in OSGi: How to load TLD from bundles?

Hi! We're building a JSP web application, which runs inside the Apache Felix OSGi container (the web app itself is a OSGi Bundle). Now, we're facing the following problem: According to the JSP 2.0 Spec, TLD (taglib descriptors) no longer need to reside inside the web apps WEB-INF folder, but are loaded directly from the taglib's jar ME...

Dynamically create and configure OSGi Services with dependencies

In my current application i want to create and configure osgi services at runtime through a user interface. I've looked into the OSGi Metatype specification but it only supports simple type attributes. So my questions are: Is there a good reason why there is no support for attribute types such as other osgi services and does anyone know...

Changing the configuration store location for the OSGi Configuration Admin service?

Is there a way to change the configuration store location for the OSGi Configuration Admin service? I'd like to have the properties files exist in another bundle so they'd exist in source control & in the deployment rather than the OSGi store. ...

Default version package gets when Export-Version does not specify version

In OSGi, if I do not specify version in the Export-Package directive inside MANIFEST.MF, which version exported package will get? Version equal to the bundle version? Zero version (something like 0.0.0)? Something else? P.S. And here is the rationale behind this logic: https://mail.osgi.org/pipermail/osgi-dev/2010-August/002608.html ...

Character limit on Bundle-Classpath in OSGi bundle manifest?

Using Apache Felix, I have an OSGi component I've authored that wraps some middleware my company uses. Currently it depends on a good number of external libraries, and I appear to have run into a limit on the Bundle-classpath: parameter length. I've had to rename libraries such as commons-collections.jar to ccoll.jar. I'm curious if...

Dynamic Junit Test

Hello As part of my study final project I have to make a J2EE application that allows users to run JUnit tests(without any experience what they have to do is to click and see the result), obviously it must be some way to modify tests and create new ones (upload new test files ...) could you point me to the right technology which allows...

OSGi bind object to JNDI in Glassfish

New to OSGi and Glassfish. I have an OSGi bundle written that creates a non-serializable manager object that I would like to expose via JNDI so that my web applications can utilize it. (Previously with JBoss I utilized org.jboss.naming.NonSerializableFactory to do this, but I can't seem to find any analogous approach with Glassfish.) ...