Wednesday, January 2, 2013

Spring MVC and NetBeans Rest service from database tutorial error: java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor

I was doing the Spring MVC and NetBeans Rest service from database tutorial

http://netbeans.org/kb/docs/websvc/rest.html#rest-spring

When I finished all the steps and tryied to run the project and I got:

nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor

the detailed log is:

 Error durante el despliegue: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor. Consulte server.log para obtener más información.
C:\Users\jroa\Documents\NetBeansProjects\WebApplication1\nbproject\build-impl.xml:1032: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 37 seconds)

I fixed it by deleting, from the project library, the aopalliance jar downloaded from http://sourceforge.net/projects/aopalliance/files/aopalliance/1.0/.

and adding, to the project library, the aopalliance jar downloaded from the spring web site
http://ebr.springsource.com/repository/app/bundle/version/detail?name=com.springsource.org.aopalliance&version=1.0.0


No comments: