Announcement Announcement Module
Collapse
No announcement yet.
Must specify at least one bean for registration Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Must specify at least one bean for registration

    Hi,

    i am getting the error as mentioned in the subject even though i am in JDK5 annotations mode. Here is the wiring:


    PHP Code:
       <bean id="exporter" class="org.springframework.jmx.export.MBeanExporter">
            <
    property name="assembler">
                <
    bean class="org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler">
                    <
    property name="attributeSource" ref="jmxAttributeSource"/>
                </
    bean>
            </
    property>
            <
    property name="namingStrategy">
                <
    bean class="org.springframework.jmx.export.naming.MetadataNamingStrategy">
                    <
    property name="attributeSource" ref="jmxAttributeSource"/>
                </
    bean>
            </
    property>
            <
    property name="autodetect" value="true"/>
        </
    bean>

        <
    bean id="jmxAttributeSource"
              
    class="org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource"/> 
    Then i have annotated one of my existing beans with the annotations as shown in the spring doc. The only difference is that my bean doesnt implement an interface like the example bean in your docs.

    Why cant the exporter find my bean?

    Logging on jmx channel on trace level only revealed this:

    [DEBUG 00:17:47] JmxUtils.locateMBeanServer(92) | Found MBeanServer: com.sun.jmx.mbeanserver.JmxMBeanServer@210e81
    [INFO 00:17:47] MBeanExporter.registerBeans(348) | Autodetecting user-defined JMX MBeans

    Thanks for insights how to get more infos on that issue or for plain solutions to this

    Marc
    Last edited by loge; Sep 19th, 2006, 05:23 PM.

  • #2
    I partially found the problem. Its definitely my bean to be exposed that makes problem. A very simple annotated POJO works like a charm. I assume the problem was that my former bean is a proxy itself and i somewhere read that JDK proxies dont work. No matter what, i am using my simple Pojo here and inject it with various services to get system informations. That will do it too.

    Comment


    • #3
      little article

      For all who are interessted, i wrote my experiences with Spring and JMX down (in my blog) and added an advanced dynamic bean example into it too.

      Read it here.

      Now this monologue really ends

      Comment

      Working...
      X