Je suis totalement nouveau au printemps et en veille prolongée. Je ne sais pas où je fais erreur. J'utilise Spring 4.0.2 et Hibernate 3 avec Eclipse et Tomcat.
Structure du projet: -
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://Java.Sun.com/xml/ns/javaee" xmlns:web="http://Java.Sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://Java.Sun.com/xml/ns/javaee http://Java.Sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>SimpleSpringHibApp</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<!-- Spring Functionality -->
<servlet>
<servlet-name>Employee</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Employee</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/Employee-servlet.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
</web-app>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:lang="http://www.springframework.org/schema/lang"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
<context:component-scan base-package="com.manoj.springprac" />
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/" />
<property name="suffix" value=".jsp" />
</bean>
<bean id="messageSource"
class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basename" value="classpath:messages"></property>
<property name="defaultEncoding" value="UTF-8"></property>
</bean>
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
p:location="/WEB-INF/jdbc.properties"></bean>
<bean id="dataSource"
class="org.Apache.commons.dbcp.BasicDataSource" destroy-method="close"
p:driverClassName="${jdbc.driverClassName}"
p:url="${jdbc.databaseurl}" p:username="${jdbc.username}"
p:password="${jdbc.password}"></bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"></property>
<property name="configLocation">
<value>classpath:hibernate.cfg.xml</value>
</property>
<property name="configurationClass">
<value>org.hibernate.cfg.AnnotationConfiguration</value>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">${jdbc.dialect}</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
</bean>
<bean id="employeeDAO" class="com.manoj.springprac.EmployeeDaoImpl"></bean>
<bean id="employeeService" class="com.manoj.springprac.EmployeeServiceImpl"></bean>
<tx:annotation-driven />
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
</beans>
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<mapping class="com.manoj.springprac.Employee"></mapping>
</session-factory>
</hibernate-configuration>
Erreur :-
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/Employee-servlet.xml]; nested exception is Java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.Java:413)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.Java:335)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.Java:303)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.Java:180)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.Java:216)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.Java:187)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.Java:125)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.Java:94)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.Java:129)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.Java:540)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.Java:454)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.Java:403)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.Java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.Java:106)
at org.Apache.catalina.core.StandardContext.listenerStart(StandardContext.Java:4779)
at org.Apache.catalina.core.StandardContext.startInternal(StandardContext.Java:5273)
at org.Apache.catalina.util.LifecycleBase.start(LifecycleBase.Java:150)
at org.Apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.Java:1566)
at org.Apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.Java:1556)
at Java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at Java.util.concurrent.FutureTask.run(Unknown Source)
at Java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at Java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at Java.lang.Thread.run(Unknown Source)
Caused by: Java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
at Java.lang.ClassLoader.defineClass1(Native Method)
at Java.lang.ClassLoader.defineClass(Unknown Source)
at Java.security.SecureClassLoader.defineClass(Unknown Source)
at org.Apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.Java:2889)
at org.Apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.Java:1170)
at org.Apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.Java:1678)
at org.Apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.Java:1556)
at org.springframework.transaction.config.AnnotationDrivenBeanDefinitionParser$AopAutoProxyConfigurer.configureAutoProxyCreator(AnnotationDrivenBeanDefinitionParser.Java:127)
at org.springframework.transaction.config.AnnotationDrivenBeanDefinitionParser.parse(AnnotationDrivenBeanDefinitionParser.Java:84)
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.Java:74)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.Java:1424)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.Java:1414)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.Java:187)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.Java:141)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.Java:110)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.Java:508)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.Java:391)
... 23 more
Caused by: Java.lang.ClassNotFoundException: org.aopalliance.intercept.MethodInterceptor
at org.Apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.Java:1711)
at org.Apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.Java:1556)
... 40 more
Mar 09, 2014 5:35:47 PM org.Apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/Employee-servlet.xml]; nested exception is Java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.Java:413)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.Java:335)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.Java:303)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.Java:180)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.Java:216)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.Java:187)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.Java:125)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.Java:94)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.Java:129)
at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.Java:540)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.Java:454)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.Java:403)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.Java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.Java:106)
at org.Apache.catalina.core.StandardContext.listenerStart(StandardContext.Java:4779)
at org.Apache.catalina.core.StandardContext.startInternal(StandardContext.Java:5273)
at org.Apache.catalina.util.LifecycleBase.start(LifecycleBase.Java:150)
at org.Apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.Java:1566)
at org.Apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.Java:1556)
at Java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at Java.util.concurrent.FutureTask.run(Unknown Source)
at Java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at Java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at Java.lang.Thread.run(Unknown Source)
Caused by: Java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
at Java.lang.ClassLoader.defineClass1(Native Method)
at Java.lang.ClassLoader.defineClass(Unknown Source)
at Java.security.SecureClassLoader.defineClass(Unknown Source)
at org.Apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.Java:2889)
at org.Apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.Java:1170)
at org.Apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.Java:1678)
at org.Apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.Java:1556)
at org.springframework.transaction.config.AnnotationDrivenBeanDefinitionParser$AopAutoProxyConfigurer.configureAutoProxyCreator(AnnotationDrivenBeanDefinitionParser.Java:127)
at org.springframework.transaction.config.AnnotationDrivenBeanDefinitionParser.parse(AnnotationDrivenBeanDefinitionParser.Java:84)
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.Java:74)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.Java:1424)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.Java:1414)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.Java:187)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.Java:141)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.Java:110)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.Java:508)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.Java:391)
... 23 more
Caused by: Java.lang.ClassNotFoundException: org.aopalliance.intercept.MethodInterceptor
at org.Apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.Java:1711)
at org.Apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.Java:1556)
... 40 more
Mar 09, 2014 5:35:47 PM org.Apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Mar 09, 2014 5:35:47 PM org.Apache.catalina.core.StandardContext startInternal
SEVERE: Context [/SimpleSpringHibApp] startup failed due to previous errors
Mar 09, 2014 5:35:47 PM org.Apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
Mar 09, 2014 5:35:47 PM org.springframework.context.support.AbstractApplicationContext doClose
INFO: Closing Root WebApplicationContext: startup date [Sun Mar 09 17:35:47 IST 2014]; root of context hierarchy
Mar 09, 2014 5:35:47 PM org.springframework.context.support.AbstractApplicationContext doClose
WARNING: Exception thrown from ApplicationListener handling ContextClosedEvent
Java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: Root WebApplicationContext: startup date [Sun Mar 09 17:35:47 IST 2014]; root of context hierarchy
at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.Java:346)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.Java:333)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.Java:880)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.Java:841)
at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.Java:579)
at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.Java:115)
at org.Apache.catalina.core.StandardContext.listenerStop(StandardContext.Java:4819)
at org.Apache.catalina.core.StandardContext.stopInternal(StandardContext.Java:5466)
at org.Apache.catalina.util.LifecycleBase.stop(LifecycleBase.Java:232)
at org.Apache.catalina.util.LifecycleBase.start(LifecycleBase.Java:160)
at org.Apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.Java:1566)
at org.Apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.Java:1556)
at Java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at Java.util.concurrent.FutureTask.run(Unknown Source)
at Java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at Java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at Java.lang.Thread.run(Unknown Source)
Mar 09, 2014 5:35:47 PM org.springframework.context.support.AbstractApplicationContext doClose
WARNING: Exception thrown from LifecycleProcessor on context close
Java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: Root WebApplicationContext: startup date [Sun Mar 09 17:35:47 IST 2014]; root of context hierarchy
at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.Java:359)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.Java:888)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.Java:841)
at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.Java:579)
at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.Java:115)
at org.Apache.catalina.core.StandardContext.listenerStop(StandardContext.Java:4819)
at org.Apache.catalina.core.StandardContext.stopInternal(StandardContext.Java:5466)
at org.Apache.catalina.util.LifecycleBase.stop(LifecycleBase.Java:232)
at org.Apache.catalina.util.LifecycleBase.start(LifecycleBase.Java:160)
at org.Apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.Java:1566)
at org.Apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.Java:1556)
at Java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at Java.util.concurrent.FutureTask.run(Unknown Source)
at Java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at Java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at Java.lang.Thread.run(Unknown Source)
Mar 09, 2014 5:35:47 PM org.Apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener
Java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.Java:170)
at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.Java:921)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.Java:895)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.Java:841)
at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.Java:579)
at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.Java:115)
at org.Apache.catalina.core.StandardContext.listenerStop(StandardContext.Java:4819)
at org.Apache.catalina.core.StandardContext.stopInternal(StandardContext.Java:5466)
at org.Apache.catalina.util.LifecycleBase.stop(LifecycleBase.Java:232)
at org.Apache.catalina.util.LifecycleBase.start(LifecycleBase.Java:160)
at org.Apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.Java:1566)
at org.Apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.Java:1556)
at Java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at Java.util.concurrent.FutureTask.run(Unknown Source)
at Java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at Java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at Java.lang.Thread.run(Unknown Source)
Je ne sais pas où je me trompe. S'il vous plaît, aidez-moi, toute suggestion me sera utile.
Merci d'avance.
Le premier stacktrace dit qu'une exception
org.springframework.beans.factory.BeanDefinitionStoreException: exception inattendue lors de l'analyse d'un document XML à partir de la ressource ServletContext [/WEB-INF/Employee-servlet.xml]
a été causé par l'exception:
Java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
Javadoc de ce dernier écrit:
Émis si la machine virtuelle Java ou une instance de ClassLoader tente de charger la définition d'une classe (dans le cadre d'un appel de méthode normal ou lors de la création d'une nouvelle instance à l'aide de la nouvelle expression) et si aucune définition de la classe n'a pu être trouvée.
La définition de classe recherchée existait lors de la compilation de la classe en cours d'exécution, mais la définition est introuvable.
Autrement dit, la machine virtuelle Java ne peut pas trouver le fichier de classe pour la classe org.aopalliance.intercept.MethodInterceptor, même si cette classe est utilisée par Spring.
La cause la plus probable est que le fichier JAR contenant ce fichier de classe ne fait pas partie du chemin de classe, car vous ne l'avez pas ajouté aux bibliothèques de votre projet Eclipse.
Mise à jour
Le manuel Spring Framework Reference Manual contient une section sur la gestion des dépendances , mais sa description suppose que vous utilisez un outil de gestion des dépendances tel que Maven, Gradle ou Ivy. Je vous recommande donc d'utiliser un tel outil. Ce n'est pas si difficile (Maven est pris en charge par Eclipse, il vous suffit d'utiliser l'assistant "Nouveau projet Maven" plutôt que l'assistant "Nouveau projet Java" pour créer le projet) et vous assure de disposer de toutes les dépendances Besoins.
Avait le même problème. Je viens de télécharger le fichier jar aopalliance-1.0.jar
et de le placer dans le dossier WEB-INF/lib
et cela a fonctionné.
Ceci est le lien pour télécharger le fichier jar aopalliance-1.0.jar
J'avais aussi la même erreur
nested exception is Java.lang.NoClassDefFoundError:org/aopalliance/intercept/MethodInterceptor
S'il vous plaît ajouter le aopalliance-1.0.jar
dans votre classpath, le problème sera résolu.
Vous devez ajouter le fichier aopalliance, version 1.0, à votre chemin de génération. Vous pouvez l'obtenir ici .
Si vous utilisez maven, ajoutez la dépendance ci-dessous à pom.xml.
<dependency>
<groupId>aopalliance</groupId>
<artifactId>aopalliance</artifactId>
<version>1.0</version>
</dependency>
Ce problème peut être résolu en mettant à jour Spring à la version 4.3+.