osgi

UnsatisfiedLinkError While Calling Native Method from OSGi Bundle

╄→尐↘猪︶ㄣ 提交于 2019-12-21 23:56:42
问题 I have created one OSGi plugin (Bundle) using eclipse File-->New-->Other-->Plug-in Project called plugin 1. I want to use a native .so library in this plugin. I have added libtest_app_wrap1.so at the root of my plugin project. my project structure looks like below And here is the manifest file Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: JniTest Bundle-SymbolicName: JniTest Bundle-Version: 1.0.0.qualifier Bundle-Activator: jnitest.Activator Bundle-RequiredExecutionEnvironment:

How do you properly implement a ManagedServiceFactory as Decalarative Service in OSGi?

风格不统一 提交于 2019-12-21 21:39:11
问题 I have services that need to be created on a per-configuration base, each of which relies on an external resource and thus should manage it's own lifcycle (i.e. (de)register the service). Thus implementing these as DS and let SCR spawn multiple instances does not work. One can implement a bundle that registers a ManagedServiceFactory to accomplish this task perfectly (see my previous post). But as a consequence, if the factory depends on several other services, you need to start tracking

Add plugins with auto start to eclipse RCP application

徘徊边缘 提交于 2019-12-21 20:58:06
问题 I have an Eclipse RCP application, and I am trying with no luck to install a plugin I have created that should be deployed separately to the aforementioned application. To do so, I start the application as ./App -console , and when it has stopped loading, I type: install file://URLTOjAR/plugin.jar It returns me a plugin ID (lets say 288 ), so I type afterwards: start 288 After this, the plugin is working fine, but when I restart the application, by using ss I only can see that the plugin is

Including a JSP into a sling servlet

天大地大妈咪最大 提交于 2019-12-21 20:54:15
问题 I'm currently working on a small project, trying to help someone figure out how to wire up a component. Ideally we'd like to do 2 things: have a jsp that renders the template have all our business login in a SlingAllMethodServlet Gist of servlet definition: package definition... import statements... @SuppressWarnings("serial") @SlingServlet( resourceTypes="path/to/my/component", methods="GET", extentions="HTML") @Properties({ @Property(name="service.pid", value="<my service class>",

access common property file inside bundle with osgi

╄→尐↘猪︶ㄣ 提交于 2019-12-21 19:52:57
问题 I have an osgi application (in felix) with multiple bundles. There are some common property files in one bundle and the rest of the bundles need just use them. We use maven and spring osgi, the property files are in resouces like: <path to bundle>/src/main/resources/ common.properties engine.properties ... Maven builds them inside the bundle jar normally so they should be in an application classpath, but Spring has no access to them, this fails: <context:property-placeholder location=

How do I tell an Eclipse plugin where a native library resides for an external plugin?

断了今生、忘了曾经 提交于 2019-12-21 17:39:50
问题 I have an Eclipse plugin that is a Java wrapper for a C++ library. I'm running on Linux so the wrapper provides a .jar and a .so. I've created a plugin project from this latter existing JAR archive. I have pointed to the .so in the native library location for the jar. I have another plugin that references this wrapper plugin. I can successfully run a standalone java application from this other plugin that utilizes the wrapper plugin successfully. The class that uses it has to import the java

Spring component-scan broken in osgi container

无人久伴 提交于 2019-12-21 17:04:40
问题 I'm trying to integrate spring DI into an existing jaxws project. I've got this working locally on tomcat but when I deploy to the remote container it doesn't appear to do the classpath scanning. I can see in the logs that on tomcat it registers my @Components as beans but on the remote server they're not mentioned at all. What I do see is the stacktrace below. It looks like it's down to the quirky web container I have to use. It's the "integrated application server for IBM i". http://www-03

Clojure hot code swapping for uberjars/.classes

我的未来我决定 提交于 2019-12-21 12:38:44
问题 I want to have hot code swapping between project updates, but I haven't found any information about how to load .class files dynamically. More specifically, I want something like that: Make lein uberjar , obtain some-client-0.0.0-standalone.jar . Run it with java -jar some-client-0.0.0-standalone.jar . Make changes to project. Obtain new program version, some-client-0.0.1-standalone.jar , copy it to some-client-0.0.0-standalone.jar directory. Client receive sequence of commands needed to

Configure eclipse osgi log

拥有回忆 提交于 2019-12-21 09:07:42
问题 I am using eclipse osgi jar. How to redirect the log generated by osgi to a file ? Whenever I start the osgi framework, it generates a log like 1317008078357.log. How to redirect this log to a custome file. Do I need to use log4j as a osgi bundle? what will be the log4j.xml configuration ? log file contains: !SESSION 2011-09-26 11:34:38.232 ----------------------------------------------- eclipse.buildId=unknown java.version=1.6.0_26 java.vendor=Sun Microsystems Inc. BootLoader constants: OS

Which dependencies do I need to use Mockito and JUnit in an Eclipse RCP Tycho project

旧城冷巷雨未停 提交于 2019-12-21 08:00:11
问题 This is my current test fragment: <packaging>eclipse-test-plugin</packaging> <dependencies> <dependency> <groupId>org.junit</groupId> <artifactId>com.springsource.org.junit</artifactId> <version>4.7.0</version> </dependency> </dependencies> with the following plugins configuration: <plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>tycho-surefire-plugin</artifactId> <version>${tycho.version}</version> <configuration> <dependencies> <dependency> <type>p2-installable-unit</type>