jersey - Invalid NamespaceHandler class [org.spring framework.data.jpa.repository.config.JpaRepositoryNameSpaceHandler] -
i'm trying configure jersey , spring. error i'm getting following:
unexpected exception parsing xml document class path resource [applicationco ntext.xml]; nested exception org.springframework.beans.fatalbeanexception: invalid namespacehandler class [org.spring framework.data.jpa.repository.config.jparepositorynamespacehandler] namespace [http://www.springframework.org/schema /data/jpa]: problem handler class file or dependent class; nested exception java.lang.noclassdeffounderror: org/ springframework/aop/framework/abstractadvisingbeanpostprocessor
because of following dependencies
<dependency> <groupid>com.sun.jersey.contribs</groupid> <artifactid>jersey-spring</artifactid> <version>1.8</version> <exclusions> <exclusion> <groupid>org.springframework</groupid> <artifactid>spring</artifactid> </exclusion> <exclusion> <groupid>org.springframework</groupid> <artifactid>spring-core</artifactid> </exclusion> <exclusion> <groupid>org.springframework</groupid> <artifactid>spring-web</artifactid> </exclusion> <exclusion> <groupid>org.springframework</groupid> <artifactid>spring-beans</artifactid> </exclusion> <exclusion> <groupid>org.springframework</groupid> <artifactid>spring-context</artifactid> </exclusion> </exclusions> </dependency>
my pom has following spring dependencies:
<dependency> <groupid>org.springframework</groupid> <artifactid>spring-context</artifactid> <version>${spring.version}</version> <exclusions> <exclusion> <groupid>commons-logging</groupid> <artifactid>commons-logging</artifactid> </exclusion> </exclusions> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-web</artifactid> <version>${spring.version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-webmvc</artifactid> <version>${spring.version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-orm</artifactid> <version>${spring.version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-test</artifactid> <version>${spring.version}</version> <scope>test</scope> </dependency> <!-- spring data --> <dependency> <groupid>org.springframework.data</groupid> <artifactid>spring-data-jpa</artifactid> <version>${spring-data.version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-aop</artifactid> <version>${spring.version}</version> </dependency>
spring.verion = 3.2.0.release
spring-data.version = 1.2.1.release
if remove jersey-spring artifact unit tests repository fields passes without exceptions. however, when start server jetty complains can't find:
"2013-05-03 00:10:43.885:warn:oejs.holder: java.lang.classnotfoundexception: com.sun.jersey.spi.spring.container.servlet.springservlet @ org.codehaus.plexus.classworlds.strategy.selffirststrategy.loadclass(selffirststrategy.java:50) @ org.codehaus.plexus.classworlds.realm.classrealm.loadclass(classrealm.java:244) @ org.codehaus.plexus.classworlds.realm.classrealm.loadclass(classrealm.java:230) @ org.eclipse.jetty.webapp.webappclassloader.loadclass(webappclassloader.java:424) @ org.eclipse.jetty.webapp.webappclassloader.loadclass(webappclassloader.java:377)"
is jersey-spring dependency compatible version of spring?
jersey has older version of spring aop excluded dependency , issues resolved.
Comments
Post a Comment