title: NoClassDefFoundError: org/springframework/beans/factory/SmartInitializingSingleton
body: <p>I was recently running into an issue using Spring JMX. The only thing I want to reach is to export a simple Spring Bean for monitoring with JConsole. My goal is to integrate Spring JMX into an existing Spring web application running on an embedded Jetty server. But every time I start the application having JMX configured im running into the following exception:</p>
  
  <pre><code>org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.springframework.jmx.export.MBeanExporter] for bean with name 'exporter' defined in URL [file:/C:/Users/max.mustermann/workspace_intranetportal/my_webapp/target/classes/META-INF/appContext.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/springframework/beans/factory/SmartInitializingSingleton
  </code></pre>
  
  <p>Google couldn't help me so far. </p>
  
  <p>My Spring Bean looks like this:</p>
  
  <pre><code>public class JmxTestBean implements IJmxTestBean {
  
  private String  name;
  private int     age;
  private boolean isTest;
  
  @Override
  public int add(int x, int y) {
      return x + y;
  }
  
  @Override
  public long myOperation() {
      return 10L;
  }
  
  @Override
  public int getAge() {
      return age;
  }
  
  @Override
  public void setAge(int age) {
      this.age = age;
  }
  
  @Override
  public String getName() {
      return name;
  }
  
  @Override
  public void setName(String name) {
      this.name = name;
  }
  </code></pre>
  
  <p>And these are the lines I added to Spring's appContext.xml:</p>
  
  <pre><code>&lt;bean id="exporter" class="org.springframework.jmx.export.MBeanExporter"&gt;
      &lt;property name="beans"&gt;
          &lt;map&gt;
              &lt;entry key="test:name=testBean" value-ref="testBean" /&gt;
          &lt;/map&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="testBean" class="com.big.intranet.test.JmxTestBean"&gt;
      &lt;property name="name" value="TEST" /&gt;
      &lt;property name="age" value="100" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Deleting the lines I just showed you, the application is running fine. Does anyone have an idea how to solve that problem? Thanks everyone!</p>