apache-karaf

Using logback with Karaf 3.0.5 running under ServiceMix

馋奶兔 提交于 2020-01-05 18:01:08
问题 I am trying to use logback with Karaf 3.0.5 running under ServiceMix. This is what I have done till now as mentioned in this question. This is what I have done till now:- Removed pax-logging-service by doing uninstall <pax-logging-bundle-id> Removed lib/bin/karaf-client.jar Inside lib placed the following jars:- jcl-over-slf4j-1.7.13 , jul-to-slfj-17.13.jar , logback-classic-1.0.13.jar , logback-core-1.0.13.jar & osgi-over-slf4j-1.7.13.jar From /etc/startup.properties - removed references to

camel-hdfs2 No FileSystem for scheme: hdfs

耗尽温柔 提交于 2020-01-03 05:21:42
问题 I got the some errors when I use camel-hdfs2 in my OSGI project(base on karaf) My environment: Apache Karaf v4.0.4 Apache Camel v2.15.2 Apache Camel hdfs2 v2.15.2 Error is: No FileSystem for scheme: hdfs Error detail: 2016-07-07 15:59:52,141 | ERROR | pool-14-thread-1 | BlueprintCamelContext | 36 - org.apache.camel.camel-blueprint - 2.15.2 | Error occurred during starting Camel: CamelContext(intelligenceCollectorWorkCamelContext) due Failed to create Producer for endpoint: Endpoint[hdfs2:/

How to set custom REST port for apache ignite when ignite is started as a service in Opendaylight apache karaf?

与世无争的帅哥 提交于 2020-01-03 05:04:05
问题 Opendaylight uses port 8080 which is the same as the default ignite REST http port. So i tried to change the port on which ignite listens for REST requests. Here is a java code snippet for this. System.setProperty("IGNITE_JETTY_PORT","7111"); System.setProperty("IGNITE_JETTY_HOST","localhost"); ignite = Ignition.start(config); The above works fine and changes the ignite REST port when i run in eclipse. But fails when i start an ignite instance in apache karaf. 回答1: I think you may try with

Pax Exam issue with Apache POI wrapped bundle

不想你离开。 提交于 2020-01-03 04:26:04
问题 I have been beating my head against the wall trying to get Apache POI to work within an OSGi bundle. Here is the history of what I have tried with no luck: 1) I initially tried using the pre wrapped Apache Servicemix POI bundle. However this had many dependencies I had to deploy, many of which were not needed. I hit a wall as even after adding Apache POI servicemix (and its dependencies), i was still getting issues with missing classes. 2) Due to the amount of unneeded stuff in the first

List bundle ID's only on servicemix

杀马特。学长 韩版系。学妹 提交于 2020-01-02 12:00:13
问题 I'm using ServiceMix and I was trying to list some bundles and retrieve only there bundle ID. I'm trying to do the following: osgi:list | grep -i | awk xxx I tried to use awk but that's not provided in ServiceMix. I also tried to use shell:exec like this: osgi:list | grep -i | shell:exec awk 'xxx' But that doesn't work either, maybe my approach is completely wrong. Does anybody else have some experience how I could achieve my goal of only retrieving the id's of a bundle? 回答1: You can always

Debug Karaf bundles in Eclipse: persist dev:watch URLs/IDs?

三世轮回 提交于 2020-01-02 10:34:33
问题 I want to be able to easily debug an OSGi bundle running in Apache Karaf from Eclipse. The easiest way I've identified so far is to create a Java Application launcher that starts Karaf. If the bundle was previously installed then I can set breakpoints, even in the activator, and all is good. The issue is that when a change is made to the code, mvn install invoked, and then the Eclipse Karaf launcher invoked, I am running the old cached version of the bundle. I have played with running Karaf

Debug Karaf bundles in Eclipse: persist dev:watch URLs/IDs?

大兔子大兔子 提交于 2020-01-02 10:33:04
问题 I want to be able to easily debug an OSGi bundle running in Apache Karaf from Eclipse. The easiest way I've identified so far is to create a Java Application launcher that starts Karaf. If the bundle was previously installed then I can set breakpoints, even in the activator, and all is good. The issue is that when a change is made to the code, mvn install invoked, and then the Eclipse Karaf launcher invoked, I am running the old cached version of the bundle. I have played with running Karaf

How to work with frequent local snapshot bundle deployments on Karaf?

浪子不回头ぞ 提交于 2019-12-29 19:00:06
问题 I decided to build an application on top of OSGI and Karaf - I really like this stuff. However, I'm struggling a bit with a daily deployment on my local, development machine. I mean.. I make a change and then I would like to test it on my local Karaf instance. And it can happen like couple times per hour. The way I'm doing it now is a maven build that creates a JAR bundle and then it's copied into the Karaf's deploy directory. I think that it isn't elegant at all. I was trying to find a way

Camel not finding “sftp” component in registry and shutting down

▼魔方 西西 提交于 2019-12-25 04:10:47
问题 I'm using the camel-sftp component to upload a file to an SFTP server. The code is simple: File source = new File(path); final String sftpUri = "sftp://" + userId + "@" + serverAddress + "/" + remoteDirectory+"?password="+pwd; CamelContext context = new DefaultCamelContext(); context.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { from("file:/" + path).to(sftpUri); } }); context.start(); Thread.sleep(10000); context.stop(); However, camel has problems

implementing component factory for multiple class with same names and retrieving through property/filter values

泪湿孤枕 提交于 2019-12-25 00:38:09
问题 I am working on OSGi(Rev 4) project in which i have to use karaf registry. Either i can declare my implementation as Component or Service. ie) I can register my component/service in karaf with component factory/service Factory to produce objects of Component/Service. I am having multiple class implementations, so with Service factory i hope it is achievable with single class ie) by registering all the services with the same name with different property/filter values.While retrieving service i