To use any karaf commands you need to install the karaf shell instead of the felix gogo shell. Unfortunately the commands are not compatible. The good news is that I already tested this and the karaf shell works fine in bndtools.

I do not have a complete example ready at the moment. Basically you need to create and index from a pom. Start with the karaf shell.core bundle. It provides support for the new karaf 4 style commands.

Then create a bndrun from this index and require the bundle. You might need to add additional bundles to the index. The resolver should help you to find which.

Then the more difficult part is to get the shell to work. Luckily I figured this out already:

-runproperties: \
    felix.cm.loglevel=4,\
    felix.fileinstall.log.level=4,\
    karaf.systemBundlesStartLevel=0,\
    org.ops4j.pax.logging.DefaultServiceLog.level=INFO,\
    karaf.startLocalConsole=true,\
    felix.fileinstall.dir=./etc,\
    karaf.local.roles='admin,manager,viewer,systembundles',\
    felix.fileinstall.noInitialDelay=true

The core is karaf.startLocalConsole and karaf.local.roles. Without these the karaf shell will not start up.

Christian

On 09.02.2017 03:09, G. Y. wrote:

Hi,

I am trying to follow the karaf tutorial, Database Access <http://liquid-reality.de/display/liquid/2012/01/13/Apache+Karaf+Tutorial+Part+6+-+Database+Access> part. Things are working fine from Karaf. However, I am doing my development in Maven/Eclipse and using BndTools with Felix 5.6.1 framework for my execution and bnd-maven-plugin to build my bundles. In my BndTools, I want to be able to see whether my datasources are available using the command 'jdbc:ds-list', the same way I successfully did in karaf. So, I determined the list of bundles installed with the karaf 'jdbc' feature and added all those bundles to my execution requirement in my bndrun (from a local index I built with the bnd index plugin). However, I am not able to get the 'jdbc' commands (jdbc:ds-list does not work and 'help' does not show the 'jdbc' commands). Am I missing something? Aren't the commands built in standard way in OSGi and therefore usable seamlessly inside any framework?

Thank you!
--
--
------------------
OPS4J - http://www.ops4j.org - [email protected]

---
You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

--
--
------------------
OPS4J - http://www.ops4j.org - [email protected]

--- You received this message because you are subscribed to the Google Groups "OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to