Solved

java.lang.ClassNotFoundException   error

Posted on 2014-03-01
6
2,302 Views
Last Modified: 2014-03-07
Here is the  error message I get in a Struts 2 - Spring integration  project:



22:21:44,334 INFO  [STDOUT] Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor

22:21:44,335 INFO  [STDOUT]       at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)

22:21:44,335 INFO  [STDOUT]       at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74)

22:21:44,335 INFO  [STDOUT]       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958)

22:21:44,336 INFO  [STDOUT]       ... 122 more

22:21:44,336 INFO  [STDOUT] Caused by: java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor

22:21:44,336 INFO  [STDOUT]       at org.springframework.aop.framework.adapter.DefaultAdvisorAdapterRegistry.<init>(DefaultAdvisorAdapterRegistry.java:49)

22:21:44,339 INFO  [STDOUT]       at org.springframework.aop.framework.adapter.GlobalAdvisorAdapterRegistry.<clinit>(GlobalAdvisorAdapterRegistry.java:31)

22:21:44,339 INFO  [STDOUT]       at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.<init>(AbstractAutoProxyCreator.java:118)

22:21:44,339 INFO  [STDOUT]       at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.<init>(AbstractAdvisorAutoProxyCreator.java:47)

22:21:44,339 INFO  [STDOUT]       at org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator.<init>(DefaultAdvisorAutoProxyCreator.java:36)

22:21:44,339 INFO  [STDOUT]       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

22:21:44,340 INFO  [STDOUT]       at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

22:21:44,340 INFO  [STDOUT]       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

22:21:44,340 INFO  [STDOUT]       at java.lang.reflect.Constructor.newInstance(Unknown Source)

22:21:44,340 INFO  [STDOUT]       at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)

22:21:44,340 INFO  [STDOUT]       ... 124 more

22:21:44,340 INFO  [STDOUT] Caused by: java.lang.ClassNotFoundException: org.aopalliance.intercept.MethodInterceptor from BaseClassLoader@9a4477{vfs:///C:/myCode/myWorkspace/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_6.x_Runtime_Server1393588138379/deploy/mywebapp.war}

22:21:44,341 INFO  [STDOUT]       at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:480)

22:21:44,341 INFO  [STDOUT]       at java.lang.ClassLoader.loadClass(Unknown Source)

22:21:44,341 INFO  [STDOUT]       ... 134 more




Can you please tell what is the issue here ?   How to fix it ?
0
Comment
Question by:cofactor
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 39897537
Looks like you have missing dependencies around AOP. You probably have missing jar(s)
0
 

Author Comment

by:cofactor
ID: 39898063
Looks like you have missing dependencies around AOP...You probably have missing jar(s)
yes. I too guess that.  but I am not able to find which jar.


I already have spring-aop-3.0.5-release.jar

what else to look at here ?

(this is a struts 2.3.15 project - doing a spring integration )
0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 200 total points
ID: 39898381
http://technojeeves.com/index.php/aliasjava1/7-jarsearch

Get the fullest Spring you can find and point the above at the Spring base directory with arguments

<SPRING_BASE_DIRECTORY> org/aopalliance/intercept/MethodInterceptor

and you should find the right jar (if it's there ;))
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Accepted Solution

by:
cofactor earned 0 total points
ID: 39899455
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39899903
:)
0
 

Author Closing Comment

by:cofactor
ID: 39912015
google search helped :)
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
throw exception 21 75
What's wrong with this code? 4 44
IntelliJ and Eclipse Neon 2 installations 4 61
Selenium findElement(By.classname  identifier 15 27
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Suggested Courses

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question