Erreur "Unable to locate NamespaceHandler for namespace" qui surgit aléatoirement
Bonjour tout le monde,
Voilà mon problème :
au moment de démarrer Tomcat, je me retrouve avec :
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate NamespaceHandler for namespace [http://www.springframework.org/schema/tx]
Seulement, ça le fait pas tout le temps, donc je vois pas torp d'où ça vient...
C'est un projet buildé avec Maven, et dans mes dépendances, j'ai bien le spring-tx2.5.5.jar.
Je vous joins mon applicationContext.xml :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
<?xml version="1.0" encoding="UTF-8"?>
<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:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
<bean
class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="jpaVendorAdapter">
<bean
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="database" value="Test" />
<property name="showSql" value="true" />
</bean>
</property>
</bean>
<bean id="transactionManager"
class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<tx:annotation-driven transaction-manager="transactionManager" />
</beans> |
et une partie de mon web.xml :
Code:
1 2 3 4 5
|
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:applicationContext*.xml</param-value>
</context-param> |
Apparemment, le problème est rencontré lorsqu'on ajoute seulement spring.jar dans les dépendances (ce que j'avais fait au départ). Depuis, j'ai changé ça, c'est pour ça que j'ai ajouté le spring-tx.jar.
Le caractère aléatoire de la chose me laisse assez perplexe...
Je vous remercie de votre aide.
Bonne soirée