[ https://issues.apache.org/jira/browse/KARAF-5023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16216494#comment-16216494 ]
Guillaume Nodet commented on KARAF-5023: ---------------------------------------- I think the problem is not in the {{Activator}}. When the config change, it's correctly called with the new config to re-create the {{ConnectorServerFactory}}. However, the problem is in {{config:property-set}} command which does not take into account the possible substitution. As you can see below, the problem is that the change from {{property-set}} is not reflected to the {{serviceUrl}} property which is substituted. {code} karaf@root()> config:edit org.apache.karaf.management karaf@root()> config:property-list daemon = true felix.fileinstall.filename = file:/Users/gnodet/work/git/karaf4x/assemblies/apache-karaf-minimal/target/assembly/etc/org.apache.karaf.management.cfg jmxRealm = karaf objectName = connector:name=rmi org.apache.karaf.features.configKey = org.apache.karaf.management rmiRegistryHost = 127.0.0.1 rmiRegistryPort = 1099 rmiServerHost = 127.0.0.1 rmiServerPort = 44444 service.pid = org.apache.karaf.management serviceUrl = service:jmx:rmi://127.0.0.1:44444/jndi/rmi://127.0.0.1:1099/karaf-root threaded = true karaf@root()> config:property-set rmiServerPort 44445 karaf@root()> config:property-list daemon = true felix.fileinstall.filename = file:/Users/gnodet/work/git/karaf4x/assemblies/apache-karaf-minimal/target/assembly/etc/org.apache.karaf.management.cfg jmxRealm = karaf objectName = connector:name=rmi org.apache.karaf.features.configKey = org.apache.karaf.management rmiRegistryHost = 127.0.0.1 rmiRegistryPort = 1099 rmiServerHost = 127.0.0.1 rmiServerPort = 44445 service.pid = org.apache.karaf.management serviceUrl = service:jmx:rmi://127.0.0.1:44444/jndi/rmi://127.0.0.1:1099/karaf-root threaded = true karaf@root()> {code} > The serviceUrl property is changed unexpected when edit the > rmiServerPort/rmiRegistryPort properties > ---------------------------------------------------------------------------------------------------- > > Key: KARAF-5023 > URL: https://issues.apache.org/jira/browse/KARAF-5023 > Project: Karaf > Issue Type: Bug > Components: karaf-config > Affects Versions: 4.1.0, 4.0.8 > Reporter: Xilai Dai > Assignee: Jean-Baptiste Onofré > Fix For: 4.2.0, 4.0.11, 4.1.4 > > > {code} > karaf@root()> config:edit --force org.apache.karaf.management > karaf@root()> config:property-set rmiRegistryPort 1100 > karaf@root()> config:property-set rmiServerPort 44445 > karaf@root()> config:update > karaf@root()> Exception in thread "JMX Connector Thread > [service:jmx:rmi://127.0.0.1:44444/jndi/rmi://127.0.0.1:1099/karaf-r > oot]" java.lang.RuntimeException: Could not start JMX connector server > at > org.apache.karaf.management.ConnectorServerFactory$1.run(ConnectorServerFactory.java:272) > Caused by: java.io.IOException: Cannot bind to URL > [rmi://127.0.0.1:1099/karaf-root]: javax.naming.CommunicationException > [Root exception is java.rmi.NoSuchObjectException: no such object in table] > at > javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:827) > at > javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:432) > at > org.apache.karaf.management.ConnectorServerFactory$1.run(ConnectorServerFactory.java:259) > Caused by: javax.naming.CommunicationException [Root exception is > java.rmi.NoSuchObjectException: no such object in tabl > e] > at > com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:161) > at > com.sun.jndi.toolkit.url.GenericURLContext.bind(GenericURLContext.java:228) > at javax.naming.InitialContext.bind(InitialContext.java:425) > at > javax.management.remote.rmi.RMIConnectorServer.bind(RMIConnectorServer.java:644) > at > javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:427) > ... 1 more > Caused by: java.rmi.NoSuchObjectException: no such object in table > at > sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:276) > at > sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:253) > at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:379) > at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source) > at > com.sun.jndi.rmi.registry.RegistryContext.bind(RegistryContext.java:155) > ... 5 more > {code} > Looking into the {{etc/org.apache.karaf.management.cfg}}, the {{serviceUrl}} > property is changed to: > {code} > service:jmx:rmi://127.0.0.1:44444/jndi/rmi://127.0.0.1:1099/karaf-root > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)