apache-karaf

How to detect if Karaf is ready to accept commands via 'client'?

廉价感情. 提交于 2019-12-06 08:33:11
问题 I'm trying to automate the setup of karaf server by issuing commands through bin/client. But I have the following issues: After starting bin/start, I have no idea how long I need to wait before karaf can start accepting commands After each command via bin/client, the subsequent bin/client commands will fail with message 'Failed to acquire the session' for some time, it looks like the previous command is still executed and I must wait some unpredictable amount of time for it to finish. After

Does Karaf support downloading of transitive dependencies from maven central?

旧时模样 提交于 2019-12-06 07:31:18
I am trying to use Karaf and I was wondering if it is possible to configure it to pull the transitive dependencies from the Apache Maven Central repository. Without having to use "embedded bundles" I already know you can pull explicit dependencies, the key part of the the question is the "transitive" ones. I also know you can use OBR to read from a repository.xml file in a deployed site, but I can't find one for Maven central. A possible answer to the question would be to add the URL, but I can't find it documented anywhere what the repository.xml URL is. At the moment, my work around is to

client-certificate authentication on jetty (karaf)

我怕爱的太早我们不能终老 提交于 2019-12-06 01:38:19
I need to do client authentication using certificate on jetty server. I have done this on Tomcat using: <Connector protocol="org.apache.coyote.http11.Http11Protocol" port="8443" maxThreads="200" minSpareThreads="5" enableLookups="true" disableUploadTimeout="true" acceptCount="100" scheme="https" secure="true" SSLEnabled="true" keystoreFile="D:\certificates\certs\server.jks" keystoreType="JKS" keystorePass="password" truststoreFile="D:\certificates\certs\trust_store.jks" truststoreType="JKS" truststorePass="password" clientAuth="true" sslProtocol="TLS"/> But i want to do it on karaf, so i

How Apache Karaf sorts bundles to install and start?

£可爱£侵袭症+ 提交于 2019-12-05 18:21:38
I have defined four bundles: bundle 1 : export package x version 1 bundle 2 : import package x ver [1,2] and export package y;y uses x bundle 3 : export package x version 2 bundle 4 : import package y and also import package x version 2 Using apache felix (distribuable binary), I found that I should manually impose to not resolve (or start) the bundle 1 and then bundle 2 before starting the bundle 3 (otherwise a uses constraint problem appears because bundle 2 will use package x version 1 and in bundle 4 will appear package x version 1 and version 2 --> uses constraint violation). Thanks to

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

ScriptEngineManager and ScriptEngine can not be loaded in Karaf OSGi (Nashorn not found)

拈花ヽ惹草 提交于 2019-12-04 23:48:30
问题 I am trying to use ScriptEngineManager and ScriptEngine to execute some JavaScript code with Java. I use Java 8 I am executing this code under Karaf OSGi. The example I used works fine in a sample Java Class, but packing it in a bundle gives me this error ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider jdk.nashorn.api.scripting.NashornScriptEngineFactory not found When I look to the headers of the bundle, I see that the bundle imports javax.script, the package

How to detect if Karaf is ready to accept commands via 'client'?

倾然丶 夕夏残阳落幕 提交于 2019-12-04 11:59:23
I'm trying to automate the setup of karaf server by issuing commands through bin/client. But I have the following issues: After starting bin/start, I have no idea how long I need to wait before karaf can start accepting commands After each command via bin/client, the subsequent bin/client commands will fail with message 'Failed to acquire the session' for some time, it looks like the previous command is still executed and I must wait some unpredictable amount of time for it to finish. After issuing commands, I need to stop karaf. But as long as I don't know if the last command has finished, I

How can I validate xsd using apache camel?

久未见 提交于 2019-12-04 09:44:05
问题 I'm using apacheservicemix and I try to validate a xml document with apache camel. I have this route called students_route.xml : <?xml version="1.0" encoding="UTF-8"?> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd"> <camelContext xmlns="http://camel.apache.org/schema/blueprint"> <route> <from uri="file

Apache Karaf vs. Servicemix

不问归期 提交于 2019-12-04 07:44:57
问题 Is anyone using Karaf instead of Servicemix? If so, how did you come to this decision? I'm aware that Servicemix adds a layer of functionality around Karaf, just curious if Karaf is being used on its own and why... 回答1: We're using Karaf for a number of our applications. We were already using Camel (JMS and Esper) for integration between several different platforms (a JBoss 4.2 instance, a Tomcat and several Felix instances) and as this was working well there was little justification in

ScriptEngineManager and ScriptEngine can not be loaded in Karaf OSGi (Nashorn not found)

青春壹個敷衍的年華 提交于 2019-12-03 16:37:38
I am trying to use ScriptEngineManager and ScriptEngine to execute some JavaScript code with Java. I use Java 8 I am executing this code under Karaf OSGi. The example I used works fine in a sample Java Class, but packing it in a bundle gives me this error ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider jdk.nashorn.api.scripting.NashornScriptEngineFactory not found When I look to the headers of the bundle, I see that the bundle imports javax.script, the package of the called classes but it seems that (nashorn) the provider is not found. Thanks Go to file etc