Hi SMX users, I'm trying to extend the Karaf console (Apache ServiceMix 4.3). I found two different tutorials for this task on the net:
http://servicemix.apache.org/kernel/61-extending-the-console.html http://felix.apache.org/site/61-extending-the-console.html I have been able to compile both projects successfully. However I can't get them working. The servicemix example seems to depend on several other bundles, I added Apache ServiceMix Kernel :: GShell Core (1.1.0), but there is still something missing: org.osgi.framework.BundleException: Unresolved constraint in bundle gshell-commmands [206]: Unable to resolve 206.0: missing requirement [206.0] package; (&(package=org.apache.geronimo.gshell.command)(version>=1.0.0)(!(version>=2.0.0))) [caused by: Unable to resolve 207.0: missing requirement [207.0] package; (&(package=com.google.code.sshd)(version>=0.1.0))] ... I wasn't unfortunately able to find a bundle exporting this package. The other example comes from the felix page and it looks a bit easier to understand. However I can't get it to run too. All I get is a java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 ... So my questions is: does anyone have a running example for this task? What did I miss? Any hint is highly appreciated! Cheers, Andy The error messages: 09:27:58,082 | INFO | l Console Thread | Console | 11 - org.apache.karaf.shell.console - 2.1.3 | Exception caught while executing command org.osgi.framework.BundleException: Unresolved constraint in bundle gshell-commmands [206]: Unable to resolve 206.0: missing requirement [206.0] package; (&(package=org.apache.geronimo.gshell.command)(version>=1.0.0)(!(version>=2.0.0))) [caused by: Unable to resolve 207.0: missing requirement [207.0] package; (&(package=com.google.code.sshd)(version>=0.1.0))] at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3446)[org.apache.felix.framework-3.0.9.jar:] at org.apache.felix.framework.Felix.startBundle(Felix.java:1734)[org.apache.felix.framework-3.0.9.jar:] at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:918)[org.apache.felix.framework-3.0.9.jar:] at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)[org.apache.felix.framework-3.0.9.jar:] at org.apache.karaf.shell.osgi.StartBundle.doExecute(StartBundle.java:29)[8:org.apache.karaf.shell.osgi:2.1.3] at org.apache.karaf.shell.osgi.BundlesCommand.doExecute(BundlesCommand.java:49)[8:org.apache.karaf.shell.osgi:2.1.3] at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[11:org.apache.karaf.shell.console:2.1.3] at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[11:org.apache.karaf.shell.console:2.1.3] at org.apache.felix.gogo.runtime.shell.CommandProxy.execute(CommandProxy.java:50)[11:org.apache.karaf.shell.console:2.1.3] at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:229)[11:org.apache.karaf.shell.console:2.1.3] at org.apache.felix.gogo.runtime.shell.Closure.executeStatement(Closure.java:162)[11:org.apache.karaf.shell.console:2.1.3] at org.apache.felix.gogo.runtime.shell.Pipe.run(Pipe.java:101)[11:org.apache.karaf.shell.console:2.1.3] at org.apache.felix.gogo.runtime.shell.Closure.execute(Closure.java:79)[11:org.apache.karaf.shell.console:2.1.3] at org.apache.felix.gogo.runtime.shell.CommandSessionImpl.execute(CommandSessionImpl.java:71)[11:org.apache.karaf.shell.console:2.1.3] at org.apache.karaf.shell.console.jline.Console.run(Console.java:170)[11:org.apache.karaf.shell.console:2.1.3] at java.lang.Thread.run(Thread.java:662)[:1.6.0_27] java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.RangeCheck(ArrayList.java:547)[:1.6.0_27] at java.util.ArrayList.get(ArrayList.java:322)[:1.6.0_27] at org.apache.aries.blueprint.container.BlueprintContainerImpl.checkDirectives(BlueprintContainerImpl.java:182)[7:org.apache.aries.blueprint:0.2.0.incubating] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:234)[7:org.apache.aries.blueprint:0.2.0.incubating] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:213)[7:org.apache.aries.blueprint:0.2.0.incubating] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_27] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_27] at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_27] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)[:1.6.0_27] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)[:1.6.0_27] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_27] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_27] at java.lang.Thread.run(Thread.java:662)[:1.6.0_27]
