users@jersey.java.net

Re: [Jersey] Jersey Spring CGLIB2 is not available

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 16 Nov 2009 14:41:31 +0100

On Nov 16, 2009, at 2:30 PM, Nabil Benothman wrote:

>
>
> 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)

I was not suggesting you do that. I was just pointing out what
dependencies are included when you declare the jersey-spring dependency.

To get clarification i think you need to ask a question on a suitable
spring-forum.

I would expect that relevant spring-dependencies to support "<global-
method-security ..>" would be documented. There could be a valid
reason why the cglib dependency is not included or it could be a bug
in the spring security-related dependencies.

Paul.


>
>
> 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
> [hidden email]
>
>
>
>
> 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: Re: [Jersey] Jersey Spring CGLIB2 is
> not available
> Sent from the Jersey mailing list archive at Nabble.com.