• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am running a spring 3 framework program for aspect oriented programing . But it is throwing the following exception. please help.





Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [spring-idol-introductions.xml]; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefi
 
Ranch Hand
Posts: 608
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

avneesh atri wrote:java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice



You've missing the aspectj Jar ....

I pretty certain the same question has been asked before.

Hint : Try searching the ranch with java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice

Update
Found it - https://coderanch.com/t/565157/Spring/Spring-AOP#2566364
For some strange reason searching for java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice does not return any results (including this post) but searching for java.lang.NoClassDefFoundError: got me to the above link.
 
avneesh atri
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i read the posts on the link suggested by you . There they are asking to add aopalliance-1.0.jar and aspectjweaver.jar file in the library.I have added the following jar in my library for Aspect oriented programing. But still i am getting an error.

jar file names
aopalliance-1.0.jar
aspectjrt-1.5.jar
springaop-3.0.2-Release.jar
aspectjweaver-1.5.4.jar

the error i am getting is

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eddie' defined in class path resource [spring-idol-introductions.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.aop.aspectj.AspectJPointcutAdvisor]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting 'name pattern' at character position 59
execution(*com.springinaction.springidol.Performer.perform(..))
^
please help i am stuck
 
Saifuddin Merchant
Ranch Hand
Posts: 608
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you need a space between the * and com in your pointcut expression
 
avneesh atri
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you very much ................... it worked
 
Water! People swim in water! Even tiny ads swim in water:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic