Hi,

I have a problem extending the console with own commands, when I run Karaf with Equinox.

To check this problem again, I installed a simple "Hello World" command with blueprint and minimal dependencies on Karaf/Felix and on Karaf/Equinox, both in a virgin state (deleted data directory).

With Karaf/Felix the command is executed, with Karaf/Equinox it is not executed. Instead I get the error message "Command not found: hello:world".

I am running the latest release 2.2.1, build on my system, but I have also reproduced the problem with the 2.2.0 binary distribution.

The following log outputs appears only with Karaf/Felix:
org.apache.aries.blueprint - 0.3.0 | Retrieving service for bundle org.apache.karaf.shell.console [22] and service registration org.apache.felix.framework.ServiceRegistrationImpl@5cd5a2a9
org.apache.aries.blueprint - 0.3.0 | Creating service instance
org.apache.aries.blueprint - 0.3.0 | Service created: org.apache.karaf.shell.console.commands.BlueprintCommand@34bdb859
org.apache.aries.blueprint - 0.3.0 | Creating listeners
org.apache.aries.blueprint - 0.3.0 | Listeners created: []
org.apache.aries.blueprint - 0.3.0 | Calling listeners for initial service registration org.apache.aries.blueprint - 0.3.0 | Method entry: getService, args org.apache.karaf.shell.console.commands.BlueprintCommand@34bdb859
org.apache.aries.blueprint - 0.3.0 | Instantiating component shell-181
org.apache.aries.blueprint - 0.3.0 | Instantiating component blueprintBundleContext

Up to this point the log output is equal with both frameworks (see below).

What might be the problem?

Stefan

osgi.test - 0.0.1 | BundleEvent INSTALLED
org.apache.aries.blueprint - 0.3.0 | Retrieving service for bundle org.apache.karaf.shell.console_2.2.0 [22] and service registration {org.apache.karaf.shell.console.CompletableFunction, org.apache.felix.service.command.Function}={osgi.command.function=start, osgi.command.scope=osgi, service.id=152}
org.apache.aries.blueprint - 0.3.0 | Creating service instance
org.apache.aries.blueprint - 0.3.0 | Service created: org.apache.karaf.shell.console.commands.BlueprintCommand@1648ff68
org.apache.aries.blueprint - 0.3.0 | Creating listeners
org.apache.aries.blueprint - 0.3.0 | Listeners created: []
org.apache.aries.blueprint - 0.3.0 | Calling listeners for initial service registration org.apache.aries.blueprint - 0.3.0 | Method entry: getService, args org.apache.karaf.shell.console.commands.BlueprintCommand@1648ff68
org.apache.aries.blueprint - 0.3.0 | Instantiating component shell-135
org.apache.aries.blueprint - 0.3.0 | Instantiating component blueprintBundleContext org.apache.aries.blueprint - 0.3.0 | Scanning bundle osgi.test for blueprint application
osgi.test - 0.0.1 | BundleEvent RESOLVED
org.apache.aries.blueprint - 0.3.0 | Found blueprint application in bundle osgi.test with paths: [bundleentry://42.fwk572511714/OSGI-INF/blueprint/commands.xml] org.apache.aries.blueprint - 0.3.0 | Running blueprint container for bundle osgi.test in state Unknown org.apache.aries.blueprint - 0.3.0 | Sending blueprint container event BlueprintEvent[type=CREATING] for bundle osgi.test org.apache.karaf.shell.osgi - 2.2.0 | Blueprint app state changed to Creating for bundle 42
osgi.test - 0.0.1 | BundleEvent STARTED
org.apache.aries.blueprint - 0.3.0 | Running blueprint container for bundle osgi.test in state WaitForNamespaceHandlers org.apache.aries.blueprint - 0.3.0 | Running blueprint container for bundle osgi.test in state Populated
org.apache.aries.blueprint - 0.3.0 | Tracking service references: []
org.apache.aries.blueprint - 0.3.0 | Running blueprint container for bundle osgi.test in state WaitForInitialReferences org.apache.aries.blueprint - 0.3.0 | Running blueprint container for bundle osgi.test in state InitialReferencesSatisfied org.apache.aries.blueprint - 0.3.0 | Running blueprint container for bundle osgi.test in state WaitForInitialReferences2 org.apache.aries.blueprint - 0.3.0 | Running blueprint container for bundle osgi.test in state Create org.apache.aries.blueprint - 0.3.0 | Registering service shell-182 with interfaces [org.apache.karaf.shell.console.CompletableFunction, org.apache.felix.service.command.Function] and properties {osgi.command.function=world, osgi.command.scope=hello}
osgi.test - 0.0.1 | ServiceEvent REGISTERED
org.apache.aries.blueprint - 0.3.0 | Instantiating components: [blueprintContainer, blueprintBundle, blueprintBundleContext, blueprintConverter]
osgi.test - 0.0.1 | ServiceEvent REGISTERED
org.apache.aries.blueprint - 0.3.0 | Sending blueprint container event BlueprintEvent[type=CREATED] for bundle osgi.test org.apache.karaf.shell.osgi - 2.2.0 | Blueprint app state changed to Created for bundle 42 org.apache.aries.blueprint - 0.3.0 | Running blueprint container for bundle osgi.test in state Created


Reply via email to