You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Kevin Carr <ks...@gmail.com> on 2017/11/08 05:31:15 UTC

Weird Exception Karaf 4.1.3 on startup

Anyone understand what this exception is for?

I get this as soon as I run ./karaf with or without debug.  If I run
./start, it runs, but as soon as I try to connect via ssh it stops.

Error executing command: For input string: "1502467344394"
Exception in thread "Karaf local console user karaf"
java.lang.IndexOutOfBoundsException: fromIndex = -1981
at java.util.SubList.<init>(AbstractList.java:620)
at java.util.AbstractList.subList(AbstractList.java:484)
at
org.jline.reader.impl.history.DefaultHistory.save(DefaultHistory.java:123)
at
org.apache.karaf.shell.impl.console.ConsoleSessionImpl.close(ConsoleSessionImpl.java:283)
at
org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:380)
at java.lang.Thread.run(Thread.java:748)

Thanks

-- 
Scott Carr

Re: Weird Exception Karaf 4.1.3 on startup

Posted by Kevin Carr <ks...@gmail.com>.
Ok.  I had to download the tag for karaf-4.1.3 and then debug the jline
stuff.  Turned out, it had nothing to do with karaf or the terminal.

In the history file located at ~/.karaf/karaf41.history, there were some
lines with what looked like some control characters in front of the line
id.  When jline tried to attach the history and load, it would kill the
console and show an exception on the screen.

This occurs in 4.1.2, 4.1.3, and 4.2.0-M1.  4.1.1 does not fail like this.
It shows the command prompt inside of karaf with no issues.  The newer
karaf instances, will fail with these weird history entries.

A workaround, either delete the ~/.karaf/karaf41.history file, or open it
and delete the weird lines.

Code fix, would be for jline to ignore lines it can't parse on load of the
history file.

On Wed, Nov 8, 2017 at 7:03 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
wrote:

> What about the terminal ?
>
> Regards
> JB
> On Nov 8, 2017, at 13:57, Kevin Carr <ks...@gmail.com> wrote:
>>
>> Oh, this is on Linux with openjdk 1.8.144.
>>
>> On Nov 8, 2017 2:14 AM, "Jean-Baptiste Onofré" <jb...@nanthrax.net> wrote:
>>
>> Hi Scott,
>>
>> Good catch. So, it only happens with when you start karaf with ./start
>> only (not with ./karaf) ?
>> I could be related to the terminal settings. Let me try to reproduce.
>>
>> Regards
>> JB
>>
>>
>> On 11/08/2017 06:31 AM, Kevin Carr wrote:
>>
>>> Anyone understand what this exception is for?
>>>
>>> I get this as soon as I run ./karaf with or without debug.  If I run
>>> ./start, it runs, but as soon as I try to connect via ssh it stops.
>>>
>>> Error executing command: For input string: "1502467344394"
>>> Exception in thread "Karaf local console user karaf"
>>> java.lang.IndexOutOfBoundsException: fromIndex = -1981
>>> at java.util.SubList.<init>(AbstractList.java:620)
>>> at java.util.AbstractList.subList(AbstractList.java:484)
>>> at org.jline.reader.impl.history.DefaultHistory.save(DefaultHis
>>> tory.java:123)
>>> at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.close
>>> (ConsoleSessionImpl.java:283)
>>> at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(C
>>> onsoleSessionImpl.java:380)
>>> at java.lang.Thread.run(Thread.java:748)
>>>
>>> Thanks
>>>
>>> --
>>> Scott Carr
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>>
>>


-- 
Scott Carr

Re: Weird Exception Karaf 4.1.3 on startup

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
What about the terminal ?

Regards
JB

On Nov 8, 2017, 13:57, at 13:57, Kevin Carr <ks...@gmail.com> wrote:
>Oh, this is on Linux with openjdk 1.8.144.
>
>On Nov 8, 2017 2:14 AM, "Jean-Baptiste Onofré" <jb...@nanthrax.net> wrote:
>
>Hi Scott,
>
>Good catch. So, it only happens with when you start karaf with ./start
>only
>(not with ./karaf) ?
>I could be related to the terminal settings. Let me try to reproduce.
>
>Regards
>JB
>
>
>On 11/08/2017 06:31 AM, Kevin Carr wrote:
>
>> Anyone understand what this exception is for?
>>
>> I get this as soon as I run ./karaf with or without debug.  If I run
>> ./start, it runs, but as soon as I try to connect via ssh it stops.
>>
>> Error executing command: For input string: "1502467344394"
>> Exception in thread "Karaf local console user karaf"
>> java.lang.IndexOutOfBoundsException: fromIndex = -1981
>> at java.util.SubList.<init>(AbstractList.java:620)
>> at java.util.AbstractList.subList(AbstractList.java:484)
>> at org.jline.reader.impl.history.DefaultHistory.save(DefaultHis
>> tory.java:123)
>> at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.close
>> (ConsoleSessionImpl.java:283)
>> at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(
>> ConsoleSessionImpl.java:380)
>> at java.lang.Thread.run(Thread.java:748)
>>
>> Thanks
>>
>> --
>> Scott Carr
>>
>
>-- 
>Jean-Baptiste Onofré
>jbonofre@apache.org
>http://blog.nanthrax.net
>Talend - http://www.talend.com

Re: Weird Exception Karaf 4.1.3 on startup

Posted by Kevin Carr <ks...@gmail.com>.
Oh, this is on Linux with openjdk 1.8.144.

On Nov 8, 2017 2:14 AM, "Jean-Baptiste Onofré" <jb...@nanthrax.net> wrote:

Hi Scott,

Good catch. So, it only happens with when you start karaf with ./start only
(not with ./karaf) ?
I could be related to the terminal settings. Let me try to reproduce.

Regards
JB


On 11/08/2017 06:31 AM, Kevin Carr wrote:

> Anyone understand what this exception is for?
>
> I get this as soon as I run ./karaf with or without debug.  If I run
> ./start, it runs, but as soon as I try to connect via ssh it stops.
>
> Error executing command: For input string: "1502467344394"
> Exception in thread "Karaf local console user karaf"
> java.lang.IndexOutOfBoundsException: fromIndex = -1981
> at java.util.SubList.<init>(AbstractList.java:620)
> at java.util.AbstractList.subList(AbstractList.java:484)
> at org.jline.reader.impl.history.DefaultHistory.save(DefaultHis
> tory.java:123)
> at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.close
> (ConsoleSessionImpl.java:283)
> at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(
> ConsoleSessionImpl.java:380)
> at java.lang.Thread.run(Thread.java:748)
>
> Thanks
>
> --
> Scott Carr
>

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

Re: Weird Exception Karaf 4.1.3 on startup

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Can you share your os and terminal settings ?

It works fine for me on Ubuntu.

Regards
JB

On Nov 8, 2017, 13:56, at 13:56, Kevin Carr <ks...@gmail.com> wrote:
>It happens with both.  With .start it seems to start fine.  Then when I
>ssh
>I get the issue.
>
>With .karaf it is immediate due to the terminal opening with the
>command.
>
>Seems to related to parse of history for the cli...
>
>
>On Nov 8, 2017 2:14 AM, "Jean-Baptiste Onofré" <jb...@nanthrax.net> wrote:
>
>Hi Scott,
>
>Good catch. So, it only happens with when you start karaf with ./start
>only
>(not with ./karaf) ?
>I could be related to the terminal settings. Let me try to reproduce.
>
>Regards
>JB
>
>
>On 11/08/2017 06:31 AM, Kevin Carr wrote:
>
>> Anyone understand what this exception is for?
>>
>> I get this as soon as I run ./karaf with or without debug.  If I run
>> ./start, it runs, but as soon as I try to connect via ssh it stops.
>>
>> Error executing command: For input string: "1502467344394"
>> Exception in thread "Karaf local console user karaf"
>> java.lang.IndexOutOfBoundsException: fromIndex = -1981
>> at java.util.SubList.<init>(AbstractList.java:620)
>> at java.util.AbstractList.subList(AbstractList.java:484)
>> at org.jline.reader.impl.history.DefaultHistory.save(DefaultHis
>> tory.java:123)
>> at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.close
>> (ConsoleSessionImpl.java:283)
>> at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(
>> ConsoleSessionImpl.java:380)
>> at java.lang.Thread.run(Thread.java:748)
>>
>> Thanks
>>
>> --
>> Scott Carr
>>
>
>-- 
>Jean-Baptiste Onofré
>jbonofre@apache.org
>http://blog.nanthrax.net
>Talend - http://www.talend.com

Re: Weird Exception Karaf 4.1.3 on startup

Posted by Kevin Carr <ks...@gmail.com>.
It happens with both.  With .start it seems to start fine.  Then when I ssh
I get the issue.

With .karaf it is immediate due to the terminal opening with the command.

Seems to related to parse of history for the cli...


On Nov 8, 2017 2:14 AM, "Jean-Baptiste Onofré" <jb...@nanthrax.net> wrote:

Hi Scott,

Good catch. So, it only happens with when you start karaf with ./start only
(not with ./karaf) ?
I could be related to the terminal settings. Let me try to reproduce.

Regards
JB


On 11/08/2017 06:31 AM, Kevin Carr wrote:

> Anyone understand what this exception is for?
>
> I get this as soon as I run ./karaf with or without debug.  If I run
> ./start, it runs, but as soon as I try to connect via ssh it stops.
>
> Error executing command: For input string: "1502467344394"
> Exception in thread "Karaf local console user karaf"
> java.lang.IndexOutOfBoundsException: fromIndex = -1981
> at java.util.SubList.<init>(AbstractList.java:620)
> at java.util.AbstractList.subList(AbstractList.java:484)
> at org.jline.reader.impl.history.DefaultHistory.save(DefaultHis
> tory.java:123)
> at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.close
> (ConsoleSessionImpl.java:283)
> at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(
> ConsoleSessionImpl.java:380)
> at java.lang.Thread.run(Thread.java:748)
>
> Thanks
>
> --
> Scott Carr
>

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

Re: Weird Exception Karaf 4.1.3 on startup

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

Good catch. So, it only happens with when you start karaf with ./start only (not 
with ./karaf) ?
I could be related to the terminal settings. Let me try to reproduce.

Regards
JB

On 11/08/2017 06:31 AM, Kevin Carr wrote:
> Anyone understand what this exception is for?
> 
> I get this as soon as I run ./karaf with or without debug.  If I run ./start, it 
> runs, but as soon as I try to connect via ssh it stops.
> 
> Error executing command: For input string: "1502467344394"
> Exception in thread "Karaf local console user karaf" 
> java.lang.IndexOutOfBoundsException: fromIndex = -1981
> at java.util.SubList.<init>(AbstractList.java:620)
> at java.util.AbstractList.subList(AbstractList.java:484)
> at org.jline.reader.impl.history.DefaultHistory.save(DefaultHistory.java:123)
> at 
> org.apache.karaf.shell.impl.console.ConsoleSessionImpl.close(ConsoleSessionImpl.java:283)
> at 
> org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:380)
> at java.lang.Thread.run(Thread.java:748)
> 
> Thanks
> 
> -- 
> Scott Carr

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