karaf

Java classloader usage in OSGi

那年仲夏 提交于 2019-12-14 03:54:44
问题 I have a question about the usage of Java ClassLoader in OSGi. I wrote two OSGi bundles, namely server bundle and client bundle. In server bundle, I implemented BundleActivator like: public class Activator implements BundleActivator { public void start(BundleContext context) { System.out.println("[Server:Activator.java:26] " + Activator.class.getClassLoader()); context.registerService(HelloService.class, new HelloService(), null); } public void stop(BundleContext context) { System.out.println

Install odl-restconf in custom karaf distribution

蹲街弑〆低调 提交于 2019-12-13 07:18:56
问题 I have a custom karaf installation. I want to do a feature:install odl-restconf. for doing this i have done a feature:repo-add of feature file available in the below location https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/controller/features-restconf/1.3.0-SNAPSHOT/ After this i have made entries in karaf org.ops4j.pax.url.mvn.cfg file and added the below url as part of maven repo http://nexus.opendaylight.org/content/repositories@id=public, \ http:

How to connect Opendaylight to Mininet?

自闭症网瘾萝莉.ら 提交于 2019-12-12 22:32:42
问题 I've been working in a simple Hello World project to learn the basics for Opendaylight (I was following this tutorial). Now I want to connect this build of the controller to a network topology defined by Mininet but this is not working. I read that this may be due to I haven't installed odl-l2switch but when I type feature:list --installed the bundle doesn't appear and when I type feature:install odl-l2switch it doesn't appear neither. Perhaps it is because the way I created the project: mvn

dev:watch does not reload bundles on JBoss Fuse 6.3.0

人走茶凉 提交于 2019-12-12 18:43:01
问题 I am porting my code from JBoss Fuse 6.2.1 to JBoss Fuse 6.3.0. On my development environment I used Maven to build -SNAPSHOTS of my Java projects, and have them automatically deployed using dev:watch command. I installed my bundle with install mvn:my.groupid/my-artifactid/version-SNAPSHOT and then dev:watch ID . Following mvn install builds do not get automatically loaded inside JBoss Fuse, no messages in any log. What could be the cause? 回答1: A default configuration has changed between

How to call karaf console command in Java

扶醉桌前 提交于 2019-12-12 02:49:31
问题 If I want to execute a karaf shell command in my plugin (java), how to do it? ex: opendaylight-user@root> snmp4sdn:printdb "org.apache.felix.service.command.CommandProcessor" can handle it ? 回答1: In Karaf 3, you have to use the Felix Gogo services, ie the CommandProcessor . From a CommandProcessor , you can create a CommandSession and then call execute on this session. Two notes on this: In Karaf4, the service has changed - it's not dependent on Gogo anymore All the shell commands use an

Karaf stops unexpectedly

限于喜欢 提交于 2019-12-12 02:37:40
问题 After upgrading Karaf from 2.2.11 to 4.0.3 with log4j2 support and running load tests of our Karaf based application, Karaf unexpectedly starts shutdown process. We increased most of memory options but it did not help. No info in logs - just "Stopping blueprint extender" and "Unregistering bundles...". Above these messages there was debug info from my bundles. In manifest files of our bundles old OSGI container is used (org.osgi.framework;version="1.3.0"). This occurs for single threaded

Karaf Pax Exam fails with Unknown protocol: wrap

做~自己de王妃 提交于 2019-12-11 19:12:18
问题 Hi my pax exam fails with the error Unknown protocol: wrap org.apache.karaf.features.internal.util.MultiException: Error at org.apache.karaf.features.internal.download.impl.MavenDownloadManager$MavenDownloader.<init>(MavenDownloadManager.java:84)[9:org.apache.karaf.features.core:4.0.4] at org.apache.karaf.features.internal.download.impl.MavenDownloadManager.createDownloader(MavenDownloadManager.java:72)[9:org.apache.karaf.features.core:4.0.4] at org.apache.karaf.features.internal.region

Howto: osgi and shared packages?

北战南征 提交于 2019-12-11 17:53:02
问题 Im trying to write an osgi-application that should make use of the org.elasticsearch.client.RestHighLevelClient. For this I have added the bundle servicemix.bundles.elasticsearch-client since it exports org.elasticsearch.client with the needed RestHighLevelClient . Apparently though, it seems that the RestHighLevelClient needs servicemix.bundles.elasticsearch (amongst others) to work so I add that aswell - both of the same version. Both of the bundles export org.elasticsearch.client but with

Karaf add additional property to existing config file

天大地大妈咪最大 提交于 2019-12-11 12:49:11
问题 I have a bundle which uses a configuration file org.jemz.karaf.tutorial.hello.service.config.cfg with one property: org.jemz.karaf.tutorial.hello.service.msg="I am a HelloServiceConfig!!" My blueprint for using ConfigAdmin is like: <cm:property-placeholder persistent-id="org.jemz.karaf.tutorial.hello.service.config" update-strategy="reload" > <cm:default-properties> <cm:property name="org.jemz.karaf.tutorial.hello.service.msg" value="Hello World!"/> </cm:default-properties> </cm:property

Karaf exception is thrown while installing org.fusesource.leveldbjni

大兔子大兔子 提交于 2019-12-11 01:56:39
问题 Hi i am trying to install the below dependency in karaf <dependency> <groupId>org.fusesource.leveldbjni</groupId> <artifactId>leveldbjni-all</artifactId> <version>1.8</version> </dependency> I am getting the below Exception Exception caught while executing command org.apache.karaf.shell.console.MultiException: Error executing command on bundles: Unable to execute command on bundle 564: The bundle "org.fusesource.leveldbjni.leveldbjni-all_1.8.0 [564]" could not be resolved. Reason: No match