Results 1 to 3 of 3

Thread: MetadataMBeanInfoAssembler fails on Tomcat 5.0.30

  1. #1
    Join Date
    Jan 2005
    Posts
    144

    Default MetadataMBeanInfoAssembler fails on Tomcat 5.0.30

    Hello,
    I'm using MetadataMBeanInfoAssembler with commons-attributes annotation to export my MBeans. I've migrated from tomcat 4.1 to 5.0.30 and now I've got this exception stack :
    Code:
    java.lang.IllegalArgumentException: Invalid value '0' for field persistPeriod
        at javax.management.modelmbean.DescriptorSupport.checkField(DescriptorSupport.java:258)
        at javax.management.modelmbean.DescriptorSupport.setField(DescriptorSupport.java:82)
        at org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler.populateMBeanDescriptor(MetadataMBeanInfoAssembler.java:257)
    Tomcat comes with jmx.jar (seems to be 1.1.1 jmx version, from mx4j project) that includes a check for "persistPeriod" to be > 0.
    MetadataMBeanInfoAssembler sets this MBean attribute if mr.getPersistPeriod() >= 0

    And default value for persistPeriod in org.springframework.jmx.export.metadata.ManagedRes ource is ... 0.

    I had to update all my annotation to add "persistPeriod=-1".

    It would be great to udate MetadataMBeanInfoAssembler to use
    mr.getPersistPeriod() > 0.

  2. #2
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    Raise an issue on jira please. What happens if you upgrade mx4j to the latest version?
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  3. #3
    Join Date
    Jan 2005
    Posts
    144

    Default

    I've created SPR-1616 for this. I can't find in JMX spec the allowed values for persistPeriod, and so if this check is valid or not.

    I've solved this issue in my app by setting persistPeriod=-1 on my attributes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •