[ 
https://issues.apache.org/jira/browse/KARAF-1976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jean-Baptiste Onofré reassigned KARAF-1976:
-------------------------------------------

    Assignee: Jean-Baptiste Onofré
    
> Shell attempts to execute sub-shell actions as commands
> -------------------------------------------------------
>
>                 Key: KARAF-1976
>                 URL: https://issues.apache.org/jira/browse/KARAF-1976
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>    Affects Versions: 3.0.0
>            Reporter: Victor Antonovich
>            Assignee: Jean-Baptiste Onofré
>
> In Apache Karaf 3.0.0-SNAPSHOT shell treats sub-shell actions as commands, 
> i.e. command line "config --help" lead to exception:
> java.lang.NullPointerException
>       at 
> org.apache.karaf.shell.commands.basic.DefaultActionPreparator.prepare(DefaultActionPreparator.java:73)
>       at 
> org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:32)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at 
> org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
>       at 
> org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
>       at 
> org.apache.karaf.shell.console.commands.$BlueprintCommand1093027430.execute(Unknown
>  Source)
>       at 
> org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)
>       at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
>       at 
> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
>       at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
>       at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
>       at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
>       at 
> org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
>       at 
> org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:182)
>       at java.lang.Thread.run(Thread.java:662)
>       at 
> org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.doRun(ConsoleFactoryService.java:102)
>       at 
> org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3$1.run(ConsoleFactoryService.java:93)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at javax.security.auth.Subject.doAs(Subject.java:337)
>       at 
> org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.run(ConsoleFactoryService.java:91)
> And worst thing is that this bug makes "ssh" command unusable because shell 
> trying to execute "ssh" sub-shell action. This problem can be solved by using 
> full command name "ssh:ssh", but this is impossible in case of derived shell 
> commands, for example "instance:connect".
> It seems shell should ignore sub-shell actions while resolving command with 
> argument(s).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to