You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Saurabh Garg <ga...@gmail.com> on 2012/04/06 21:46:43 UTC

Error when using tab completion for an Action with no arguments

Hello,

I am getting the following error when extending karaf.shell.console. I
have an Action class which does not have any arguments but has couple
of options.
e.g.
cleanConfig
cleanConfig -force
cleanConfig -force -verbose

When I use tab completion after typing cleanConfig, I get the following error:

java.lang.ArrayIndexOutOfBoundsException: -1
        at java.util.ArrayList.get(ArrayList.java:324)
        at org.apache.karaf.shell.console.completer.ArgumentCompleter.complete(ArgumentCompleter.java:307)
        at org.apache.karaf.shell.console.completer.AggregateCompleter$Completion.complete(AggregateCompleter.java:86)
        at org.apache.karaf.shell.console.completer.AggregateCompleter.complete(AggregateCompleter.java:51)
        at org.apache.karaf.shell.console.completer.CommandsCompleter.complete(CommandsCompleter.java:56)
        at org.apache.karaf.shell.console.jline.CompleterAsCompletor.complete(CompleterAsCompletor.java:32)
        at jline.console.ConsoleReader.complete(ConsoleReader.java:1473)
        at jline.console.ConsoleReader.readLine(ConsoleReader.java:1231)
        at jline.console.ConsoleReader.readLine(ConsoleReader.java:1089)
        at org.apache.karaf.shell.console.jline.Console.run(Console.java:194)
        at org.apache.karaf.shell.console.Main.run(Main.java:191)
        at org.apache.karaf.shell.console.Main.run(Main.java:89)

Thanks in advance for any help,

Saurabh

Re: Error when using tab completion for an Action with no arguments

Posted by Saurabh Garg <ga...@gmail.com>.
Hi JB,

Any update on this?

Saurabh

On Sat, Apr 7, 2012 at 6:24 AM, Saurabh Garg <ga...@gmail.com> wrote:
> Thanks JB. If you are unable to reproduce it, let me know and I will
> try to get you code for reproducing the issue.
>
> Saurabh
>
> On Fri, Apr 6, 2012 at 11:53 PM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>> Hi Surabh,
>>
>> it was a known issue:
>>
>> https://issues.apache.org/jira/browse/KARAF-1018
>>
>> But I wasn't able to reproduce.
>>
>> I will try to reproduce and reopen the Jira.
>>
>> Regards
>> JB
>>
>>
>> On 04/06/2012 09:46 PM, Saurabh Garg wrote:
>>>
>>> Hello,
>>>
>>> I am getting the following error when extending karaf.shell.console. I
>>> have an Action class which does not have any arguments but has couple
>>> of options.
>>> e.g.
>>> cleanConfig
>>> cleanConfig -force
>>> cleanConfig -force -verbose
>>>
>>> When I use tab completion after typing cleanConfig, I get the following
>>> error:
>>>
>>> java.lang.ArrayIndexOutOfBoundsException: -1
>>>         at java.util.ArrayList.get(ArrayList.java:324)
>>>         at
>>> org.apache.karaf.shell.console.completer.ArgumentCompleter.complete(ArgumentCompleter.java:307)
>>>         at
>>> org.apache.karaf.shell.console.completer.AggregateCompleter$Completion.complete(AggregateCompleter.java:86)
>>>         at
>>> org.apache.karaf.shell.console.completer.AggregateCompleter.complete(AggregateCompleter.java:51)
>>>         at
>>> org.apache.karaf.shell.console.completer.CommandsCompleter.complete(CommandsCompleter.java:56)
>>>         at
>>> org.apache.karaf.shell.console.jline.CompleterAsCompletor.complete(CompleterAsCompletor.java:32)
>>>         at jline.console.ConsoleReader.complete(ConsoleReader.java:1473)
>>>         at jline.console.ConsoleReader.readLine(ConsoleReader.java:1231)
>>>         at jline.console.ConsoleReader.readLine(ConsoleReader.java:1089)
>>>         at
>>> org.apache.karaf.shell.console.jline.Console.run(Console.java:194)
>>>         at org.apache.karaf.shell.console.Main.run(Main.java:191)
>>>         at org.apache.karaf.shell.console.Main.run(Main.java:89)
>>>
>>> Thanks in advance for any help,
>>>
>>> Saurabh
>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com

Re: Error when using tab completion for an Action with no arguments

Posted by Saurabh Garg <ga...@gmail.com>.
Thanks JB. If you are unable to reproduce it, let me know and I will
try to get you code for reproducing the issue.

Saurabh

On Fri, Apr 6, 2012 at 11:53 PM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> Hi Surabh,
>
> it was a known issue:
>
> https://issues.apache.org/jira/browse/KARAF-1018
>
> But I wasn't able to reproduce.
>
> I will try to reproduce and reopen the Jira.
>
> Regards
> JB
>
>
> On 04/06/2012 09:46 PM, Saurabh Garg wrote:
>>
>> Hello,
>>
>> I am getting the following error when extending karaf.shell.console. I
>> have an Action class which does not have any arguments but has couple
>> of options.
>> e.g.
>> cleanConfig
>> cleanConfig -force
>> cleanConfig -force -verbose
>>
>> When I use tab completion after typing cleanConfig, I get the following
>> error:
>>
>> java.lang.ArrayIndexOutOfBoundsException: -1
>>         at java.util.ArrayList.get(ArrayList.java:324)
>>         at
>> org.apache.karaf.shell.console.completer.ArgumentCompleter.complete(ArgumentCompleter.java:307)
>>         at
>> org.apache.karaf.shell.console.completer.AggregateCompleter$Completion.complete(AggregateCompleter.java:86)
>>         at
>> org.apache.karaf.shell.console.completer.AggregateCompleter.complete(AggregateCompleter.java:51)
>>         at
>> org.apache.karaf.shell.console.completer.CommandsCompleter.complete(CommandsCompleter.java:56)
>>         at
>> org.apache.karaf.shell.console.jline.CompleterAsCompletor.complete(CompleterAsCompletor.java:32)
>>         at jline.console.ConsoleReader.complete(ConsoleReader.java:1473)
>>         at jline.console.ConsoleReader.readLine(ConsoleReader.java:1231)
>>         at jline.console.ConsoleReader.readLine(ConsoleReader.java:1089)
>>         at
>> org.apache.karaf.shell.console.jline.Console.run(Console.java:194)
>>         at org.apache.karaf.shell.console.Main.run(Main.java:191)
>>         at org.apache.karaf.shell.console.Main.run(Main.java:89)
>>
>> Thanks in advance for any help,
>>
>> Saurabh
>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com

Re: Error when using tab completion for an Action with no arguments

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Surabh,

it was a known issue:

https://issues.apache.org/jira/browse/KARAF-1018

But I wasn't able to reproduce.

I will try to reproduce and reopen the Jira.

Regards
JB

On 04/06/2012 09:46 PM, Saurabh Garg wrote:
> Hello,
>
> I am getting the following error when extending karaf.shell.console. I
> have an Action class which does not have any arguments but has couple
> of options.
> e.g.
> cleanConfig
> cleanConfig -force
> cleanConfig -force -verbose
>
> When I use tab completion after typing cleanConfig, I get the following error:
>
> java.lang.ArrayIndexOutOfBoundsException: -1
>          at java.util.ArrayList.get(ArrayList.java:324)
>          at org.apache.karaf.shell.console.completer.ArgumentCompleter.complete(ArgumentCompleter.java:307)
>          at org.apache.karaf.shell.console.completer.AggregateCompleter$Completion.complete(AggregateCompleter.java:86)
>          at org.apache.karaf.shell.console.completer.AggregateCompleter.complete(AggregateCompleter.java:51)
>          at org.apache.karaf.shell.console.completer.CommandsCompleter.complete(CommandsCompleter.java:56)
>          at org.apache.karaf.shell.console.jline.CompleterAsCompletor.complete(CompleterAsCompletor.java:32)
>          at jline.console.ConsoleReader.complete(ConsoleReader.java:1473)
>          at jline.console.ConsoleReader.readLine(ConsoleReader.java:1231)
>          at jline.console.ConsoleReader.readLine(ConsoleReader.java:1089)
>          at org.apache.karaf.shell.console.jline.Console.run(Console.java:194)
>          at org.apache.karaf.shell.console.Main.run(Main.java:191)
>          at org.apache.karaf.shell.console.Main.run(Main.java:89)
>
> Thanks in advance for any help,
>
> Saurabh

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com