karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Carr <kscar...@gmail.com>
Subject Re: Weird Exception Karaf 4.1.3 on startup
Date Thu, 16 Nov 2017 17:21:59 GMT
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 <kscarr73@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

Mime
View raw message