[
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:39 PM:
---------------------------------------------------------------
We can workaround this issue by now when we remove following lines from the
shell.init.script:
{code}
prompt = "^[[1m${USER}^[[0m@${APPLICATION}(${SUBSHELL})> "
__load_class = {
(($.reader class) classLoader) loadClass $1
}
# 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) }
}
setopt group
keymap "^[OA" up-line-or-search
keymap "^[OB" down-line-or-search
{code}
was (Author: [email protected]):
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}
> 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)