Results 1 to 4 of 4

Thread: Problem with <int-jmx:mbean-exporter /> in 2.0.0.RC1

  1. #1
    Join Date
    Oct 2010
    Posts
    2

    Default Problem with <int-jmx:mbean-exporter /> in 2.0.0.RC1

    Hi,

    I have the following configuration

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:int="http://www.springframework.org/schema/integration"
    	xmlns:int-jmx="http://www.springframework.org/schema/integration/jmx"
    	xmlns:context="http://www.springframework.org/schema/context"
    	xmlns:util="http://www.springframework.org/schema/util" xmlns:task="http://www.springframework.org/schema/task"
    	xsi:schemaLocation="
            http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
            http://www.springframework.org/schema/integration/jmx http://www.springframework.org/schema/integration/jmx/spring-integration-jmx-2.0.xsd
    	">
    	<int-jmx:mbean-exporter id="mbeanExporter"
    		domain="foo.bar" mbean-server="mbeanServer" />
    		 
    	<bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean">
    		<property name="locateExistingServerIfPossible" value="true" />
    	</bean>
    
    </beans>
    I'm using SI 2.0.0.RC1

    When using that appCtx in a test class, the following error occurs:

    Code:
    java.lang.IllegalStateException: Failed to load ApplicationContext
    	at 
    ...
    org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)
    ...
    Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 15 in XML document from class path resource [spring/applicationContext-test-si-jmx.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'int-jmx:mbean-exporter'.
    ...
    Any ideas what is wrong?

  2. #2
    Join Date
    Oct 2010
    Posts
    2

    Default

    Apparently the problem was that the mbean-exporter should really be mbean-export and the attributes are different:

    Code:
    <int-jmx:mbean-export id="mbeanExporter" 
    		default-domain="foo.bar" server="mbeanServer" />
    It's still unclear to me why latest releases of STS and Eclipse think that the appCtx is invalid:

    [CODE]
    cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'int-jmx:mbean-export'.
    [CODE]

    But at least the tests pass, both in STS and with maven

  3. #3
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    Yes, JMX module underwent major refactoring before RC1 in preparation for GA, but I am glad you have figured it out.
    What version of STS you are using? 2.5.0 is the latest one and you should not have any schema problems with it.

  4. #4
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,840

    Default

    I've added a link to this thread from the following issue that will be completed for 2.0 GA as well (JMX documentation updates):
    https://jira.springsource.org/browse/INT-1420

    Thanks for the feedback.
    -Mark

Posting Permissions

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