2010-11-15 3 views
1

Excusez-moi. Je suis un débutant du printemps. Maintenant, il y a une question à l'intérieur.
Je lis Le printemps en action et essayez le code dans MyEclipse. Mais quand j'essaie le code remplacé-méthode, il y a une erreur.
question de méthode remplacée au printemps 3

<bean id="harry" class="com.springinaction.sprintidol.Magician"> 
    <property name="magicBox" ref="magicBox" /> 
    <property name="magicWords" value="Bippity boppity boo" /> 
</bean> 

<bean id="magicBox" class="com.springinaction.sprintidol.MagicBoxImpl"> 
    <replaced-method name="getContents" replacer="tigerReplacer" /> 
</bean> 

<bean id="tigerReplacer" class="com.springinaction.sprintidol.TigerReplacer" /> 


C'est le applicationContext.xml. Et l'exception comme suit:

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'stevie' defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: net/sf/cglib/proxy/CallbackFilter

Tout le code proviennent du livre. Pourquoi ai-je l'exception? Et comment résoudre?

Merci.

Répondre

2

J'ai trouvé la raison. Parce que je n'ai pas inclus le Spring 3.0 Persistence Core Libraries. Merci tout de même.