title: Invalid NamespaceHandler class [org.spring framework.data.jpa.repository.config.JpaRepositoryNameSpaceHandler]
body: <p>I'm trying to configure Jersey and Spring.  The error I'm getting is the following:</p>
  
  <p>Unexpected exception parsing XML document from class path resource [applicationCo
  ntext.xml]; nested exception is org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [org.spring
  framework.data.jpa.repository.config.JpaRepositoryNameSpaceHandler] for namespace [<a href="http://www.springframework.org/schema" rel="nofollow">http://www.springframework.org/schema</a>
  /data/jpa]: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/
  springframework/aop/framework/AbstractAdvisingBeanPostProcessor</p>
  
  <p>because of the following dependencies</p>
  
  <pre><code>&lt;dependency&gt;
              &lt;groupId&gt;com.sun.jersey.contribs&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-spring&lt;/artifactId&gt;
              &lt;version&gt;1.8&lt;/version&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                      &lt;artifactId&gt;spring&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-beans&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>My pom also has the following spring dependencies:</p>
  
  <pre><code>&lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
          &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;commons-logging&lt;/groupId&gt;
                  &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
          &lt;version&gt;${spring.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
          &lt;version&gt;${spring.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-orm&lt;/artifactId&gt;
          &lt;version&gt;${spring.version}&lt;/version&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.version}&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;!-- Spring Data --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
          &lt;artifactId&gt;spring-data-jpa&lt;/artifactId&gt;
          &lt;version&gt;${spring-data.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-aop&lt;/artifactId&gt;
          &lt;version&gt;${spring.version}&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>spring.verion = 3.2.0.RELEASE</p>
  
  <p>spring-data.version = 1.2.1.RELEASE</p>
  
  <p>If I remove the jersey-spring artifact then my unit tests for the repository fields passes without any exceptions.  However, when I start up my server jetty complains that it can't find:</p>
  
  <p>"2013-05-03 00:10:43.885:WARN:oejs.Holder:
  java.lang.ClassNotFoundException: com.sun.jersey.spi.spring.container.servlet.SpringServlet
          at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
          at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
          at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
          at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:424)
          at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:377)"</p>
  
  <p>Is the jersey-spring dependency compatible with my version of spring?</p>