NoSuchMethodError when Running Java App
<p>When I try to run my <code>java</code> console app, I see the following errors on <code>Red Hat 5</code>, but not on <code>Ubuntu</code>.</p>

<p>Another StackOverflow <a href="http://stackoverflow.com/questions/6333684/maven-spring-aopnamespaceutils-nosuchmethod-error#comment24284713_6333684">post</a> mentions not to mix versions of <code>spring</code> 2 and 3.</p>

<p>But I ran <code>find [where I run app - includes classpath] | grep spring | grep 3</code> and saw 0 results. As a result, I believe it's not a <code>spring</code> version issue. </p>

<pre><code>&gt; Exception in thread "main"
&gt; org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
&gt; Configuration problem: Failed to import bean definitions from URL
&gt; location
&gt; [classpath:/org/eurekastreams/server/conf/applicationContext-model.xml]
&gt; Offending resource: class path resource [conf/applicationContext.xml];
&gt; nested exception is
&gt; org.springframework.beans.factory.BeanDefinitionStoreException:
&gt; Unexpected exception parsing XML document from class path resource
&gt; [org/eurekastreams/server/conf/applicationContext-model.xml]; nested
&gt; exception is java.lang.NoSuchMethodError:org.springframework.aop.config.
AopNamespaceUtils.registerAutoProxyCreatorIfNecessary
(Lorg/springframework/beans/factory/xml/ParserContext;
Lorg/w3c/dom/Element;)V
</code></pre>

<p><strong>EDIT</strong></p>

<p>Added stack trace:</p>

<p><code>Caused by: java.lang.NoSuchMethodError: org.springframework.aop.config.AopNamespaceUtils.registerAutoProxyCreatorIfNecessary(Lorg/springframework/beans/factory/xml/ParserContext;Lorg/w3c/dom/Element;)V</code></p>

<p>After running <code>mvn dependency:tree</code>, I saw a few versions of <code>spring-aop.jar</code>:</p>

<pre><code>$grep "spring-aop" mvn_dependency_tree.txt 
    [INFO] |  +- org.springframework:spring-aop:jar:2.0.8:compile
    [INFO] |  |  |  +- org.springframework:spring-aop:jar:2.0.8:provided
    [INFO] |  |  +- org.springframework:spring-aop:jar:2.0.8:compile
    [INFO] |  |  +- org.springframework:spring-aop:jar:2.5.4:compile
</code></pre>

<p>Would these different versions of <code>spring-aop</code> maybe explain the <code>AOP</code> error from the stack trace I added?</p>
