You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Paul Spencer <pa...@mindspring.com> on 2020/07/17 15:37:55 UTC

"scr --help" returns nothing even though scr command exist.

Karaf 4.2.0 and 4.3.0-SNAPSHOT

There are several commands with the scope of "scr" but they are not displayed by "scr --help".  The commands are displayed by command completer

   karaf@root()> scr --help
   karaf@root()>               

   karaf@root()> scr:  (Tab pressed to invoke the command completer)
   scr:config    scr:disable   scr:enable    scr:info      scr:list

Help on a scr command like scr:info produces the following error

karaf@root()> scr:info --help
Error executing command: No component description matching "--help".
karaf@root()> 

***
* From karaf.log
***
11:33:03.610 ERROR [Karaf ssh console user karaf] Exception caught while executing command
java.lang.IllegalArgumentException: No component description matching "--help".
	at org.apache.felix.scr.impl.ComponentCommands.info(ComponentCommands.java:179) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_172]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_172]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_172]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_172]
	at org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:143) ~[?:?]
	at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:91) ~[?:?]
	at org.apache.karaf.shell.impl.console.osgi.CommandTracker$1.execute(CommandTracker.java:112) ~[?:?]
	at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) ~[?:?]
	at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) ~[?:?]
	at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?]
	at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) ~[?:?]
	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) ~[?:?]
	at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?]
	at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?]
	at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_172]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_172]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_172]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_172]


Is this a bug?

Should I create a Jira?

Paul Spencer



Re: "scr --help" returns nothing even though scr command exist.

Posted by João Assunção <jo...@exploitsys.com>.
You have two types of commands in Karaf shell: Karaf commands and gogo
commands. Karaf commands provide more bells and whistles than gogo
commands, --help being one of them.

I think scr:<cmd> are gogo commands.

Best regards,
João Assunção

On Fri, 17 Jul 2020, 16:38 Paul Spencer, <pa...@mindspring.com> wrote:

> Karaf 4.2.0 and 4.3.0-SNAPSHOT
>
> There are several commands with the scope of "scr" but they are not
> displayed by "scr --help".  The commands are displayed by command completer
>
>    karaf@root()> scr --help
>    karaf@root()>
>
>    karaf@root()> scr:  (Tab pressed to invoke the command completer)
>    scr:config    scr:disable   scr:enable    scr:info      scr:list
>
> Help on a scr command like scr:info produces the following error
>
> karaf@root()> scr:info --help
> Error executing command: No component description matching "--help".
> karaf@root()>
>
> ***
> * From karaf.log
> ***
> 11:33:03.610 ERROR [Karaf ssh console user karaf] Exception caught while
> executing command
> java.lang.IllegalArgumentException: No component description matching
> "--help".
>         at org.apache.felix.scr.impl.ComponentCommands.info(ComponentCommands.java:179)
> ~[?:?]
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> ~[?:1.8.0_172]
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> ~[?:1.8.0_172]
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> ~[?:1.8.0_172]
>         at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_172]
>         at
> org.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:143) ~[?:?]
>         at
> org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:91)
> ~[?:?]
>         at
> org.apache.karaf.shell.impl.console.osgi.CommandTracker$1.execute(CommandTracker.java:112)
> ~[?:?]
>         at
> org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68)
> ~[?:?]
>         at
> org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86)
> ~[?:?]
>         at
> org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?]
>         at
> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526)
> ~[?:?]
>         at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415)
> ~[?:?]
>         at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?]
>         at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?]
>         at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> ~[?:1.8.0_172]
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> ~[?:1.8.0_172]
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> ~[?:1.8.0_172]
>         at java.lang.Thread.run(Thread.java:748) [?:1.8.0_172]
>
>
> Is this a bug?
>
> Should I create a Jira?
>
> Paul Spencer
>
>
>