Kai Reichert created KARAF-3354:
-----------------------------------

             Summary: 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)

Reply via email to