This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Aspect Oriented Programming and the fly likes Error java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Aspect Oriented Programming
Bookmark "Error java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice" Watch "Error java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice" New topic
Author

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

avneesh atri
Greenhorn

Joined: Jul 18, 2011
Posts: 20
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
Saifuddin Merchant
Ranch Hand

Joined: Feb 08, 2009
Posts: 605

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 - http://www.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.


Cheers - Sam.
Twisters - The new age Java Quiz || My Blog
avneesh atri
Greenhorn

Joined: Jul 18, 2011
Posts: 20
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

Joined: Feb 08, 2009
Posts: 605

you need a space between the * and com in your pointcut expression
avneesh atri
Greenhorn

Joined: Jul 18, 2011
Posts: 20
thank you very much ................... it worked
 
GeeCON Prague 2014
 
subject: Error java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice