eoliphant
Dec 21st, 2005, 03:18 PM
Hi, I've the following bean config file, essentialy lifted from the JMX section in the online docs:
<!-- this config will grab and export any JMX annotated beans -->
<beans>
<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter">
<property name="assembler" ref="assembler"/>
<property name="autodetect" value="true"/>
</bean>
<bean id="attributeSource"
class="org.springframework.jmx.export.metadata.Attributes JmxAttributeSource">
<property name="attributes">
<bean class="org.springframework.metadata.commons.CommonsAttrib utes"/>
</property>
</bean>
<bean id="assembler" class="org.springframework.jmx.export.assembler.MetadataM BeanInfoAssembler">
<property name="attributeSource" ref="attributeSource"/>
</bean>
</beans>
I'm getting the following exception, even though autodetect is set to true:
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'exporter' defined in ServletContext resource [/WEB-INF/classes/services-jmx.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Must specify at least one bean for registration
java.lang.IllegalArgumentException: Must specify at least one bean for registration.
I've a bean defined in another config file, that uses the JDK 1.5 annotations. I thought this config would search the bean container for any JMX annotated beans. But in any case, even if it's not finding my bean not sure why i'm getting the exception with autodetect on.
<!-- this config will grab and export any JMX annotated beans -->
<beans>
<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter">
<property name="assembler" ref="assembler"/>
<property name="autodetect" value="true"/>
</bean>
<bean id="attributeSource"
class="org.springframework.jmx.export.metadata.Attributes JmxAttributeSource">
<property name="attributes">
<bean class="org.springframework.metadata.commons.CommonsAttrib utes"/>
</property>
</bean>
<bean id="assembler" class="org.springframework.jmx.export.assembler.MetadataM BeanInfoAssembler">
<property name="attributeSource" ref="attributeSource"/>
</bean>
</beans>
I'm getting the following exception, even though autodetect is set to true:
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'exporter' defined in ServletContext resource [/WEB-INF/classes/services-jmx.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Must specify at least one bean for registration
java.lang.IllegalArgumentException: Must specify at least one bean for registration.
I've a bean defined in another config file, that uses the JDK 1.5 annotations. I thought this config would search the bean container for any JMX annotated beans. But in any case, even if it's not finding my bean not sure why i'm getting the exception with autodetect on.