Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Trying to run web app but getting exception no declaration found for <context:componet>

Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using annotation driven controller in my spring web app . And to scan the package for it i am using <context:component-scan base-package="com.habuma.spitter.mvc"/>


But i am getting error every time i try to run my application, stating that
Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 10 in XML document from class path resource [spring-autoW.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:component-scan'.

This is the following xml i am using

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="";

if i need a jar file to resolve this problem please mention the name of it .
Posts: 17346
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From what you posted it looks correct. But you might have an extra character somewhere that you can't see.

Are you using an IDE like STS or Eclipse with Spring plugins.

If so, you can have the IDE do the xml header stuff for you via checkboxes.

context xsd is in the same jar as the beans xsd. So if that is already working then context would work too.

avneesh atri
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks it really helped
Sasparilla and fresh horses for all my men! You will see to it, won't you tiny ad?
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic