karaf

Can't capture Apache Karaf client output

元气小坏坏 提交于 2019-12-05 05:55:11
I started Apache Karaf 3.0.0 in server mode using $KARAF_HOME/bin/start in CentOS 6.5. Then I wanted to run several commands using $KARAF_HOME/bin/client and also capture the output of these commands, so as to make sure the commands ran successfully. The output did get spit out on my console but I was never able to redirect it into a file. Seems like Karaf doesn't write anything to the output stream or error stream. I tried the following: [apache-karaf-3.0.0]$ ./bin/start clean [apache-karaf-3.0.0]$ ./bin/client "bundle:list" Logging in as karaf 282 [pool-2-thread-3] WARN org.apache.sshd

How to install Hibernate 5 into Apache Karaf v4

雨燕双飞 提交于 2019-12-04 16:24:53
I've installed Apache Karaf v4.03 and queried the list of available features for Hibernate, as listed below. Unfortunately, I am using Hibernate v5. hibernate | 3.3.2.GA | | Uninstalled | enterprise-4.0.3 | Hibernate 3.x JPA persistence engine support hibernate | 4.2.15.Final | | Uninstalled | enterprise-4.0.3 | Hibernate 4.2.x JPA persistence engine support hibernate-envers | 4.2.15.Final | | Uninstalled | enterprise-4.0.3 | Hibernate Envers 4.2.x hibernate | 4.3.6.Final | | Uninstalled | enterprise-4.0.3 | Hibernate 4.3.x JPA persistence engine support hibernate-envers | 4.3.6.Final | |

How to call karaf console command in Java

匿名 (未验证) 提交于 2019-12-03 01:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: 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 underlying osgi service. It's always better to use

Can i place third party jars in karaf (any specific folder) to resolve transitive dependencies?

十年热恋 提交于 2019-12-02 01:12:46
问题 I have various self made projects that have third party libraries dependencies. I am bundling them for OSGI container but unable to resolve deep dependencies in my projects. Now i am looking for karaf folder where i can place my libraries so bundles can directly access them and not to install them. More over i am using maven too. EDIT: After following your 'feature' solution i am able to produce manifest containg transitive dependencies but problem is now it also look for very common java

Karaf - Kafka OSGI bundle - Producer issue

谁说我不能喝 提交于 2019-12-01 08:15:01
I am trying to create a simple bundle for Kafka producer in apache Karaf version 4.0.3 . Here is my Java code Properties props = new Properties(); props.put("bootstrap.servers", "localhost:9092"); props.put("acks", "all"); props.put("retries", 0); props.put("batch.size", 16384); props.put("linger.ms", 1); props.put("buffer.memory", 33554432); //props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer"); //props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer"); props.put("partitioner.class","org.apache.kafka.clients.producer.internals

Karaf - Kafka OSGI bundle - Producer issue

夙愿已清 提交于 2019-12-01 06:50:29
问题 I am trying to create a simple bundle for Kafka producer in apache Karaf version 4.0.3 . Here is my Java code Properties props = new Properties(); props.put("bootstrap.servers", "localhost:9092"); props.put("acks", "all"); props.put("retries", 0); props.put("batch.size", 16384); props.put("linger.ms", 1); props.put("buffer.memory", 33554432); //props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer"); //props.put("value.serializer", "org.apache.kafka.common

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

孤者浪人 提交于 2019-11-30 00:18:02
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 around (google). I read about Karaf's features but it seems that despite the fact that it is a nice