?
Solved

java.lang.ClassNotFoundException   error

Posted on 2014-03-01
6
Medium Priority
?
2,368 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 800 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
Automating Terraform w Jenkins & AWS CodeCommit

How to configure Jenkins and CodeCommit to allow users to easily create and destroy infrastructure using Terraform code.

 

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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month15 days, 7 hours left to enroll

743 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