users@jersey.java.net

Re: [Jersey] Jersey Spring CGLIB2 is not available

From: Nabil Benothman <nabil.benothman_at_gmail.com>
Date: Mon, 16 Nov 2009 05:30:57 -0800 (PST)

Since i use Spring Security in my application, i declared it's
dependencies as addictional ones. Even if i added the dependencies
that you gave me and tried to deploy the problem still occur (cf.
bellow)


Spring Security dependencies
-----------------------------------

         <dependency>
             <groupId>org.springframework.security</groupId>
             <artifactId>spring-security-core</artifactId>
             <version>2.0.4</version>
             <scope>compile</scope>
         </dependency>

         <dependency>
             <groupId>org.springframework.security</groupId>
             <artifactId>spring-security-core-tiger</artifactId>
             <version>2.0.4</version>
             <scope>compile</scope>
         </dependency>

         <dependency>
             <groupId>org.springframework.security</groupId>
             <artifactId>spring-security-acl</artifactId>
             <version>2.0.4</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.springframework.security</groupId>
             <artifactId>spring-security-taglibs</artifactId>
             <version>2.0.4</version>
             <scope>compile</scope>
         </dependency>




Exception
------------
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'studentsResource': Initialization of bean
failed; nested exception is
org.springframework.aop.framework.AopConfigException: Cannot proxy
target class because CGLIB2 is not available. Add CGLIB to the class
path or specify proxy interfaces.

--
      BENOTHMAN Nabil
nabil.benothman_at_gmail.com
On 16/11/2009, at 1:58 م, Paul Sandoz [via Jersey] wrote:
>
> The spring-based dependencies of the jersey-spring module does not
> included the CGLIB dependency and it declares a minimal set:
>
>                  <dependency>
>                      <groupId>org.springframework</groupId>
>                      <artifactId>spring-core</artifactId>
>                      <version>${spring25-release-version}</version>
>                      <scope>compile</scope>
>                  </dependency>
>                  <dependency>
>                      <groupId>org.springframework</groupId>
>                      <artifactId>spring</artifactId>
>                      <version>${spring25-release-version}</version>
>                      <scope>compile</scope>
>                  </dependency>
>                  <dependency>
>                      <groupId>org.springframework</groupId>
>                      <artifactId>spring-beans</artifactId>
>                      <version>${spring25-release-version}</version>
>                      <scope>compile</scope>
>                  </dependency>
>                  <dependency>
>                      <groupId>org.springframework</groupId>
>                      <artifactId>spring-context</artifactId>
>                      <version>${spring25-release-version}</version>
>                      <scope>compile</scope>
>                  </dependency>
>                  <dependency>
>                      <groupId>org.springframework</groupId>
>                      <artifactId>spring-web</artifactId>
>                      <version>${spring25-release-version}</version>
>                      <scope>compile</scope>
>                  </dependency>
>
>
> $ mvn dependency:tree
> ...
> [INFO] +- org.springframework:spring-core:jar:2.5.6:compile
> [INFO] |  \- commons-logging:commons-logging:jar:1.1.1:compile
> [INFO] +- org.springframework:spring:jar:2.5.6:compile
> [INFO] +- org.springframework:spring-beans:jar:2.5.6:compile
> [INFO] +- org.springframework:spring-context:jar:2.5.6:compile
> [INFO] |  \- aopalliance:aopalliance:jar:1.0:compile
> [INFO] +- org.springframework:spring-web:jar:2.5.6:compile
>
>
> I would prefer not to add to this set additional dependencies that may
> or may not be required.
>
> I think the best thing to do is document additional dependencies.
>
> Are you declaring any additional spring dependencies in your pom file?
>
> Paul.
-- 
View this message in context: http://n2.nabble.com/Jersey-Spring-CGLIB2-is-not-available-tp4005853p4012018.html
Sent from the Jersey mailing list archive at Nabble.com.