title: Spring core 3.2.2 + Spring security 3.1.4: java.lang.IncompatibleClassChangeError: org.springframework.asm.ClassVisitor
body: <p>When I added Spring-security 3.1.4 next to Spring 3.2.2, I've got this ugly exception below. I googled it up and got only this link about the same error:
  <a href="http://forum.springsource.org/showthread.php?133706-Spring-3-2-0-RELEASE-breaks-with-JBoss-7" rel="noreferrer">http://forum.springsource.org/showthread.php?133706-Spring-3-2-0-RELEASE-breaks-with-JBoss-7</a>
  pointing to spring JIRA explaining that spring-asm is now in spring-core.
  <a href="https://jira.springsource.org/browse/SPR-10134" rel="noreferrer">https://jira.springsource.org/browse/SPR-10134</a></p>
  
  <p>I figured I need to exclude spring-asm from spring-security somehow.</p>
  
  <p>Here is the exception I had:</p>
  
  <pre><code>java.lang.IncompatibleClassChangeError: class org.springframework.core.LocalVariableTableParameterNameDiscoverer$ParameterNameDiscoveringVisitor has interface org.springframework.asm.ClassVisitor as super class
  java.lang.ClassLoader.defineClass1(Native Method)
  java.lang.ClassLoader.defineClass(ClassLoader.java:791)
  java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
  org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2895)
  org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1173)
  org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1681)
  org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
  org.springframework.core.LocalVariableTableParameterNameDiscoverer.inspectClass(LocalVariableTableParameterNameDiscoverer.java:112)
  org.springframework.core.LocalVariableTableParameterNameDiscoverer.getParameterNames(LocalVariableTableParameterNameDiscoverer.java:85)
  org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:193)
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1051)
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:955)
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:490)
  org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
  org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
  org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
  org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
  org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
  org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626)
  org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
  org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
  org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651)
  org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:599)
  org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665)
  org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:518)
  org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:459)
  org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
  javax.servlet.GenericServlet.init(GenericServlet.java:160)
  org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
  org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
  org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
  org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
  org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
  java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  java.lang.Thread.run(Thread.java:722)
  </code></pre>