You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org> on 2013/11/03 21:15:17 UTC

[jira] [Commented] (KARAF-2515) Prevent NPE in log:tail

    [ https://issues.apache.org/jira/browse/KARAF-2515?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13812469#comment-13812469 ] 

Jean-Baptiste Onofré commented on KARAF-2515:
---------------------------------------------

Reviewing the code, Jon's fix should also fix this issue. As I know how to reproduce this one (using Cellar), I will check if it's really fixed.

> Prevent NPE in log:tail
> -----------------------
>
>                 Key: KARAF-2515
>                 URL: https://issues.apache.org/jira/browse/KARAF-2515
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>    Affects Versions: 2.3.0
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>             Fix For: 2.4.0, 3.0.0, 2.3.4
>
>
> In some cases (after a log:clean for instance), log:tail throws a NPE:
> 2013-10-11 14:53:51,037 | INFO  | l Console Thread | Console                          | araf.shell.console.jline.Console  198 | 14 - org.apache.karaf.shell.console - 2.3.1 | Exception caught while executing command
> java.lang.NullPointerException
>         at org.apache.karaf.shell.log.DisplayLog.getColor(DisplayLog.java:172)[34:org.apache.karaf.shell.log:2.3.1]
>         at org.apache.karaf.shell.log.DisplayLog.display(DisplayLog.java:143)[34:org.apache.karaf.shell.log:2.3.1]
>         at org.apache.karaf.shell.log.LogTail.doExecute(LogTail.java:40)[34:org.apache.karaf.shell.log:2.3.1]
>         at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[14:org.apache.karaf.shell.console:2.3.1]
>         at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[14:org.apache.karaf.shell.console:2.3.1]
>         at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[14:org.apache.karaf.shell.console:2.3.1]
>         at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[14:org.apache.karaf.shell.console:2.3.1]
>         at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[14:org.apache.karaf.shell.console:2.3.1]
>         at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[14:org.apache.karaf.shell.console:2.3.1]
>         at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[14:org.apache.karaf.shell.console:2.3.1]
>         at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[14:org.apache.karaf.shell.console:2.3.1]
>         at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[14:org.apache.karaf.shell.console:2.3.1]
>         at org.apache.karaf.shell.console.jline.Console.run(Console.java:174)[14:org.apache.karaf.shell.console:2.3.1]
>         at java.lang.Thread.run(Thread.java:722)[:1.7.0_21]
> ...
> We should prevent this and fallback without colour if not found.



--
This message was sent by Atlassian JIRA
(v6.1#6144)