Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

applicationContext-service.xml problem definitions

Tags:

java

spring

Working with spring, below, the code of applicationContext-service.xml:

<bean id="mediaObjectService" class="path.MediaObjectServiceImpl">

        <property name="mediaObjectDao" >
            <ref bean="mediaObjectDao"/>
        </property>
        <property name="semanticQuestionDao" >
            <ref bean="semanticQuestionDao"/>
        </property> 
        <aop:scoped-proxy/>
    </bean>

And while doing a test, I get his error:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.mediaObjectService' defined in class path resource [applicationContext-service.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: net.sf.cglib.proxy.Enhancer.setInterceptDuringConstruction(Z)V

As I know, the session scoped objects always have a prefix called scopedTarget. to the name of the bean-id.
So, if I am right, mediaObjectService is the bean-id, which is right declarated.
Maybe I am wrong, but anyway, I don't see the error I made.

Any help??

Thanks in advance

like image 695
Blanca Hdez Avatar asked Apr 10 '26 12:04

Blanca Hdez


2 Answers

I used cglib-nodep-2.1_3.jar and it solved my problem

like image 142
Vikrant K Avatar answered Apr 12 '26 03:04

Vikrant K


Google suggests this may be due to duplicate versions of the cglib library on your classpath.

like image 22
Jon Freedman Avatar answered Apr 12 '26 02:04

Jon Freedman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!