0

I'm quite new to the Spring framework so forgive me if this is a simple question or a rookie mistake. My problem is that when I try to compile and deploy my project that I get an error:

The matching wildcard is strict, but no declaration can be found for element 'context:spring-configured'

My dispatcher xml file contains the 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:p="http://www.springframework.org/schema/p"
   xmlns:aop="http://www.springframework.org/schema/aop"
   xmlns:context="http://www.springframework.org/schema/context"
   xmlns:tx="http://www.springframework.org/schema/tx"
   xsi:schemaLocation="http://www.springframework.org/schema/beans       http://www.springframework.org/schema/beans/spring-beans-3.0.xsd  http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/context/spring-context-3.0.xsd">

<context:spring-configured/>
<context:annotation-config/>
<context:component-scan base-package="connect.controller"/>


<bean class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping"/>

<!--
Most controllers will use the ControllerClassNameHandlerMapping above, but
for the index controller we are using ParameterizableViewController, so we must
define an explicit mapping for it.
-->
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
    <property name="mappings">
        <props>
            <prop key="index.htm">indexController</prop>
            <prop key="main.htm">mainViewController</prop>
        </props>
    </property>
</bean>

<bean id="viewResolver"
      class="org.springframework.web.servlet.view.InternalResourceViewResolver"
      p:prefix="/WEB-INF/jsp/"
      p:suffix=".jsp" />

<!--
The index controller.
-->
<bean name="indexController"
      class="org.springframework.web.servlet.mvc.ParameterizableViewController"
      p:viewName="index" />

I can't seem to figure out why it's throwing the No Declaration found error. Any help or insight would be greatly appreciated

Chris Maness
  • 1,682
  • 3
  • 22
  • 40

1 Answers1

5

I think your xsi:schemaLocation declaration is missing http://www.springframework.org/schema/context

artbristol
  • 32,010
  • 5
  • 70
  • 103
  • Thanks for the help. However that cause another error: Java.lang.NoClassDefFoundError: org/aspectj/lang/NoAspectBoundException – Chris Maness Dec 28 '11 at 14:49
  • That sounds like a version mismatch. Best ask a fresh question so we can look at it.(If you're using Maven, post your POM) – artbristol Dec 28 '11 at 15:14