title: java.lang.NoClassDefFoundError: net/sf/cglib/asm/util/TraceClassVisitor
body: <p>i'm trying simple aop with spring 3</p>
  
  <p>app-context.xml:</p>
  
  <pre><code>&lt;bean id="lambesis" class="by.aop.test.pack.Metalcore" &gt;
      &lt;constructor-arg value="UYUOOOOO" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="fans" class="by.aop.test.pack.Fans" /&gt;
  
  &lt;aop:config proxy-target-class="true"&gt;
      &lt;aop:aspect ref="fans"&gt;
          &lt;aop:pointcut id="mus" expression="execution(* by.aop.test.pack.Musician.play(..))" /&gt;
  
          &lt;aop:before pointcut-ref="mus" method="takeSeats" /&gt;
      &lt;/aop:aspect&gt;
  &lt;/aop:config&gt;
  </code></pre>
  
  <p>main method:</p>
  
  <pre><code>public static void main(String[] args) 
  {
      ApplicationContext ctx = new ClassPathXmlApplicationContext("by/aop/test/pack/app-context.xml"); 
  
      Musician musician = ctx.getBean("lambesis", Metalcore.class);
      musician.play(); 
  }
  </code></pre>
  
  <p>Metalcore implements Musician interface</p>
  
  <p>got this error both for cglib and cglib-nodep</p>
  
  <pre><code>    log4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext).
  log4j:WARN Please initialize the log4j system properly.
  Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lambesis' defined in class path resource [by/aop/test/pack/app-context.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: net/sf/cglib/asm/util/TraceClassVisitor
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
      at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:139)
      at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:83)
      at by.aop.test.pack.StartingPoint.main(StartingPoint.java:10)
  Caused by: java.lang.NoClassDefFoundError: net/sf/cglib/asm/util/TraceClassVisitor
      at net.sf.cglib.core.DebuggingClassWriter.toByteArray(DebuggingClassWriter.java:73)
      at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:26)
      at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
      at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:144)
      at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:116)
      at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
      at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
      at net.sf.cglib.proxy.Enhancer.&lt;clinit&gt;(Enhancer.java:69)
      at org.springframework.aop.framework.Cglib2AopProxy.createEnhancer(Cglib2AopProxy.java:228)
      at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:170)
      at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:112)
      at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.createProxy(AbstractAutoProxyCreator.java:476)
      at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:362)
      at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:322)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:407)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1426)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
      ... 11 more
  Caused by: java.lang.ClassNotFoundException: net.sf.cglib.asm.util.TraceClassVisitor
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      ... 28 more
  </code></pre>
  
  <p>dependencies:</p>
  
  <pre><code>&lt;dependencies&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;junit&lt;/groupId&gt;
      &lt;artifactId&gt;junit&lt;/artifactId&gt;
      &lt;version&gt;4.7&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
      &lt;version&gt;${spring.framework.version}&lt;/version&gt;
      &lt;scope&gt;test&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
      &lt;version&gt;${spring.framework.version}&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;log4j&lt;/groupId&gt;
      &lt;artifactId&gt;log4j&lt;/artifactId&gt;
      &lt;version&gt;1.2.14&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
      &lt;artifactId&gt;aspectjrt&lt;/artifactId&gt;
      &lt;version&gt;1.7.3&lt;/version&gt;
  &lt;/dependency&gt;
     &lt;dependency&gt;
      &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
      &lt;artifactId&gt;aspectjweaver&lt;/artifactId&gt;
      &lt;version&gt;1.7.3&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;cglib&lt;/groupId&gt;
      &lt;artifactId&gt;cglib&lt;/artifactId&gt;
      &lt;version&gt;3.0&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
     &lt;groupId&gt;asm&lt;/groupId&gt;
     &lt;artifactId&gt;asm-all&lt;/artifactId&gt;
     &lt;version&gt;2.1&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p></p>
  
  <p>additional asm dependency fixed first error, but now i have 2 packs of asm
  and the next error </p>
  
  <pre><code>Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lambesis' defined in class path resource [by/aop/test/pack/app-context.xml]: Initialization of bean failed; nested exception is java.lang.IncompatibleClassChangeError: Implementing class
  </code></pre>
  
  <p>What should i do?</p>