spring - The matching wildcard is strict, but no declaration can be found for element 'context:component-scan' -
i using spring 3.2.3.release maven pull dependencies. when building project in eclipse getting following error:
exception in thread "main" org.springframework.beans.factory.xml.xmlbeandefinitionstoreexception: line 17 in xml document class path resource [meta-inf/spring/application-context.xml] invalid; nested exception org.xml.sax.saxparseexception; linenumber: 17; columnnumber: 64; cvc-complex-type.2.4.c: matching wildcard strict, no declaration can found element 'context:component-scan'.
my appication-context.xml has following:
<?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:context="http://www.springframework.org/schema/context" xsi:schemalocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd http://www.springframework.org/schema/context/ http://www.springframework.org/schema/context/spring-context-3.2.xsd"> <context:component-scan base-package="com.example" />
i know pulling correct jar files maven dependencies shows:
inside meta-inf/sping.schemas can see have right schema declaration in jar:
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 http\://www.springframework.org/schema/context/spring-context-3.2.xsd=org/springframework/context/config/spring-context-3.2.xsd http\://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-3.2.xsd
i have looked @ these no avail:
the matching wildcard strict, no declaration can found element 'tx:annotation-driven'
no declaration can found element 'context:component-scan'
the matching wildcard strict, no declaration can found element 'context:component-scan
please help, it's driving me crazy .... :(
for starters should fix dependencies. mixing spring 3.2.3 , 2.0.6 jars (that problems waiting happen).
next declaration wrong http://www.springframework.org/schema/context/
must http://www.springframework.org/schema/context
.
Comments
Post a Comment