[
https://issues.apache.org/jira/browse/KARAF-3354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14723834#comment-14723834
]
Michael Taeschner commented on KARAF-3354:
------------------------------------------
I run into the same issue with {{sshPort}} property in
*etc/org.apache.karaf.shell.cfg*
The command will reply with error:
{noformat}
karaf@root()> instance:list
Error executing command: For input string: ""
{noformat}
Additionally the external command {{instance list}} will also fail with same
error message. This will also remain when the config is reverted to the
original state.
> InstanceService and Placeholder
> -------------------------------
>
> Key: KARAF-3354
> URL: https://issues.apache.org/jira/browse/KARAF-3354
> Project: Karaf
> Issue Type: Bug
> Components: karaf-core
> Affects Versions: 3.0.2
> Reporter: Kai Reichert
> Priority: Minor
>
> The configuration file 'etc/org.apache.karaf.management.cfg' can be used to
> change the RMI ports and addresses.
> In this file and every other *.cfg file you can use placeholders, which may
> be defined in the 'etc/custom.properties' file.
> For example you can change the key rmiRegistryPort to:
> rmiRegistryPort = ${my.custom.rmi.port}
> Then 'my.custom.rmi.port' has to be defined in 'etc/custom.properties' like:
> my.custom.rmi.port = 1100
> This works perfectly. What does not work are karaf's shell command like
> 'instance:list'.
> If you invoke this command with the placeholder customization you get the
> error message:
> karaf@root()> instance:list
> Error executing command: For input string: ""
> If I try to debug it, I end up in the class InstanceServiceImpl inside the
> method getKarafPort().
> The Properties object this method gets, has an empty value for
> rmiRegistryPort. It seems as this placeholder is not ”interpolated” correctly.
> The karaf instance itself is correctly binded at port 1100 instead of 1099.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)