2013年9月26日星期四

Exception: Unable to locate Spring NamespaceHandler for XML schema namespace

A complete description of the problem
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem:
Unable to locate Spring NamespaceHandler for XML schema namespac [http://www.springframework.org/schema/context]

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" xmlns: context = "http://www.springframework.org/schema/context"
xmlns: jee = "http://www.springframework.org/schema/jee"
xsi: schemaLocation = "
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans
/ spring-beans-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-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/context http://www.springframework.org/schema/context/spring-context
-2.5.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd
">



Hope adequate guidance, tried various search engines to search for a solution.

------ Solution ------------------------------------ --------
this jar and you should be in the spring configuration file does not match the declared result .
xmlns: context = "http://www.springframework.org/schema/context"
------ For reference only -------------- -------------------------
If you encounter this problem , we should pay attention to see you in a jar under the META-INF directory is not have these two files : spring-handlers and spring-schemas!

------ For reference only ---------------------------------- -----

there ah. But spring.schemas files there are many duplicate jar, such as :
http \ :/ / www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd
http \ :/ / www.springframework.org/schema/context/spring-context-3.0.xsd=org/springframework/context/config/spring-context-3.0.xsd
http \ :/ / www.springframework.org/schema/context/spring-context-3.1.xsd=org/springframework/context/config/spring-context-3.1.xsd

没有评论:

发表评论