title: Unable to connect with jmxmp in Tomcat
body: <p>In my spring + tomcat solution I have a problem, with jmxmp connection.</p>
  
  <p>I have enabled jmx in tomcat + added jmxremote_optional.jar</p>
  
  <p>This is manager.log</p>
  
  <blockquote>
    <p>INFO: JMXProxy: Error getting attribute java.lang:type=MemoryPool,name=Code Cache CollectionUsageThreshold</p>
    
    <p>javax.management.RuntimeMBeanException:
    java.lang.UnsupportedOperationException: CollectionUsage threshold is
    not supported</p>
    
    <p>05.09.2012 16:33:13 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute
    java.lang:type=MemoryPool,name=Code Cache
    CollectionUsageThresholdCount javax.management.RuntimeMBeanException:
    java.lang.UnsupportedOperationException: CollectionUsage threshold is
    not supported</p>
    
    <p>05.09.2012 16:33:13 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute
    java.lang:type=MemoryPool,name=Code Cache
    CollectionUsageThresholdExceeded
    javax.management.RuntimeMBeanException:
    java.lang.UnsupportedOperationException: CollectionUsage threshold is
    not supported</p>
    
    <p>05.09.2012 16:33:13 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute
    Catalina:type=Resource,resourcetype=Global,class=org.apache.catalina.UserDatabase,name="UserDatabase"
    modelerType javax.management.AttributeNotFoundException: Cannot find
    attribute modelerType</p>
    
    <p>05.09.2012 16:33:13 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute
    java.lang:type=MemoryPool,name=PS Eden Space UsageThreshold
    javax.management.RuntimeMBeanException:
    java.lang.UnsupportedOperationException: Usage threshold is not
    supported</p>
    
    <p>05.09.2012 16:33:14 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute
    java.lang:type=MemoryPool,name=PS Eden Space UsageThresholdCount
    javax.management.RuntimeMBeanException:
    java.lang.UnsupportedOperationException: Usage threshold is not
    supported</p>
    
    <p>05.09.2012 16:33:14 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute
    java.lang:type=MemoryPool,name=PS Eden Space UsageThresholdExceeded
    javax.management.RuntimeMBeanException:
    java.lang.UnsupportedOperationException: Usage threshold is not
    supported</p>
    
    <p>05.09.2012 16:33:14 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute
    java.lang:type=MemoryPool,name=PS Survivor Space UsageThreshold
    javax.management.RuntimeMBeanException:
    java.lang.UnsupportedOperationException: Usage threshold is not
    supported</p>
    
    <p>05.09.2012 16:33:14 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute
    java.lang:type=MemoryPool,name=PS Survivor Space UsageThresholdCount
    javax.management.RuntimeMBeanException:
    java.lang.UnsupportedOperationException: Usage threshold is not
    supported</p>
    
    <p>05.09.2012 16:33:14 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute
    java.lang:type=MemoryPool,name=PS Survivor Space
    UsageThresholdExceeded javax.management.RuntimeMBeanException:
    java.lang.UnsupportedOperationException: Usage threshold is not
    supported</p>
    
    <p>05.09.2012 16:33:50 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute
    java.lang:type=MemoryPool,name=Code Cache CollectionUsageThreshold
    javax.management.RuntimeMBeanException:
    java.lang.UnsupportedOperationException: CollectionUsage threshold is
    not supported
    05.09.2012 16:33:50 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute
    java.lang:type=MemoryPool,name=Code Cache
    CollectionUsageThresholdCount javax.management.RuntimeMBeanException:
    java.lang.UnsupportedOperationException: CollectionUsage threshold is
    not supported
    05.09.2012 16:33:50 org.apache.catalina.core.ApplicationContext log INFO: JMXProxy: Error getting attribute
    java.lang:type=MemoryPool,name=Code Cache Collecti</p>
  </blockquote>
  
  <p>This is spring con.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans
      xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/beans
          http://www.springframework.org/schema/beans/spring-beans.xsd"
      default-lazy-init="true"&gt;
      &lt;bean id="test" class="test.Test" /&gt;
      &lt;!-- &lt;bean class="org.springframework.jmx.support.MBeanServerFactoryBean"&gt;
          &lt;property name="locateExistingServerIfPossible" value="true" /&gt;
      &lt;/bean&gt; --&gt;
      &lt;bean id="serverConnector" class="org.springframework.jmx.support.ConnectorServerFactoryBean"/&gt;
      &lt;bean class="org.springframework.jmx.export.MBeanExporter" lazy-init="false"&gt;
          &lt;property name="assembler"&gt;
              &lt;bean class="org.springframework.jmx.export.assembler.MethodNameBasedMBeanInfoAssembler"            &gt;
                  &lt;property name="managedMethods"&gt;
                      &lt;list&gt;
                          &lt;value&gt;getVal&lt;/value&gt;
                          &lt;value&gt;setVal&lt;/value&gt;
                      &lt;/list&gt;
                  &lt;/property&gt;
              &lt;/bean&gt;
          &lt;/property&gt;
          &lt;property name="beans"&gt;
              &lt;map&gt;
                  &lt;entry key="bean:name=Test" value-ref="test"/&gt;
              &lt;/map&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>This is java bean</p>
  
  <pre><code>public class Test {
      private String val = "";
      public String getVal() {
          return val;
      }
      public void setVal(String v) {
          val = v;
      }
  }
  </code></pre>