applicationContext-service.xml问题定义

Bla*_*dez 2 java spring

使用spring,下面是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>
Run Code Online (Sandbox Code Playgroud)

在做测试时,我得到了他的错误:

org.springframework.beans.factory.BeanCreationException:在类路径资源[applicationContext-service.xml]中定义的名称为"scopedTarget.mediaObjectService"的bean创建错误:bean的初始化失败; 嵌套异常是java.lang.NoSuchMethodError:net.sf.cglib.proxy.Enhancer.setInterceptDuringConstruction(Z)V

据我所知,会话范围对象总是有一个名为scopedTarget.bean-id名称的前缀.
所以,如果我是对的,那mediaObjectService就是bean-id,它是正确的声明.
也许我错了,但无论如何,我没有看到我犯的错误.

任何帮助?

提前致谢

小智 5

我使用了cglib-nodep-2.1_3.jar,它解决了我的问题