osgi

Servlet class is not a javax.servlet.Servlet

≯℡__Kan透↙ 提交于 2019-12-13 01:25:21
问题 I am developing a GWT application, but I got the following Exception when I deploy it into a Equinox-jetty server: 404 Servlet class com.cartif.gui.autentication.server.AppServiceImpl is not a javax.servlet.Servlet <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> <title>Error 404 Servlet class com.cartif.gui.autentication.server.AppServiceImpl is not a javax.servlet.Servlet</title> </head> <body><h2>HTTP ERROR 404</h2> <p>Problem accessing

Unable to use Maven Central Repository with bnd to resolve dependencies

和自甴很熟 提交于 2019-12-13 00:46:50
问题 With Eclipse Oxygen.2 Release (4.7.2), I'm trying to use bndtools to make some OSGi bundles. By default (with the JPM repository) I am able to resolve dependencies fine. But I have no way of seeing what libraries are there. Because of this, I'd like to use Maven Central to handle my dependencies. I can browse the website, see what versions are there, and make choices on that information. The default build.bnd file in the cnf project has the repositories setup like # Configure Repositories

Felix how to use FrameworkWiring.getDependencyClosure

谁说我不能喝 提交于 2019-12-13 00:40:53
问题 I am trying to get depends for each bundle. In this SO post I was advised to use FrameworkWiring.getDependencyClosure , but I can't understand how to initialize class, FrameworkWiring.getDependencyClosure - it's interface. Is there any implementations of this interface in felix? And second question: I have found BundleWiringImpl getRequirements(null); but I can't initialize BundleWiringImpl testObject = new BundleWiringImpl(); NetBeans show error: constructor BundleWiringImpl in class

Where to find and install org.osgi.framework package?

流过昼夜 提交于 2019-12-12 21:08:50
问题 I am trying to follow this tutorial: apache felix tutorial #1 But I don't understand the directory structure. Where do I place the Activator.java file? Where, relative to the Activator.java file do I place the MANIFEST.MF? In this tutorial when I try to compile the Activator.java file, I get errors that org.osgi.framework does not exist. Where can I get the org.osgi.framework package and where should it be installed? How does the javac build command know how to find the org.osgi.framework

Check whether a file is an OSGi bundle (and find the bundle name) without installing it in the OSGi framework

寵の児 提交于 2019-12-12 20:01:38
问题 Is it possible? Or do I have to try to install it? 回答1: I'll assume you're talking about OSGi Release 4, since in OSGi Release 3 and earlier any valid JAR file was also a valid OSGi bundle. Simply read the JAR's manifest using the standard Java APIs in the java.util.jar package. The minimum headers required to be a valid R4 bundle are: Bundle-ManifestVersion: 2 Bundle-SymbolicName: ... As BJ points out, the "id" of the bundle is assigned when it is installed, but what many people take to be

Creating a custom taglib in Liferay 7

我的未来我决定 提交于 2019-12-12 19:57:08
问题 I am coding an application using Liferay 7 and OSGi modules. I need to create a custom taglib available across all modules (portlets), but I have litteraly no idea where to start. Do you have any idea? Should I store the taglib definition, classes and JSPs in an OSGi modules? And if not, where, and how can I reference it from a portlet module? Thank you very much 回答1: In most cases you should be able to deliver a taglib completely within an OSGi module. You can find several examples in

OSGI nested dependency jars

一笑奈何 提交于 2019-12-12 19:02:36
问题 If I have a OSGI Bundle that has dependency jars nested inside the OSGI Bundle jar, do I need to list those classes in the Import-Package manifest so that I could use them? I would think not. Also how do I add these dependency jars into my bundle. Do I just put them in the root folder? Do I need to add anything to the manifest file to be able to use these dependencies? 回答1: You should not use Import-Package for embedded jars. Instead use Bundle-ClassPath: .,myjar.jar to add the embedded jars

What is the natural start order for package-dependent OSGI bundles (under Karaf)?

本秂侑毒 提交于 2019-12-12 18:29:52
问题 I have a problem on 2.2.8 version of Karaf (and most probably on the earlier versions too). I'm going to use Karaf to host the system with dynamically deployed bundles. Bundles are deployed by users and i cannot know beforehand which are they. I expect order of the BundleActivator.start() to exactly correspond to package dependencies between bundles (dependencies of import/export packages) and planning to expect that it will be safe to assume that bundle0 will be completely initialized before

Eclipse ECF Vs Apache CXF

允我心安 提交于 2019-12-12 16:43:20
问题 I'm trying to come up with an architecture which allows me to have OSGi bundles distributed remotely which get discovered dynamically etc. After some time spent looking at what's out there I am oriented at using the following: Apache CXF (as OSGi Remote Services implementation) Spring Dynamic Modules JAX-WS Tools Component for Eclipse One of the things I was trying to understand is where projects like Eclipse ECF and Riena stand in this regard. Are they alternatives to Apache CXF? (In this

Registering a service and looking for the service

时光总嘲笑我的痴心妄想 提交于 2019-12-12 15:58:27
问题 I am new to OSGI, I am trying to understand how to register a service? is it always through BundleContext object in Activator ? Is there any alternate way available? Let say I have a Interface IService and there are two implementation ServiceImpl1 and ServiceImpl2 in same bundle I am registering them as below. context.registerService(IService.class.getName(), new ServiceImpl1(), props); context.registerService(IService.class.getName(), new ServiceImpl2(), props); But confusion is how do I