Hi People,
i downloaded the latest code for beginning Spring 2. Since the code base does not include sample for AOP i tried to add some AOP features to the Pix application.
i added the following segment to the pix-servlet.xml
<aop:config>
<aop:pointcut id="samplePointcut"
expression="execution(com.wrox.beginspring.pix.dao .persistUser(..))"/>
<aop:aspect id="sampleAspect" ref="advice">
<aop:around method="lookup" pointcut-ref="samplePointcut"/>
</aop:aspect>
</aop:config>
<bean id="advice" class="com.wrox.beginspring.pix.cache.CacheService "/>
also implemented the class wrox.beginspring.pix.cache.CacheService with the method "lookup"
When i try to deploy first it gaves a ClassNotFoundException with the class name org.objectweb.asm.commons.EmptyVisitor
This class is there in the asm-commons-2.2.1.jar.
Once i added this jar back again it says ClassNotFoundException for org.objectweb.asm.FieldWriter.
this class(FieldWriter)is not there in the asm-1.5.3.jar but it is there in the asm-3.1.jar.
when i add this jar (after deleting asm-1.5.3.jar ) it gives the following error.
hodError: org.objectweb.asm.ClassWriter.<init>(Z)V
Caused by:
java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V
at net.sf.cglib.core.DebuggingClassWriter.<init>(Debu ggingClassWriter.ja
va:47)
at net.sf.cglib.core.DefaultGeneratorStrategy.getClas sWriter(DefaultGene
ratorStrategy.java:30)
at net.sf.cglib.core.DefaultGeneratorStrategy.generat e(DefaultGeneratorS
trategy.java:24)
at net.sf.cglib.core.AbstractClassGenerator.create(Ab stractClassGenerato
r.java:216)
at net.sf.cglib.core.KeyFactory$Generator.create(KeyF actory.java:145)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.jav a:117)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.jav a:108)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.jav a:104)
at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java :69)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitialize r.getProxyFactory(C
which version of the asm jar file should be added ?
