You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Roland Hauser (JIRA)" <ji...@apache.org> on 2017/05/24 13:33:04 UTC

[jira] [Comment Edited] (KARAF-5144) java.lang.RuntimeException: Command name evaluates to null: $.jline.terminal

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

Roland Hauser edited comment on KARAF-5144 at 5/24/17 1:32 PM:
---------------------------------------------------------------

We can workaround this issue by now when we remove following lines from the shell.init.script:

{code}
# On 256 colors terminal, add a right prompt
max_colors = ($.jline.terminal getNumericCapability max_colors)
if { %(max_colors >= 256) } {
  __rprompt_formatter = (((__load_class java.text.SimpleDateFormat) getConstructor (__load_class java.lang.String)) newInstance \'$'\u001B\[90m'\'HH:mm:ss)
  __date_class = (__load_class java.util.Date)
  \#rprompt = { $__rprompt_formatter format ($__date_class newInstance) }
}
{code}


was (Author: roland.hauser@bechtle.ch):
We can workaround this issue by now when we remove following lines from the shell.init.script:

# On 256 colors terminal, add a right prompt
max_colors = ($.jline.terminal getNumericCapability max_colors)
if { %(max_colors >= 256) } {
  __rprompt_formatter = (((__load_class java.text.SimpleDateFormat) getConstructor (__load_class java.lang.String)) newInstance \'$'\u001B\[90m'\'HH:mm:ss)
  __date_class = (__load_class java.util.Date)
  \#rprompt = { $__rprompt_formatter format ($__date_class newInstance) }
}

> java.lang.RuntimeException: Command name evaluates to null: $.jline.terminal
> ----------------------------------------------------------------------------
>
>                 Key: KARAF-5144
>                 URL: https://issues.apache.org/jira/browse/KARAF-5144
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-shell
>    Affects Versions: 4.1.1
>            Reporter: Roland Hauser
>            Assignee: Jean-Baptiste Onofré
>             Fix For: 4.2.0, 4.1.2
>
>
> Method executeScript on class org.apache.karaf.shell.ssh.ShellCommand throws (and catches) this exception, when property karaf.shell.init.script in system.properties is set to "karaf.shell.init.script = etc/shell.init.script" to avoid KARAF-5143. This means that currently no command can be executed which is specified in the shell init-script, which makes it impossible for us to deploy our application on Karaf 4.1.1.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)