0

I am just trying to test p and c- namespaces in Spring. For this i am writing a simple xml file, but i am getting the error:

org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.

I tried other threads related to this but could not get anything working. Following is the code i am using:

xml file:

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:util="http://www.springframework.org/schema/util"
       xmlns:p="http://www.springframework.org/schema/p" 
       xmlns:c="http://www.springframework.org/schema/c" 
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">

    <bean id="e" class="beans.Engine" c:modelYear="2015"/>  
    <bean id="c" class="beans.Car" p:carName="Audi" p:engine-ref="e"/>

</beans>
amit
  • 807
  • 6
  • 14

0 Answers0