spring error - very mysterious

i am creating a spring project with AOP features. I am getting this error. And the same thing created on somebody else's computer, there is no error
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aopTest' defined in class path resource [context.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:485)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:413)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:735)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:180)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:155)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:141)
        at spring.aop.Main.main(Main.java:18)
Caused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V
        at net.sf.cglib.core.DebuggingClassWriter.<init>(DebuggingClassWriter.java:47)
        at net.sf.cglib.core.DefaultGeneratorStrategy.getClassWriter(DefaultGeneratorStrategy.java:30)
        at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:24)
        at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
        at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:144)
        at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:116)
        at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
LVL 2
SunScreenCertAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
objectsConnect With a Mentor Commented:
could also be incompatible jar versions
0
 
objectsCommented:
looks like the objectweb jar is not available
0
 
SunScreenCertAuthor Commented:
it is there i reconfirmed it....
0
 
SunScreenCertAuthor Commented:
ok if i change a line in context.xml as  
<context:annotation-config/>
    <!--aop:aspectj-autoproxy/-->
    <aop:aspectj-autoproxy>
        <aop:include name="aopTest"/>
    </aop:aspectj-autoproxy>
   
   
    <bean id="aopTest" name="alias1 alias2" class="spring.aop.AopTest"/>
    <bean id="aspectBean" class="spring.aop.BeforeExample"/>

it then compiles successfully but none of the advice are executed
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.