Hi,
I'm having the following exception:
Exception in thread "main" org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'exporter' defined in class path resource [tcaserver.xml]: Invocation of init method failed; nested exception is org.springframework.jmx.export.UnableToRegisterMBe anException: Unable to register MBean [javax.management.remote.rmi.RMIConnectorServer@74b 10b] with key 'rmiConnector'; nested exception is javax.management.MalformedObjectNameException: Key properties cannot be empty
Caused by: org.springframework.jmx.export.UnableToRegisterMBe anException: Unable to register MBean [javax.management.remote.rmi.RMIConnectorServer@74b 10b] with key 'rmiConnector'; nested exception is javax.management.MalformedObjectNameException: Key properties cannot be empty
Caused by: javax.management.MalformedObjectNameException: Key properties cannot be empty
at javax.management.ObjectName.construct(ObjectName.j ava:393)
at javax.management.ObjectName.<init>(ObjectName.java :1304)
at javax.management.ObjectName.getInstance(ObjectName .java:1187)
at org.springframework.jmx.support.ObjectNameManager. getInstance(ObjectNameManager.java:74)
at org.springframework.jmx.export.naming.KeyNamingStr ategy.getObjectName(KeyNamingStrategy.java:140)
at org.springframework.jmx.export.MBeanExporter.getOb jectName(MBeanExporter.java:675)
at org.springframework.jmx.export.MBeanExporter.regis terBeanInstance(MBeanExporter.java:588)
at org.springframework.jmx.export.MBeanExporter.regis terBeanNameOrInstance(MBeanExporter.java:570)
at org.springframework.jmx.export.MBeanExporter.regis terBeans(MBeanExporter.java:499)
at org.springframework.jmx.export.MBeanExporter.after PropertiesSet(MBeanExporter.java:388)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1143)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1110)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:431)
at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 54)
at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:144)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:163)
at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:284)
at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:352)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:91)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:75)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:65)
at com.tca.tcaagente.ServerAgent.main(ServerAgent.jav a:110)
I've set the application context (tcaserver.xml) accordingly to documentation:
<bean id="rmiConnector"
class="org.springframework.jmx.support.ConnectorSe rverFactoryBean" depends-on="registry" >
<property name="objectName" value="TCAAgent:name=rmiconnector,port=1099"/>
<property name="serviceUrl" value="service:jmx:rmi://localhost/jndi/rmi://localhost:1099/tcaagent"/>
<property name="environment">
<props>
<prop key="jmx.remote.jndi.rebind">true</prop>
</props>
</property>
</bean>
I'm not using any container except for Spring. The funny thing here is that if I set the values through code, it works fine.
Does anybody know what I am doing incorrectly?
Please advise


Reply With Quote